When it comes time to cut a new release, follow these steps:
-
Create a new git branch off of
mainfor the release.Prefer the convention
release-<version>, where<version>is the next incremental version number (e.g.release-v0.11.0for version 0.11.0).git checkout -b release-v<version>
However, the branch name is not super important, as long as it is not
main. -
Update the version number across the project using the
bumpvertool. See this section for more details about choosing the correct version number.The
pyproject.tomlin the base of the repository contains a[tool.bumpver]section that configures thebumpvertool to update the version number wherever it needs to be updated and to create a commit with the appropriate commit message.bumpveris included as a development dependency, so you should already have it installed if you have bootstrapped the project. If you have not, you can install the development dependencies with:just bootstrap # or manually: uv sync --frozenThen, run
bumpverto update the version number, with the appropriate command line arguments. See thebumpverdocumentation for more details.Note: For any of the following commands, you can add the command line flag
--dryto preview the changes without actually making the changes.Here are the most common commands you will need to run:
bumpver update --patch # for a patch release bumpver update --minor # for a minor release bumpver update --major # for a major release
To release a tagged version, such as a beta or release candidate, you can run:
bumpver update --tag=beta # or bumpver update --tag=rcRunning these commands on a tagged version will increment the tag appropriately, but will not increment the version number.
To go from a tagged release to a full release, you can run:
bumpver update --tag=final
-
Ensure the CHANGELOG is up to date. If updates are needed, add them now in the release branch.
-
Create a pull request from the release branch to
main. -
Once CI has passed and all the checks are green ✅, merge the pull request.
-
Draft a new release on GitHub.
Use the version number with a leading
vas the tag name (e.g.v0.11.0).Allow GitHub to generate the release title and release notes, using the 'Generate release notes' button above the text box. If this is a final release coming from a tagged release (or multiple tagged releases), make sure to copy the release notes from the previous tagged release(s) to the new release notes (after the release notes already generated for this final release).
If this is a tagged release, make sure to check the 'Set as a pre-release' checkbox.
-
Once you are satisfied with the release, publish the release. As part of the publication process, GitHub Actions will automatically publish the new version of the package to PyPI.
We try our best to adhere to Semantic Versioning, but we do not promise to follow it perfectly (and let's be honest, this is the case with a lot of projects using SemVer).
In general, use your best judgement when choosing the next version number. If you are unsure, you can always ask for a second opinion from another contributor.