Skip to content

saezlab/python-project

Repository files navigation

Python project template (Saez-Rodriguez Group)

Description

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

  • 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.

Pre-requisites

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.

How-to use this template?

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 master

2. Navigate to Your New Project Directory

cd <my-project> # replace with the name of your project

3. Set Up and Activate a Virtual Environment using uv

uv venv .venv
source .venv/bin/activate

This 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 autoupdate

6. 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!

Contributing

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.

License

Python-project template has a BSD3 license, as found in the LICENSE file.

About

Python project template

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages