A modern Copier template for scaffolding Python packages and apps.
- π§βπ» One-click development environments with Dev Containers and GitHub Codespaces
- π Cross-platform support for Linux, macOS, and Windows
- π Modern shell prompt with Starship
- π¦ Packaging and dependency management with uv
- π Installing from and publishing to PyPI
- β‘οΈ Task running with Poe the Poet
- π Code formatting with Ruff
- β Code linting with Pre-commit, Mypy, and Ruff
- π· Optionally follow the Conventional Commits standard
- π¦ Release new versions with Semantic Versioning and Keep A Changelog using Commitizen
- π Verified commits with GPG
- β»οΈ Continuous integration with GitHub Actions or GitLab CI/CD
- π§ͺ Test coverage with Coverage.py
- π§° Dependency updates with Dependabot
Tip
You should first install uv to be able to run the commands below.
To create a new Python project with this template, run:
uvx copier copy gh:superlinear-ai/substrate path/to/local/repository
To update your Python project to the latest template version, run:
uvx copier update
If you have enabled Conventional Commits, you can create a new version tag and update CHANGELOG.md
based on your commit messages with:
git checkout main
cz bump
git push origin main --tags
Important
This project was formerly known as Poetry Cookiecutter
and was based on Poetry and Cookiecutter. We will continue to support the original Cookiecutter-based template side by side with the new Copier-based template. However, we do encourage users to upgrade to the new Copier-based template by following the instructions below.
To migrate a project from Cookiecutter to Copier, follow these steps:
-
In your project repository, run:
# Create a new branch git checkout -b rescaffold # Remove files specific to Poetry rm -f poetry.lock # Rescaffold the project without changing src/ and tests/ uvx copier copy --overwrite --exclude src/ --exclude tests/ gh:superlinear-ai/substrate .
-
Review the changes to
pyproject.toml
and reinsert your project's dependencies. -
Review the changes to
README.md
and reinsert your project's documentation. -
Commit and push all changes with:
# Stage all changes git add . # Commit the staged changes git commit -m "build: upgrade scaffolding" # Push the committed changes git push origin rescaffold
-
Create a PR from your branch, review it, and merge it!