A personal copier template for bootstrapping
Python projects with the Astral toolchain — uv, ruff, ty — plus pytest,
all pre-configured.
# One-time: install copier
uv tool install copier
# Generate a new project
copier copy --UNSAFE gh:kaparoo/python-project-template my-new-project--UNSAFE is required because the template runs post-generation tasks
(git init, uv lock, uv sync, and an initial commit). Review
copier.yml before trusting it.
Pull later template improvements into an existing project:
cd my-new-project
copier update --UNSAFEThe .copier-answers.yml file in each generated project records the
answers, so copier update can re-render against newer template
versions without losing your customizations.
copier copy prompts for the following:
| Question | Type | Default | Notes |
|---|---|---|---|
project_name |
str | (required) | PEP 503 form — lowercase, hyphens |
project_description |
str | "" |
One-line summary |
package_name |
str | derived | snake_case of project_name |
author_name |
str | Jaewoo Park |
Used in pyproject + LICENSE |
author_email |
str | kaparoo2001@gmail.com |
|
github_username |
str | kaparoo |
|
repo_name |
str | {{ project_name }} |
|
python_version |
choice | 3.14 |
3.12 / 3.13 / 3.14 |
license_year |
int | 2026 |
Copyright year |
is_library |
bool | true |
Adds [build-system] + py.typed |
use_pytest |
bool | true |
Adds tests/ + pytest config |
is_library = falseproduces an application (no build system, nopy.typedmarker); uv treats it as a non-distributable project.use_pytest = falseomits the entire pytest layer (tests/, config, ruffPTrule) — useful for ML/DL projects where deterministic test workflows are impractical.
.
├── copier.yml ← questions, tasks, after-action messages
├── pyproject.toml ← workspace dev tooling (copier + pytest + ruff)
├── template/ ← files rendered into generated projects
│ ├── pyproject.toml.jinja
│ ├── {{ package_name }}/
│ └── ...
├── tests/ ← tests for the template itself
└── AGENTS.md ← guide for AI assistants working on this repo
git clone https://github.com/kaparoo/python-project-template
cd python-project-template
uv sync --group dev
uv run pytest # generation-scenario testsCommit messages use an emoji prefix and wrap package/tool names in backticks:
<emoji> <Imperative summary; tool names in `backticks`>
<Optional body explaining *why*>
| Emoji | When |
|---|---|
| 🔧 | Configuration / settings (catch-all) |
| ✨ | New feature |
| 🔄 | Migration (e.g. mypy → ty) |
| 📝 | Documentation |
| ♻️ | Restructure without behavior change |
| 🐛 | Bug fix |
| 🔥 | Remove code or files |
| 🧹 | Cleanup (remove redundancy) |
| 🎨 | Cosmetic (whitespace, alignment) |
| 🙈 | .gitignore change |
| 📄 | License / legal text |
| ✅ | Tests added or fixed |
| ⬆️ / ➕ / ➖ | Dependency bump / add / remove |
| 💥 | Breaking change |
| 🎉 | Initial commit |
Keep commits single-purpose, don't rewrite published history, and don't skip git hooks.
AI coding assistants working on this repository additionally follow
AGENTS.md for workflow rules and the toolchain
rationale they must respect.
See CHANGELOG.md for the template's version history.
The pytorch branch keeps an independent variant changelog with its
own pytorch-v* tag line.
This project is distributed under the terms of the MIT license.