Skip to content

chore: apply yapf and publish artifacts before tagging - #74

Merged
VonAlphaBisZulu merged 1 commit into
mainfrom
prep-release-1.19
Jul 25, 2026
Merged

chore: apply yapf and publish artifacts before tagging#74
VonAlphaBisZulu merged 1 commit into
mainfrom
prep-release-1.19

Conversation

@VonAlphaBisZulu

Copy link
Copy Markdown
Contributor

Preparation for the 1.19 release. Two changes, neither affecting behaviour.

1. Apply yapf now, so the release commit stays readable

The repository had drifted from the yapf style the release workflow enforces, so yapf -i -r . would have reformatted 25 files as a side effect of the version bump — burying the release in unrelated churn.

The diff is cosmetic. Comparing token streams before and after, the only non-whitespace change is the removal of statement-separating semicolons, where yapf splits a = 1; b = 2 onto two lines.

Verified: e_coli_core gene-MCS gates at 455, set-identical to the reference.

2. Publish before tagging

The workflow created the git tag and GitHub release before it built or uploaded anything. Any failure in the build, the metadata check, or the upload left behind a tag and a release advertising a version that does not exist on PyPI — and since PyPI refuses a version a second time even after deletion, the fix would be a new version number rather than a retry.

New order:

build -> twine check -> commit+push bump -> publish to PyPI -> create tag/release

Distributions are now built and validated before the repository is touched at all, and the release is cut only once PyPI has accepted the upload. A failure before that point leaves nothing to unwind.

Dry run

Simulated the full reordered sequence at 1.19:

Check Result
Version bump across all 3 files 1.19 in pyproject.toml, meta.yaml, conf.py
python -m build wheel 184 KB + sdist 195 KB
twine check dist/* PASSED on both
Install from sdist + import works, all 9 deps declared, Requires-Python: >=3.10

Version is deliberately left at 1.18 here — bumping it is the workflow's job.

🤖 Generated with Claude Code

Two changes to get out of the release's way.

The repository had drifted from the yapf style the release workflow enforces, so
`yapf -i -r .` would have reformatted 25 files as a side effect of the version
bump, burying the release in unrelated churn. Running it now separates the
formatting from the release. The diff is cosmetic: comparing token streams before
and after, the only non-whitespace change is the removal of statement-separating
semicolons, where yapf splits `a = 1; b = 2` onto two lines. e_coli_core gene-MCS
gates at 455, set-identical to the reference.

The publish workflow created the git tag and the GitHub release before it built
or uploaded anything, so any failure in the build, the metadata check or the
upload left behind a tag and a release advertising a version that does not exist
on PyPI. Since PyPI refuses to accept a version a second time even after it is
deleted, that is awkward to unwind: the fix is a new version number, not a
retry.

Now the distributions are built and pass `twine check` before the repository is
touched at all, and the release is cut only after PyPI has accepted the upload.
A failure before that point leaves nothing to clean up.

Dry run of the reordered sequence at 1.19: both artifacts build, twine check
passes on each, and the sdist installs and imports with the expected metadata.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@VonAlphaBisZulu
VonAlphaBisZulu merged commit ffad74b into main Jul 25, 2026
20 checks passed
@VonAlphaBisZulu
VonAlphaBisZulu deleted the prep-release-1.19 branch July 25, 2026 22:25
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.

1 participant