Releasing¶
clypto versions by cycle, not by feature: v<year><edition><version>. The b1
in v2026b1 is the first patch of the b edition of 2026. Every version gets its
own branch, its own tag, and its own PyPI release.
The cycle¶
Cut the branch from
master, named after the version it will hold:git checkout master && git pull git checkout -b release/v2026b2
Bump the version in
clypto/__init__.py. This is the first commit on the branch;pre-commitrejects anything else until it happens.__version__ = "2026b2"
Do the work on the release branch. Each commit is gated by
ruffandmypyover the files it stages, so the branch stays clean as it goes.Update the release metadata in the same branch — see Keeping the metadata in step.
Push and open a pull request into
master.pre-pushruns the version check and then the fullpytest tests/suite throughuv run --no-sync— the same command CI runs, against the environment you built withuv sync --extra dev. About a minute once built. CI then runs it across Python 3.11–3.14 on Linux, Windows and macOS.Merge into
master. Two things fire on the merge:test.ymlandtype.ymlhave already validated the pull request, anddocs.ymlrebuilds and redeploys this site.Create the GitHub Release, tagged
v2026b2, frommaster. That tag is the release point:publish.ymltriggers on the published release, builds wheels for Linux, Windows and macOS with cibuildwheel plus an sdist, and publishes them to PyPI.git tag v2026b2 git push origin v2026b2 # then: gh release create v2026b2 --generate-notes
Start the next cycle from the same commit:
release/v2026b3for the next patch of the edition, or a new edition letter for the next batch of work.
Version formats¶
Value |
|
|---|---|
|
|
branch |
|
tag and GitHub Release |
|
The v prefix belongs to the branch and the tag. The Python version is written
without it, so pip install clypto==2026b2 matches what clypto.__version__
reports.
Keeping the metadata in step¶
A release updates three version-carrying files. The hooks enforce the first; the other two are yours to remember (or add to the hook if they keep slipping):
File |
What changes |
|---|---|
|
|
|
|
|
a new |
docs/reference/changelog.md embeds CHANGELOG.md at build time, so the changelog
needs no separate docs edit.
What the hooks enforce¶
.husky/check-version.sh is the machine-readable form of the cycle:
On a
release/v<version>branch, the staged__version__must equal that branch’s version. Drift is caught at commit time, and a bump commit is allowed through because the check reads the staged copy — the commit that fixes the version is the commit that unblocks itself.A commit that changes
__version__must be on therelease/v<version>branch naming the version it sets. Bumping onmasteror adevelopment/*branch is rejected.Both the branch suffix and the version must look like the scheme: four digits, one lowercase edition letter, then digits.
Check it by hand against HEAD with make check-version, and read
docs/installation.md for what pre-commit and pre-push run beyond this.
Bypassing¶
Nothing here is a trust mechanism — every gate is a convenience, and every gate can be skipped:
HUSKY=0 git commit ... # skip all hooks
git commit --no-verify # skip pre-commit only
git push --no-verify # skip pre-push only
CI runs the suite and mypy on every pull request into master regardless, so a
skipped hook delays the failure instead of avoiding it.