Repository navigation
Prepare release: bump the sample's model file and lock, and the README's alpha line, with pyproject.toml - #224
Merged
Merged
Conversation
…ample's model file and poetry.lock, and the README Prepare release raised pyproject.toml and uv.lock alone, so its PR left the sample's model file naming the old generator version, which the sample's test of its typed references fails on, the sample's poetry.lock recording the old drivine, and the README's "0.2 is an alpha release" behind. scripts/release_version.py references rewrites each, from a list kept in the script, with patterns tight enough not to hit another package's version, and fails when one isn't found exactly once. The workflow commits what it lists, and fails if the bump changed anything it doesn't commit.
Merged
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.
"Prepare release" used to bump only
pyproject.tomlanduv.lock, so a release left these files naming the old version:sample/.drivine/model.json, which records the generator version.python -m drivine.stubs --check, insample/tests/test_typed_refs_up_to_date.py, compares the whole file. To prove it, I bumped only the build file: the check failed with "Out of date: …/sample/.drivine/model.json".sample/poetry.lock: thedrivinepackage entry, in PEP 440 form. Release 0.3.0 #196 missed this one. Runningpoetry lockafter a bump changes exactly that line.What changes
scripts/release_version.py references VERSIONrewrites an explicitREFERENCESlist, each entry matched by an anchored pattern. The model file gets the version as written (0.3.0-rc.1). The lock gets it in PEP 440 form (0.3.0rc1), through a stdlibpep440()that a test compares withpackagingon 16 versions. The README line has only its MAJOR.MINOR rewritten.prepare-release.ymlruns it afteruv lockandgit adds the files it prints. A new guard fails the run if anything is left unstaged.drivine-extra,pi-pilgrimat the same version, another library's model file);.drivine/model.jsonin the repo is on the list;pyproject.toml's version.Verified
README.md,pyproject.toml,sample/.drivine/model.json,sample/poetry.lockanduv.lock.poetry check --lockpasses, andpoetry lockchanges nothing. So each rewrite matches what the generator and Poetry write. The same holds for 0.3.0-rc.1.pep440()fuzz againstpackaging, was clean.Follow-ups, not in this PR
ci.yml's pytest covers onlytests/. The new consistency test does catch a version mismatch in CI. Running the sample's stubs check in CI too, which needs no database, would catch other drift.docs/00-introduction.md. When it's rebased, it should add that file toREFERENCES.This replaces the hand-made release PR #196: Prepare release now makes all of #196's changes, plus
sample/poetry.lock.