Skip to content

Commit 7f226f3

Browse files
committed
docs: document the starter workflow
Explain the default commands and add a compact PR template for review hygiene.
1 parent 5f5c8c5 commit 7f226f3

2 files changed

Lines changed: 94 additions & 0 deletions

File tree

.github/pull_request_template.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## Summary
2+
3+
- What changed?
4+
- Why does it matter?
5+
6+
## Testing
7+
8+
- [ ] `make check`
9+
- [ ] `make build`
10+
- [ ] Other:
11+
12+
## Checklist
13+
14+
- [ ] Scope is small and reviewable
15+
- [ ] Docs updated if needed
16+
- [ ] No unrelated changes included
17+
18+
## Notes
19+
20+
- Breaking changes:
21+
- Follow-ups:

README.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,74 @@
11
# python-template
2+
3+
A minimal Python template with strict defaults for projects that want to stay small, typed, and
4+
easy to maintain.
5+
6+
## What this template includes
7+
8+
- `uv` for dependency and lockfile management
9+
- `src/` layout with Hatchling-based packaging
10+
- Click-powered CLI entry point
11+
- Ruff, Pyright, and pytest configured as the default quality bar
12+
- GitHub Actions for CI, build validation, and tag-based release artifacts
13+
14+
## Quickstart
15+
16+
```bash
17+
uv sync --group dev
18+
make check
19+
python -m python_template --help
20+
```
21+
22+
## Core commands
23+
24+
| Command | Purpose |
25+
| --- | --- |
26+
| `make setup` | Install runtime dependencies |
27+
| `make setup-dev` | Install runtime and development dependencies |
28+
| `make format` | Format the codebase with Ruff |
29+
| `make lint` | Run Ruff lint checks |
30+
| `make lint-fix` | Run Ruff and apply safe fixes |
31+
| `make typecheck` | Run Pyright in strict mode |
32+
| `make test` | Run pytest |
33+
| `make test-cov` | Run pytest with coverage |
34+
| `make check` | Run format, lint, typecheck, and tests |
35+
| `make build` | Build the wheel and sdist |
36+
| `make lock` | Refresh `uv.lock` without upgrading |
37+
| `make update` | Upgrade dependencies and refresh `uv.lock` |
38+
39+
## Project layout
40+
41+
```text
42+
.
43+
├── .github/workflows/
44+
├── src/python_template/
45+
├── tests/
46+
├── .pre-commit-config.yaml
47+
├── Makefile
48+
├── pyproject.toml
49+
└── uv.lock
50+
```
51+
52+
## Quality defaults
53+
54+
This template is intentionally strict:
55+
56+
- **Ruff** enforces formatting, imports, docstrings, naming, typing hygiene, and common bug-prone
57+
patterns.
58+
- **Pyright** runs in `strict` mode.
59+
- **pytest** is the default regression layer.
60+
61+
The goal is to start from a clean baseline and relax rules only when a real project constraint
62+
demands it.
63+
64+
## GitHub Actions
65+
66+
The repository ships with three small workflows:
67+
68+
- `ci.yml` — lint, typecheck, and test on Python 3.11–3.13
69+
- `build.yml` — build the package and smoke-test the generated wheel
70+
- `release.yml` — build and upload release artifacts for version tags
71+
72+
## License
73+
74+
MIT.

0 commit comments

Comments
 (0)