Conversation
Add scripts/prepare_release.py, which applies the version-specific edits each release needs (pyproject version, release-notes skeleton, release index, mkdocs nav, README and HTTP transport version references, and the current/historical release-notes constants in the release-validation tests). Every edit must match its expected source text exactly once and is computed before anything is written; invalid, older, duplicate, or partially prepared versions are refused without changing files. --dry-run/--check prints the diff without writing. The notes skeleton carries TODO(release) markers, and an offline test fails while any remain, so placeholder notes cannot ship. Closes #345. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HwZ39RgNjW1jK4tuTopfsy
This branch has not been deployed
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.
Why
Release preparation currently requires manually updating the package version, release notes, documentation references, MkDocs navigation, and release-validation fixtures. The 1.1.2 release showed how easy it is for that process to become repetitive and partially applied.
Closes #345.
What
Adds
scripts/prepare_release.pyto provide one reviewable release-preparation workflow.The helper:
MAJOR.MINOR.PATCHtarget versionTODO(release)markers--dry-run/--checkAlso adds focused unit/end-to-end tests and documents the new workflow in
CONTRIBUTING.md.Tests
The branch adds
tests/test_prepare_release.py, covering:TODO(release)placeholdersThe normal pull-request CI matrix should run the offline suite across supported Python versions and then build/validate the package artifacts.
After merge, the helper will also be live-tested during the next real release before any tagging or publishing step.
Risk and impact
Normal
The script edits release metadata and documentation, so mistakes could leave a release branch internally inconsistent. The implementation mitigates this by validating expected structure before changes, planning edits entirely in memory first, refusing partial states, using atomic file replacement, and rolling back completed writes if a later write fails.
Publishing, tagging, pushing, and GitHub Release creation remain manual, so the helper cannot publish an incorrect release on its own.