A simple Cookiecutter template for scaffolding Python packages and apps. The goal is to provide sane defaults for any application.
- Packaging and dependency management with Poetry
- Ready to use CUDA DEVCONTAINER with devcontainers
- Task running with Poe the Poet
- Scaffolding updates with Cookiecutter and Cruft
- Documentation generation with Mkdocs and
mkdocstrings
- Simple Gitignore for working with Python / PyCharm / VSCode / ...
- Default EditorConfig for Python and miscellaneous files
- Uses Google-style docstrings or NumPy-style
- Ready to use Docker images as a base CI/CD
- Cross-platform support for Linux, macOS (Apple silicon and Intel), and Windows
- Automatic dependency updates with RenovateBot
- Install Cruft and Cookiecutter
- Run:
cruft create -f https://github.com/prescriptiveanalytics/python-package-template
- Ensure
poetry.lock
file is generated (by running poetry install) - Install the environment with
poetry install
and create a container usingdocker build -f Dockerfile-test .
- [Optional] Update your project template by running
cruft update
Parameter | Description |
---|---|
package_name "My Awesome Proect" |
The name of the package. Will be slugified to snake_case for importing and kebab-case for installing. |
package_description "A single sentence description" |
A single-line description of the package. |
package_url "https://gitdma.risc-software.at//<package_name>" |
The URL to the package's repository. |
author_name "Sonja Sunshine" |
The full name of the primary author of the package. |
author_email "sonja.sunshine@risc-software.at" |
The email address of the primary author of the package. |
python_version "3.11" |
The minimum Python version that the package requires. |
docstring_style ["Google", "Numpy"] |
Whether to use and validate NumPy-style or Google-style docstrings. |
- precommit Runs formatting, linting, and import sorting
- check Checks if formatting, linting and import sorting are corrcet
- test Runs all unit tests and doctests
- docs Serves documentation in the
docs
folder, also generates API docs from docstrings