Skip to content

Releasing

Full procedure, including the PyPI account setup and the TestPyPI dry run, lives in RELEASING.md in the repository.

The short version:

# 1. Bump the version in BOTH places; a test pins them together.
#      pyproject.toml          version = "0.3.0"
#      kirokuforms/__init__.py __version__ = "0.3.0"

# 2. The suite must be green. The live-server tests skip without a server.
python -m pytest tests/ -q

# 3. Build from a clean tree. A version number is consumed permanently, so a
#    stale wheel in dist/ is a wasted release.
rm -rf dist build && python -m build

# 4. Check the metadata renders, which catches a README that breaks PyPI.
python -m twine check dist/*

# 5. TestPyPI first, and install it somewhere clean.
python -m twine upload --repository testpypi dist/*

# 6. Then the real one.
python -m twine upload dist/*

A version number cannot be reused

Uploading 0.3.0 means 0.3.0 can never be uploaded again, even after a yank. Yanking hides a release without freeing the number. Get it right on TestPyPI first.

Documentation

This site rebuilds and redeploys on every push to main that touches docs/, mkdocs.yml, or the package itself, via .github/workflows/docs.yml. There is nothing to run by hand.

To preview locally:

pip install "mkdocs-material>=9.5" "mkdocstrings[python]>=0.24"
mkdocs serve

The build runs with strict: true, so a broken internal link or a bad mkdocstrings reference fails it rather than publishing a dead link.