ci: add an alpha input to the Bump Version workflow - #415
Conversation
Argus reviewAuto-review is off for this repo. Tick the box below to run a review on this PR.
Estimated cost
Tip: you can also comment |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Opens a development cycle. With alpha checked the bumped version gets an -alpha suffix and CITATION.cff is left alone, since an alpha is not a release. Without it the workflow behaves exactly as before. The suffix is what lets successive pre-releases stamp a0, a1, a2. A plain version equal to a released one makes the stamper return a0 forever, which is how 1.1.0a0 came to collide with itself. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0858fca to
aaeb130
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Opens a development cycle, the step that has no automation behind it today.
Bump Versionwrites a plain version computed from the latest release, which isright for a release commit. Nothing re-adds a suffix afterwards, so the repository
sits on a plain version between releases. That is what produced the recent
breakage:
pyproject.tomlheld1.1.0while1.1.0was already on PyPI, so thestamper returned
1.1.0-a.0on every run, and the wheels from the first run madeevery later run collide.
This adds an
alphacheckbox to the same workflow, off by default. With itchecked, the bumped version gets an
-alphasuffix andCITATION.cffis leftalone, since an alpha is not a release and the last one stays the citable
artifact. Unchecked, the workflow behaves exactly as before.
The suffix is what carries a
.presegment forget_prelease_versiontoincrement, so successive pre-releases stamp a0, a1, a2 rather than a0 forever.
Because the bump is computed from the latest release, the result always sits
above it, and a pre-release built from it cannot collide with a version already
live on PyPI.
The suffix logic lives behind a
--alphaflag onbin/bump_version.py. Itappends to
Version(...).base_version, which drops any suffix already presentrather than producing
1.2.0-alpha-alpha.Verified locally
Replayed the workflow's shell block against the real scripts, for every input
combination:
Note
Dispatching with the same inputs twice produces no diff, so the commit step fails
with "nothing to commit". That behaviour is unchanged by this PR.