Cookiecutter for setting up poetry projects with all of the below features.
- Packaging with poetry
- Formatting and linting with ruff
- Static typing with mypy
- Testing with pytest
- Git hooks that run all the above with pre-commit
- Continuous Integration with GitHub Actions
- Code coverage with Codecov
While all of the steps are automated, you will need to install poetry
.
Additionally, pipx
is recommended for installing any command line tools.
python3 -m pip install pipx
pipx ensurepath
# Install poetry and cookiecutter using pipx
pipx install poetry cookiecutter
# Use cookiecutter to create project from this template
pipx run cookiecutter gh:jevandezande/poetry-cookiecutter
The cookiecutter will automagically
- Generate a project with the input configuration
- Initialise git
- Install dependencies
- Setup pre-commit and pre-push hooks
- Make initial commit
- Setup remote on GitHub (optional)
Make a config file (see template_config.yml) with
default settings and save it as a .cookiecutterrc
or use it directly via:
--config-file cookiecutter.yml
Install act to run GitHub Actions locally.
Read notes for more tips.