chore: apply yapf and publish artifacts before tagging - #74
Merged
Conversation
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>
This was referenced Jul 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 = 2onto 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:
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:
pyproject.toml,meta.yaml,conf.pypython -m buildtwine check dist/*Requires-Python: >=3.10Version is deliberately left at 1.18 here — bumping it is the workflow's job.
🤖 Generated with Claude Code