This document is a maintainer checklist for releasing a new version of magscope.
PyPI publication is handled by GitHub Actions after a GitHub Release is published. The normal release flow is:
- Prepare the version and changelog.
- Run validation locally.
- Commit and push the release-prep changes.
- Publish to TestPyPI and smoke test the package.
- Publish a GitHub Release tagged as
vX.Y.Z. - Verify the PyPI release and related project pages.
- Choose the next version number
X.Y.Z. - Confirm the release only includes changes that are ready to ship.
- Update
pyproject.toml:- Set
[project].version = "X.Y.Z".
- Set
- Update
docs/source/conf.py:- Set
release = 'X.Y.Z'.
- Set
- Review
CHANGELOG.mdand make sure the release notes are accurate and user-facing. - Change the pending release heading from:
## [X.Y.Z] - Unreleasedto:## [X.Y.Z] - YYYY-MM-DD
- Keep a fresh empty
## [Unreleased]section at the top for future work. - Update the comparison links at the bottom of
CHANGELOG.md:- Point
[X.Y.Z]to the compare view from the previous tag tovX.Y.Z. - Point
[Unreleased]to the compare view fromvX.Y.ZtoHEAD.
- Point
- Run the test suite:
python -m pytest -q- Build the docs locally:
python -m pip install -e .[docs]
python -m sphinx -b html docs/source docs/build-
Confirm the docs build completes without warnings or import errors.
-
Build the release distributions:
python -m pip install --upgrade build
python -m build- Confirm
dist/contains both a wheel and source distribution.
- Commit the version, changelog, and any other release-prep changes.
- Push the release-prep commit to the branch or ref that will be used for TestPyPI validation.
- Do not create the final
vX.Y.Zrelease tag until after TestPyPI validation passes.
- Trigger
.github/workflows/publish-to-testpypi.ymlwith GitHub Actions. - After it completes, verify that the package can be installed from TestPyPI in a clean environment.
- Smoke test a basic import:
python -c "import magscope; print(magscope.__file__)"- Create and push the release tag as
vX.Y.Zif needed. - Create a GitHub Release for tag
vX.Y.Z. - Use the finalized changelog entry as the GitHub Release notes.
- Publish the GitHub Release.
- Confirm
.github/workflows/publish-to-pypi.ymlstarts and completes successfully.
- Verify the new version appears on PyPI:
https://pypi.org/project/magscope/
- Verify the GitHub Release page is correct.
- Verify the install command works for the released version in a clean environment.
- Verify Read the Docs pages render correctly:
https://magscope.readthedocs.io/en/latest/https://magscope.readthedocs.io/en/stable/
- Confirm the
stabledocs version has advanced to the new release and is not still pointing at an older build. - Confirm docs and README links still point to the correct package and release pages.
- Move any remaining items that missed the release back into
## [Unreleased].
- The package version currently lives in
pyproject.toml. - The docs release version currently lives in
docs/source/conf.py. - Release summaries live in
CHANGELOG.mdand follow Keep a Changelog style. - GitHub Actions workflows relevant to releases:
.github/workflows/tests.yml.github/workflows/publish-to-testpypi.yml.github/workflows/publish-to-pypi.yml
- PyPI publishing is triggered by publishing a GitHub Release.