Skip to content

Prepare Release workflow and towncrier changelog (as in anyplotlib) - #61

Merged
CSSFrancis merged 2 commits into
directelectron:mainfrom
CSSFrancis:feat/prepare-release
Sep 24, 2026
Merged

CSSFrancis merged 2 commits into
directelectron:mainfrom
CSSFrancis:feat/prepare-release

Conversation

@CSSFrancis

Copy link
Copy Markdown
Member

Brings deapi's release process in line with anyplotlib and de-twin: a Prepare Release workflow plus a towncrier changelog.

How a release works after this

  1. Actions → Prepare Release → Run workflow, then pick the bump:
    • pre-release: 5.3b6 → 5.3.0b7
    • finalize: 5.3b6 → 5.3.0
    • minor, bugfix, major, with an optional beta flag
  2. The workflow bumps version in pyproject.toml, builds CHANGES.rst from the fragments in upcoming_changes/, and opens a Release v… PR. Review it and merge.
  3. Create the GitHub release by hand, as today: tag v<version> on main, and tick "pre-release" for betas. Publishing it runs the existing publish.yaml, which uploads to PyPI.

What's included

  • .github/workflows/prepare_release.yml: anyplotlib's workflow, with these changes:
    • It parses deapi's two-part versions (5.3b6).
    • It leaves out the docs version-switcher steps, since deapi's docs aren't versioned.
    • Its PR text points to the manual GitHub release instead of a tag push.
  • [tool.towncrier] in pyproject.toml: the same fragment types as anyplotlib (api_change, new_feature, bugfix, deprecation, removal, doc, maintenance). Entries link to deapi PRs.
  • upcoming_changes/README.rst: how to name and write fragments, adapted from anyplotlib's.
  • CHANGES.rst: a .. towncrier release notes start marker above the existing entries. Older entries are unchanged.

Choices to review

  • Version format. Versions become major.minor.patch, so 5.3b6 is followed by 5.3.0b7. That's the same version as 5.3b7 under PEP 440, so pip ordering doesn't change. Tags follow as v5.3.0b7, replacing the v5.3beta7 style.
  • deapi/version.py isn't bumped. Its version is the client/protocol version that the client sends to DE-Server, and versionInfo parses it as integers. The workflow only changes the package version in pyproject.toml.
  • publish.yaml is unchanged. PyPI's trusted publisher is tied to that workflow's filename, so renaming or rewriting it would need the PyPI settings changed too.
  • Release PRs don't start CI automatically. They're opened with GITHUB_TOKEN, as in anyplotlib, so push an empty commit or close and reopen the PR to run it.

Tested locally

  • The workflow's version logic, run against 5.3b6, 5.3.0b7 and 5.3.0 with every bump, gives the versions above. It refuses bumps that would skip a pending 5.3.0.
  • towncrier build --yes, run on a copy with this PR's fragment, writes a new 5.3.0b7 (date) section under the marker and deletes the fragment.
  • The workflow file parses as valid YAML.
  • I haven't run the workflow on GitHub itself; the first real run will be the next release.

- .github/workflows/prepare_release.yml (run from the Actions tab): bumps the
  version in pyproject.toml, builds CHANGES.rst from upcoming_changes/ with
  towncrier and opens a Release PR. Publishing a GitHub release still runs
  publish.yaml, which uploads to PyPI (its trusted publisher is unchanged).
- Versions become major.minor.patch (5.3b6 -> 5.3.0b7, the same version
  under PEP 440); deapi/version.py, the protocol version sent to
  DE-Server, is left alone.
- upcoming_changes/README.rst explains the fragment types and naming.
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@CSSFrancis
CSSFrancis merged commit e564cd0 into directelectron:main Sep 24, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants