python-template
This project is an opinionated python template.
Usage
This project uses:
- poetry for dependency management and packaging.
- poethepoet for task running.
- pytest for testing.
- black for auto-formatting.
- mypy for static type checking.
- pre-commit for git hooks.
- ruff for linting.
- mkdocs for documentation.
Ensure you have installed the relevant dependencies before continuing.
Install dependencies
poetry install
Run tests
poetry run poe test
GitHub Actions Setup
Validation Workflow
CodeCov.io
The workflow is automatically setup to pass along coverage reports to CodeCov.io.
You must set the CODECOV_TOKEN secret in your repository settings.
Otherwise, disable the routine in the .github/workflows/validate.yaml file.
Publishing Workflow
Ensure you have Discussions enabled in your repository settings,
or remove discussion_category_name from the .github/workflows/publish.yaml file.
PyPi
The workflow is automatically setup to publish to PyPi.
You must set the POETRY_PYPI_TOKEN_PYPI secret in your repository settings.
Otherwise, disable the routine in the .github/workflows/publish.yaml file.
