CI/CD and Read the Docs¶
This project is designed to be:
tested on every pull request
able to build documentation in CI and on Read the Docs
publishable to PyPI via GitHub Actions
GitHub Actions¶
Two workflows are provided:
CI: runs unit tests, checks that code compiles, builds the docs, and builds the Python package artifacts.
Publish: on tagged releases, builds and uploads distributions to PyPI.
See .github/workflows/.
Read the Docs¶
Read the Docs is configured via .readthedocs.yaml to:
Install the package with the
docsextra.Build documentation using
docs/conf.py.
If you change doc dependencies, update:
pyproject.toml([project.optional-dependencies].docs).readthedocs.yaml
PyPI publishing¶
The publish workflow is written to support PyPI “trusted publishing” (OIDC).
To enable uploads:
Create a project on PyPI with the same name as
pyproject.toml(torus-solver).Configure the repository as a trusted publisher on PyPI.
Tag a release, e.g.
v0.1.0.
Note
If you prefer API tokens instead of OIDC, you can adapt the workflow to use TWINE_PASSWORD / PYPI_API_TOKEN secrets. OIDC is recommended for security.