This is a Cookiecutter template to create Python projects. It has been tailored by the Saez-Rodriguez Group at Universität Heidelberg.
This template provides tools to streamline setup and maintenance, letting you focus on your project instead of getting bogged down by technical details. It includes:
-
Documentation
- Material for MkDocs: A sleek, responsive theme for MkDocs documentation sites.
-
Code Quality/Automation
- Pre-commit hooks: A framework for managing and running code quality hooks before commits.
-
Release Management
- Bump2version: A tool to automate version number management in your project.
-
Testing
- Pytest: A powerful testing framework for writing and running Python tests.
Note: We strongly recommend you have the following pre-requisites before using this template.
| Pre-requisite | Description |
|---|---|
| uv | A high-performance tool for managing Python packages and virtual environments. |
| Cruft | A CLI tool to scaffold new projects using customizable templates. |
| GitHub CLI | A command-lIne tool to interact with GitHub repositories, issues, and workflows. |
In six easy steps you will have a ready to use Python project with batteries included.
1. Generate Your Project from the Template
Run the following command and follow the prompts in your terminal:
cruft create https://github.com/saezlab/python-project.git --checkout master2. Navigate to Your New Project Directory
cd <my-project> # replace with the name of your project3. Set Up and Activate a Virtual Environment using uv
uv venv .venv
source .venv/bin/activateThis creates and activates a lightweight virtual environment in
.venv.
4. Install Project Dependencies listed in the pyproject.toml file
Install all required and optional dependencies (development, testing, docs):
uv pip install ".[dev,tests,docs]"5. Install and update pre-commit hooks
git init
pre-commit install
pre-commit autoupdate6. Initialize Git and Push to GitHub
git add .
git commit -m "Initial commit"
gh repo create <GitHub-organization>/<my-project> --public --source=. --push🎉 Congratulations! Wishing you every success as you begin your project journey 🚀
Saez-Rodriguez Group Team!
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Python-project template has a BSD3 license, as found in the LICENSE file.