Tired of overloaded python templates? This template is for you!
This demo repository shows the template in action.
✅ uv for efficient dependency management
Note: Need Conda as base environment for data Science and ML Projects? Switch to the conda
Branch!
✅ Pre-Commit for enforcing code quality
✅ CI/CD with Pre-Commit CI and GitHub Actions
✅ Light-weight Documentation with pdoc with deployment to GitHub Pages
-
Install uv, e.g. with homebrew:
brew install uv
-
Run the following command:
uvx cookiecutter gh:MoritzM00/python-template
or
uvx cookiecutter -c conda gh:MoritzM00/python-template
to get the conda template.
- Python >= 3.10
- uv
The code is tested for python versions 3.10 and 3.11 on Linux and version 3.10 on macOS.
After you generated your project with the template (see above), you need to do the following steps:
-
Setup your environment by executing
make setup source .venv/bin/activate
and then create a commit (must include the
uv.lock
file):git add . git commit -m "initial commit"
-
Push your local repository to Github with the Github CLI: For this, run
gh repo create
to interactively create a new repository on Github.
- Enable Pre-Commit CI for your repository.
- Enable Github Pages for your documentation. To do that, go to the Settings tab of your repository and scroll down to the Pages section. For the Source option, select GitHub Action.