Files
025-squirrel/wiki/Description.md
T
Tirsvad 632fa61b89
Tests / Run the tests (pull_request) Successful in 42s
Move the wiki sources to wiki/ and tidy version history statuses
No issue closed: all issues of MIL-001 to MIL-004 are closed.
2026-10-13 15:43:56 +08:00

33 lines
1.3 KiB
Markdown

🌐 **English** · [Dansk](Description.da) · [Bahasa Melayu](Description.ms)
# Description
## What it does
The program follows the steps of the lecture:
1. `read_csv` reads the census file.
2. `count_by_fur_color` counts the sightings of Gray, Cinnamon and Black.
3. `build_summary` turns the counts into the rows of a summary.
4. `write_csv` writes the summary to `squirrel_count.csv`.
On the 2018 census file the result is Gray 2473, Cinnamon 392 and Black 103. Sightings without a fur colour are counted in none of them.
## Why no Pandas
The lecture uses Pandas. This project uses only the Python standard library (`csv` and `collections.Counter`) so that there is nothing to install to run it. The decision is recorded as ADR-0001 in the repository.
## Layout
| Path | Content |
| --- | --- |
| `src/squirrel/census.py` | The four steps above |
| `src/squirrel/cli.py` | The command line, `python -m squirrel` |
| `src/squirrel/constants.py` | Every literal, defined once |
| `tests/` | The pytest tests |
| `docs/` | Business case, plan, models, review records |
## Quality
Every document and every piece of code was reviewed against the checklists of the SQA and QC framework, in autonomous mode: the reviewer is an AI stand-in, so the reviews are not independent.