Adopt CVXPY-style release procedures with hatch-vcs#240
Merged
Conversation
Move package version off a hardcoded constant and onto git tags via hatch-vcs, so tagging vX.Y.Z is the only release-cutting action. Add PROCEDURES.md documenting the release-branch + cherry-pick patch model, and tools/release_notes.py for generating GitHub release notes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
81d1686 to
3454d95
Compare
SteveDiamond
approved these changes
May 19, 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.
Summary
pyproject.tomldeclares[tool.hatch.version] source = "vcs"and a build hook writessrc/cvxpylayers/_version.py(gitignored) for the package to import at runtime, with a0.0.0+unknownfallback for unbuilt source trees.PROCEDURES.mddocumenting the release-branch + cherry-pick patch model, adapted from CVXPY's. Cutting a release is now: branchrelease/X.Y.xoff master → tagvX.Y.Z→ existing CI publishes to PyPI.tools/release_notes.py(ported from CVXPY, repo name swapped) to generate the "PRs by author" list for GitHub release notes..github/workflows/build.yml:release/**added to push triggers (so CI runs on release branches), andfetch-depth: 0onactions/checkout(hatch-vcs needs tags + history). No changes to the existing build/publish steps.Test plan
hatch versionresolves a PEP 440 dev version locally (1.1.1.dev4+gHASH).import cvxpylayers; cvxpylayers.__version__works after an editable install.X.Y.Zversion to PyPI.🤖 Generated with Claude Code