Cookiecutter template for a Python package based on the Hypermodern Python article series. This repo is a fork of cookiecutter-hypermodern-python, and adjusted for use in Statistics Norway.
✨📚✨ Read the full documentation
Use Cruft to create and update an instance of this template.
cruft create https://github.com/statisticsnorway/ssb-pypitemplate.git --checkout=2024.11.27
Cruft downloads the template, and asks you a series of questions about project variables, for example, how you wish your project to be named. Further details and a complete list of project variables with explanation can be found in the Creating a project section of the user guide.
To check if there are there are template updates and update your instance with the new updates, run the following commands from the root directory:
cruft check
cruft update
- Packaging and dependency management with Poetry
- Test automation with Nox
- Linting with pre-commit and ruff
- Continuous integration with GitHub Actions
- Documentation with Sphinx, MyST, and GitHub Pages using the furo theme
- Automated uploads to PyPI and TestPyPI
- Automated release notes with Release Drafter
- Automated dependency updates with Dependabot
- Code formatting with Black and Prettier
- Import sorting with ruff
- Testing with pytest
- Code coverage with Coverage.py
- Coverage reporting with SonarCloud
- Command-line interface with Click
- Static type-checking with mypy
- Runtime type-checking with Typeguard
- Automated Python syntax upgrades with ruff
- Security audit with ruff
- Check documentation examples with xdoctest
- Generate API documentation with autodoc and napoleon
- Generate command-line reference with sphinx-click
- Manage project labels with GitHub Labeler
The template supports Python 3.10, 3.10 and 3.12.