Skip to content

Adopt CVXPY-style release procedures with hatch-vcs#240

Merged
PTNobel merged 2 commits into
masterfrom
release-procedures
May 19, 2026
Merged

Adopt CVXPY-style release procedures with hatch-vcs#240
PTNobel merged 2 commits into
masterfrom
release-procedures

Conversation

@PTNobel

@PTNobel PTNobel commented May 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Switch versioning to hatch-vcs — the git tag is now the only source of truth for the package version. pyproject.toml declares [tool.hatch.version] source = "vcs" and a build hook writes src/cvxpylayers/_version.py (gitignored) for the package to import at runtime, with a 0.0.0+unknown fallback for unbuilt source trees.
  • Add PROCEDURES.md documenting the release-branch + cherry-pick patch model, adapted from CVXPY's. Cutting a release is now: branch release/X.Y.x off master → tag vX.Y.Z → existing CI publishes to PyPI.
  • Add tools/release_notes.py (ported from CVXPY, repo name swapped) to generate the "PRs by author" list for GitHub release notes.
  • Two small additions to .github/workflows/build.yml: release/** added to push triggers (so CI runs on release branches), and fetch-depth: 0 on actions/checkout (hatch-vcs needs tags + history). No changes to the existing build/publish steps.

Test plan

  • Verified hatch version resolves a PEP 440 dev version locally (1.1.1.dev4+gHASH).
  • Verified import cvxpylayers; cvxpylayers.__version__ works after an editable install.
  • CI passes on this PR.
  • On the next release: confirm the tagged build publishes the bare X.Y.Z version to PyPI.

🤖 Generated with Claude Code

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>
@PTNobel PTNobel force-pushed the release-procedures branch from 81d1686 to 3454d95 Compare May 19, 2026 06:43
@PTNobel PTNobel merged commit bd9caf9 into master May 19, 2026
4 checks passed
@PTNobel PTNobel deleted the release-procedures branch May 19, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants