Pull requests automatically have pre-commit checks applied via
the pre-commit.ci Github application.
These checks will run automatically once the Github application is installed.
The checks run off the .pre-commit-config.yaml
file, and that file can be used to apply
additional config to the CI process.
Ensure that CHANGELOG.rst
is up-to-date with the correct version number and release date.
To create a new published release, follow the instructions here. Ensure you create the new tag to correspond with the release as required.
Always build the release from main
because ReadTheDocs builds documentation from main
,
so if another branch is used, then the documentation will be incomplete.
- Go to the Releases page
- Click 'Draft a new release'
- Choose or create a new tag
- Choose the desired branch (if not
main
) - Check 'Set as a pre-release' or 'Set as the latest release' as appropriate
- Generate release notes if desired.
- Click 'Publish release'
The release
github workflow will run and publish the release binaries to both test.pypi.org and pypi.org.
readthedocs integration is used to publish documentation. The webhook endpoint on readthedocs is configured using these instructions.
This is implemented using a Webhook defined in the Github repo (Settings / Webhooks).
readthedocs should be checked after each release to ensure that the docs have built correctly. Login to readthedocs.org to check that the build ran OK (click on 'Builds' tab).
For pre-releases, the release version has to be activated via the readthedocs UI before it can be built.
The build can fail on 'publish to PyPI' with errors such as:
`long_description` has syntax errors in markup and would not be rendered on PyPI.
This is because the README.rst contains syntax errors and cannot be rendered. You can check this with:
pip install readme_renderer
python setup.py check -r -s
If there are duplicate target names, you can correct this with underscores.