Releasing
Versioning
Build the release from the commit that should become the release.
If the commit is not tagged yet, setuptools_scm will generate a development version
instead of the final release version.
Release checklist
- Start from a clean worktree on the branch or commit to release.
-
Sync the tooling and dependencies:
-
Run the local quality checks:
-
Create the release tag on the release commit:
-
Build the source distribution and wheel locally:
Note:
--no-sourcesskips possibly specified dependenciestool.uv.sourcesas a safeguard to not use these alternative dependency sources for development; it still ships a source distribution. -
Verify the generated metadata and distribution files:
You should see files named like
dist/PyKMP-0.0.2.tar.gzanddist/pykmp-0.0.2-py3-none-any.whlon a clean git checkout of the0.0.2tag. -
Verify the built wheel passes the check-wheel-contents linter:
-
Upload to PyPI:
For local publishing to PyPI, use a PyPI token, for example through the
UV_PUBLISH_TOKENenvironment variable.Repeat without
--dry-runif you confirmed this is what you intend to publish.As an extra safety check, publish to TestPyPI first by specifying
--index testpypiwith that being configured as an index inpyproject.toml. Repeat the upload without this option to publish to the regular PyPI index.If
dist/still contains files from an older build, remove them to avoid uploading the wrong artifacts.Ensure to not publish development versions, e.g.
pykmp-0.0.2.dev30+g578be6af2.d20260417-py3-none-any.whl. -
Push the commit and tag:
Publish documentation
-
Build the documentation:
-
Publish using
ghp-import: