Skip to content

Commit aeec943

Browse files
committed
docs(standard): address review: drop the research note, the template carve-out, the justfile copy, and all exemptions but that-depends
1 parent 354baa0 commit aeec943

3 files changed

Lines changed: 7 additions & 243 deletions

File tree

‎docs/research/2026-09-11-code-standards-vs-community-of-python.md‎

Lines changed: 0 additions & 193 deletions
This file was deleted.

‎docs/standard.md‎

Lines changed: 7 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ tooling, CI, and agents can rely on it.
1313
**Core repositories** are the libraries: every repo that publishes a package to PyPI under the
1414
org. The core applies to them in full.
1515

16-
**Templates and applications** (`fastapi-sqlalchemy-template`, `litestar-sqlalchemy-template`,
17-
`chat-app`) run their tests through Docker Compose and are not published. They follow sections
18-
1, 2 (without `publish`), 3, 4, 9 and the README rule in section 10; sections 5 through 8 and 11 do
19-
not apply.
20-
2116
`that-depends` is exempt from the core as a whole; see [Exemptions](#exemptions).
2217

2318
## 1. Toolchain
@@ -35,40 +30,9 @@ typing stubs. CI installs both; a library's runtime dependencies never include e
3530

3631
## 2. The justfile
3732

38-
Recipe names and their semantics are fixed. CI calls only these names, so a repo may add recipes
33+
Recipe names and their contracts are fixed. CI calls only these names, so a repo may add recipes
3934
freely but may not rename or repurpose these.
4035

41-
```just
42-
default: install lint test
43-
44-
install:
45-
uv lock --upgrade
46-
uv sync --all-extras --frozen --group lint
47-
48-
lint:
49-
uv run eof-fixer .
50-
uv run ruff format
51-
uv run ruff check --fix
52-
uv run ty check
53-
54-
lint-ci:
55-
uv run eof-fixer . --check
56-
uv run ruff format --check
57-
uv run ruff check --no-fix
58-
uv run ty check
59-
60-
test *args:
61-
uv run --no-sync pytest {{ args }}
62-
63-
test-ci:
64-
uv run --no-sync pytest --cov=. --cov-report term-missing --cov-report xml --cov-fail-under=100
65-
66-
publish:
67-
rm -rf dist
68-
uv version $GITHUB_REF_NAME
69-
uv build
70-
uv publish
71-
```
7236

7337
| Recipe | Contract |
7438
|---|---|
@@ -84,8 +48,8 @@ Compose; the recipe name and the pass-through of arguments stay the same.
8448

8549
## 3. Ruff
8650

87-
The canonical block. Add per-file ignores below it for what a repo genuinely needs; do not edit the
88-
`ignore` list itself.
51+
The canonical block. Its `ignore` list is the minimum: a repo may add ignores it needs, each with
52+
a one-line reason, and may not remove one.
8953

9054
```toml
9155
[tool.ruff]
@@ -114,9 +78,8 @@ isort.no-lines-before = ["standard-library", "local-folder"]
11478

11579
`target-version` is omitted: ruff derives it from `requires-python`.
11680

117-
Three ignores that appear in older copies of this block are **not** part of it, because measured
118-
across the org they suppress nothing: `G004`, `TRY003`, `EM102`. Remove them when you touch a
119-
repo.
81+
Three ignores that appear in older copies of this block suppress nothing measured across the org:
82+
`G004`, `TRY003`, `EM102`. Drop them when you touch a repo.
12083

12184
## 4. Type checking
12285

@@ -166,9 +129,7 @@ Both call one reusable `checks.yml` with these jobs:
166129

167130
The shared `checks.yml` will live in `modern-python/.github` and be referenced at `main`, so a
168131
change to it reaches every repo on merge; such a change is first exercised from a branch ref in
169-
one repo. Until it exists, each repo carries the same jobs in a local `_checks.yml`. A repo whose
170-
tests need a service container keeps a local `pytest` job and calls the shared workflow for the
171-
rest.
132+
one repo. Until it exists, each repo carries the same jobs in a local `_checks.yml`.
172133

173134
## 8. Release
174135

@@ -247,10 +208,7 @@ purpose-first, about 120 characters at most, no trailing period.
247208

248209
| Repo | Exempt from | Why |
249210
|---|---|---|
250-
| `that-depends` | the core as a whole (mypy strict and pyrefly instead of ty; Read the Docs instead of GitHub Pages; `publish.yml` on release-published; own justfile recipes) | The org's most-used package, the only repo with steady external contributor traffic, and its own agent guidance forbids carrying conventions across from `modern-di`. It does adopt the 100 % coverage gate. |
251-
| `faststream-outbox`, `faststream-redis-timers` | `ANN401` | `typing.Any` is the honest annotation at the broker boundary; 49 and 19 sites respectively. Narrowed from a blanket `ANN` ignore. |
252-
| `fastapi-sqlalchemy-template`, `litestar-sqlalchemy-template`, `chat-app` | sections 5–8, 11 | Not packages; tests run through Docker Compose; see Scope. They additionally ignore `INP`, `B008` and `S105` for framework idioms and test fixtures. |
253-
| `db-retry`, `faststream-redis-timers`, `faststream-concurrent-aiokafka`, `modern-di-arq` | the shared `pytest` job | Tests need a service container (PostgreSQL, Redis, Redpanda); the `pytest` job stays local, the rest is shared. |
211+
| `that-depends` | the core as a whole | The org's most-used package and the only repo with steady external contributor traffic; it keeps its own tooling rather than converging. It does adopt the 100 % coverage gate. |
254212

255213
An exemption is granted by a pull request to this repo that adds the row. Drift that nobody
256214
recorded is not an exemption.

‎mkdocs.yml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ exclude_docs: |
99
DEPLOYMENT.md
1010
/agents/
1111
/adr/
12-
/research/
1312
1413
theme:
1514
name: material

0 commit comments

Comments
 (0)