Modern Python project template with Poetry, Makefile workflows, automated testing, linting, and GitHub Actions CI/CD.
All notable changes to this project will be documented in CHANGELOG.
Supports Python 3.12, 3.13
Click βUse this templateβ on GitHub or:
mkdir new_repo_name
cd new_repo_name
git init
git pull https://github.com/kyhau/python-repo-template
Update these files:
pyproject.toml - Package name, version, dependenciesMakefile - Set PACKAGE_NAME and TEST_PATH variablesREADME.md - Replace with your project descriptionapp/ - Rename to your package nameQuick setup (recommended for first-time setup):
make setup-init
Manual setup (if you prefer step-by-step):
make setup-venv # Configure Poetry to use local virtualenv
make install-all # Install all dependencies
make setup-init # First-time setup (configure, lock, install everything)
make help # Show all available commands
make install-all # Install all dependencies (main, dev, test)
make test # Run tests without coverage
make test-with-coverage # Run tests with coverage
make format-python # Auto-format Python code
make lint-python # Lint Python code
make lint-yaml # Lint YAML files
make pre-commit # Run all quality checks (format, lint, test)
make build # Build the package
make clean # Clean build artifacts
# Run tests with coverage
make test-with-coverage
# Run tests only
make test
# Format and lint code
make format-python
make lint-python
make lint-yaml
# Update dependencies to latest compatible versions
make update-deps
# Regenerate lock file
make lock
python-repo-template/
βββ .github/
β βββ workflows/ # CI/CD workflows
β βββ dependabot.yml # Dependency updates config
βββ app/ # Your Python package
β βββ __init__.py
β βββ main.py
βββ tests/ # Unit tests
β βββ test_main.py
βββ pyproject.toml # Project metadata and dependencies
βββ Makefile # Build and test commands
βββ README.md # This file
# Build the package
make build
# The built package will be in dist/
ls dist/