A starting point for small Python projects.
It keeps the default setup in one place. It uses text files, predictable tooling, and the same checks in local development and CI.
src/andtests/layout, ready for a package- Poetry for dependency management
- Ruff for linting and formatting
- Mypy in strict mode
- Pytest with coverage
- Pre-commit hooks that run the same checks as CI
- GitHub Actions for code style and tests
.editorconfigfor consistent formatting across editors- Issue and PR templates
- Semantic version releases from conventional commits
- Python 3.14, Poetry
- Ruff, Mypy, Pytest
- Click Use this template on GitHub (or
git cloneand re-init). - Rename the package in
pyproject.toml([tool.poetry] nameandpackages). - Replace this README with one for your actual project.
- Update
LICENSEcopyright year/name if needed.
poetry install
poetry run pre-commit installInstall Python 3.14 if it is not installed:
brew install python@3.14Point Poetry at it and create the virtual environment:
poetry env use 3.14
poetry installActivate it in your shell:
eval"$(poetry env activate)"To deactivate:
deactivatepoetry run <command> works without activating the environment. Use activation only if you want python or pytest to resolve directly.
poetry run ruff check .
poetry run mypy src
poetry run pytest tests --cov=srcThese checks run in CI on every pull request. See CONTRIBUTING.md.
Every push to main runs semantic-release. It reads commit messages, decides the version bump, and creates a vX.Y.Z tag with a draft GitHub release.
| Commit prefix | Bump |
|---|---|
fix: | patch |
feat: | minor |
feat!: / BREAKING CHANGE: in body | major |
docs:, test:, ci:, refactor: | none |
