Cookiecutter template for a Python package based on the Hypermodern Python article series.
✨📚✨ Read the full documentation
cookiecutter gh:bmritz/cookiecutter-hypermodern-python
cd <created directory>
git init
git branch -M main
# Open `noxfile.py` and change `python_version_default` to a version of python installed on your machine.
make install
If you see:
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)>
Go to /Applications/Python3.x and run 'Install Certificates.command'
- Set the appropriate Github Actions Secrets in Github.
- Check the Release Workflow to see what secrets need to be set for successful release. Secrets will look something like
${{ secrets.<> }}
in that file. - Note:
${{ secrets.GITHUB_TOKEN }}
is set up automatically by Github Actions on each run in a typical set up.
- Check the Release Workflow to see what secrets need to be set for successful release. Secrets will look something like
- Log into readthedocs.io (log in with github username, and authorize readthedocs to read the repository)
- Select your newly created repository to track for builds
- Packaging and dependency management with Poetry
- Test automation with Nox
- Linting with pre-commit and Flake8
- Continuous integration with GitHub Actions
- Documentation with Sphinx, MyST, and Read the Docs 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 isort
- Testing with pytest
- Code coverage with Coverage.py
- Coverage reporting with Codecov
- Command-line interface with Click
- Static type-checking with mypy
- Runtime type-checking with Typeguard
- Automated Python syntax upgrades with pyupgrade
- Security audit with Bandit and Safety
- 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.8, 3.9, 3.10, and 3.11