| 1 |
Packages, modules, functions, variables, classes and constants follow PEP 8 casing (snake_case, PascalCase, UPPER_SNAKE) (Mandatory) |
Pass |
Modules, functions and constants use snake_case and UPPER_SNAKE; helper _build_parser has one leading underscore. |
| 2 |
Names state purpose in the domain's language; no unexplained abbreviations, no single-letter names outside tiny scopes (Mandatory) |
Pass |
Names state purpose (count_by_fur_color, write_csv); the lecture step names are kept (ADR-0001). |
| 3 |
Code is produced by the project's formatter and passes its linter with no unexplained suppressions (Mandatory) |
Pass |
ruff check and ruff format --check (0.17.0) pass with no suppressions. |
| 4 |
Every function and method signature is type-annotated, including -> None (Mandatory) |
Pass |
Every function is annotated including -> None; mypy --strict passes on 10 files. |
| 5 |
No bare except:, no swallowed exceptions; specific exceptions are raised and the cause is kept (raise ... from) (Mandatory) |
Pass |
No exception handling; a missing file is checked with is_file() and reported with exit status 2. |
| 6 |
No mutable default arguments and no shadowed builtins (Mandatory) |
Pass |
The only default argument is the immutable tuple FUR_COLORS; no builtin is shadowed. |
| 7 |
Files, locks and connections are managed with context managers (Mandatory) |
Pass |
Files are opened with with path.open(...). |
| 8 |
Public modules, classes and functions have docstrings that say what, not how (Optional) |
Pass |
Public modules and functions have Doxygen blocks and docstrings. |
| 9 |
Logging uses logging, not print; no secrets or personal data in log output (Mandatory) |
Pass |
print is used only for the CLI output to the participant and the stderr error line, not for logging; no secrets. |
| 10 |
Classes and operations trace to the Design Class Diagram they implement; deviations are recorded (Mandatory) |
N-A |
No class is defined and no Design Class Diagram exists; operations trace to SSD-001 (countByFurColor). |
| 11 |
Tests exist for new behaviour, are named for the behaviour, and do not depend on order or the network (Mandatory) |
Pass |
20 tests: unit tests per function, CLI tests, a real-census test and an imports test; none depends on order or network. |
| 12 |
Type checker runs in strict mode without errors; Any is justified in a comment (Optional) |
Pass |
mypy 2.4.0 --strict reports no issues. |
| 13 |
Dependencies are declared and pinned in the project's dependency file, none unused (Optional) |
Pass |
No runtime dependency; dev tools pinned in pyproject.toml. |
| 14 |
Each piece of knowledge (a business rule, constant, format, validation or query) is defined in one place; code is merged only where it expresses the same knowledge, not where it merely looks alike (Mandatory) |
Pass |
All literals live in constants.py; each step is defined once. |
| 15 |
Imports point inward: business-rule modules import no framework, database, UI or delivery-mechanism code, and there are no import cycles (Mandatory) |
Pass |
census.py imports only the standard library and constants; cli.py imports census; no cycle. |
| 16 |
SOLID holds: a class or module has one reason to change; new behaviour is added by extension, not by editing a type test in several places; subclasses honour the contract of their base; protocols are narrow; high-level code depends on protocols or abstract types and receives its implementations (Mandatory) |
Pass |
census.py holds four single-purpose functions; the CLI only wires them. |