Opinionated cookiecutter for Python packages.
Packages created from this template get following features:
- CI with GitHub Actions
- Trusted Publishing to PyPI with GitHub Actions
- Signed release files using sigstore
- Pre-configured nox for testing (pytest), autoformatting and auto linting (ruff)
- Testing against multiple Python versions, operating systems, and optionally, Django versions
- Testing utils for testing ApiVer interfaces
- Package layout and release process with SemVer & ApiVer in mind
- Commitizen for version management and changelog generation
- CI for cookiecutter template itself
- CD should require CI tests to pass first
- excluding some django-python combos in nox test matrix (allow to test of Django5+Python3.12 and Django4+Python3.9 but not Django5+Python3.9)
- Contributing guidelines
- PR templates
- ability to build binary & python version-specific wheels
cruft is used to manage the template, you can install it with:
uv tool install cruft- Setup empty repository on GitHub
- Run:
cruft create https://github.com/reef-technologies/cookiecutter-rt-pkg- Configure Trusted Publishers to allow GitHub Actions to publish to PyPI, follow instructions in {{cookiecutter.package_name}}/.github/workflows/publish.yml
cruft updateBefore committing make sure to review changes listed in docs/3rd_party/cookiecutter-rt-pkg/CHANGELOG.md.
If you have an existing repo, you can link it to the template by running:
cruft link https://github.com/reef-technologies/cookiecutter-rt-pkgWhen proposing new features or changes, make sure to consider the context of the application template cookiecutter-rt-django as well. It is important we do not try to solve the same problem in two different ways.
Please follow Conventional Commits when creating commits. Commitizen may be used to generate commit messages:
uv tool install "commitizen==4.13.9"
git add ...
cz commitTo make a stable release, run:
cz bump # update changelog, make bump commit and tag it
git push origin HEAD --follow-tagsThis project is licensed under the terms of the BSD-3 License
Breaking changes are documented in the CHANGELOG