Template project, includes:
- Configuration of a python project, following the guideliness of HitChhiker's book 1
- Aggregated test reports (pytest style)
- SonarCloud static test (includes coverage results)
- Publish the package/lib in PyPI's
- Publish API documentation, generated from docstrings, to GitHub Pages
Publishing is handled by .github/workflows/publish.yml, which builds the package with Poetry and uploads it to PyPI using Trusted Publishing (OIDC) — no API token secret is stored in the repo.
To release a new version:
- Bump
versionunder[project]in pyproject.toml. - Commit and merge the version bump to
main. - Create a GitHub Release with tag
vX.Y.Zmatching thepyproject.tomlversion (e.g.v2024.1.0). Publishing the release triggers the workflow.
One-time setup (repo/PyPI admin only): on pypi.org, add a Trusted Publisher for this project
pointing at this GitHub repo, workflow file publish.yml, and environment pypi.
API docs are generated from the code's docstrings with Sphinx (autodoc + autosummary)
and published to GitHub Pages by
.github/workflows/docs.yml on every push to main. Sources live under
docs/; nothing needs to be regenerated by hand — new modules and docstrings show up automatically on the
next push.
See the general contribution policies and guidelines for giis-uniovi at CONTRIBUTING.md.
Footnotes
-
Reitz, K., & Schlusser, T. (2016). The Hitchhiker's guide to Python: best practices for development. " O'Reilly Media, Inc.". ↩