A modern Python project template with integrated tooling for development, testing, and documentation.
This template uses:
- Copier - For templating and project generation
- uv - For package and dependency management
- MkDocs - For documentation with GitHub Pages deployment
- pytest - For testing with code coverage via pytest-cov
- pre-commit - For enforcing code quality with ruff and codespell
├── .github/workflows/ # GitHub Actions workflows, automates MkDocs deployment to github-pages
├── .devcontainer/ # VS Code Development container configuration
├── .vscode/ # VS Code project settings
├── src/ # Source code
├── tests/ # Test files
└── pyproject.toml # Project metadata and tool configurations
-
Install Copier if needed:
uv tool install copier -
Create new GitHub repository and clone locally
-
Copy the project template into the local repo folder:
copier copy https://github.com/harryeslick/pyTemplate path/to/destination
To enable automatic MkDocs deployment to GitHub Pages:
-
Go to repository Settings → Actions → Workflow permissions
- Enable "Read and write permissions" to allow the workflow to create the gh-pages branch
-
Go to Settings → Pages
- Set the source to the automatically generated
gh-pagesbranch
- Set the source to the automatically generated
# Setup virtual environment and install dependencies
uv sync
# Install pre-commit hooks
pre-commit install-hooks- Open project folder in VS Code
- Install the "Remote - Containers" extension
- Click "Reopen in Container" or run the "Remote-Containers: Reopen in Container" command