Level 3 / Project 15 - Level 3 Mini Capstone¶
Home: README
Learn Your Way¶
| Read | Build | Watch | Test | Review | Visualize | Try |
|---|---|---|---|---|---|---|
| — | This project | — | — | Flashcards | — | Browser |
Estimated time: 60 minutes
Focus¶
- junior-level production-style utility
Why this project exists¶
This project gives you level-appropriate practice in a realistic operations context. Goal: run the baseline, alter behavior, break one assumption, recover safely, and explain the fix.
Run (copy/paste)¶
Use <repo-root> as the folder containing this repository's README.md.
cd <repo-root>/projects/level-3/15-level3-mini-capstone
python project.py report .
python project.py report . --json
python project.py scan . --pattern "*.py"
pytest -q
Expected terminal output¶
Project Health: 15-level3-mini-capstone
Score: 90/100 (Grade: A)
==================================================
Files: 3
Total lines: 250
Code lines: 180
...
12 passed
Expected artifacts¶
- Health report on stdout
- Passing tests
- Updated
notes.md
Checkpoint: Baseline code runs and all tests pass. Commit your work before continuing.
Alter it (required) — Extension¶
- Add a
check_type_hintsfunction that flags functions missing type annotations. - Add a
--compareflag that compares two directories side by side. - Add a trend tracker that saves scores to a JSON file and shows improvement over time.
Break it (required) — Core¶
- Point it at a file instead of a directory — what error appears?
- Scan a directory with binary files (.pyc, .jpg) — do they cause errors?
- Run on an empty directory — does the score calculation handle division by zero?
Fix it (required) — Core¶
- Add clear error handling for non-directory input.
- Skip binary files gracefully with a warning.
- Handle empty directories without crashing.
Checkpoint: All modifications done, tests still pass. Good time to review your changes.
Explain it (teach-back)¶
- How does this capstone combine skills from projects 01-14?
- What is a "health score" and how do you weigh different issue severities?
- Why use
Path.rglob()for recursive scanning? - How would you extend this tool to check additional languages beyond Python?
Mastery check¶
You can move on when you can: - combine dataclasses, logging, argparse, and pathlib in one tool, - build composable health checks, - generate a scored report from metrics, - scan and analyse project structures recursively.
Related Concepts¶
| ← Prev | Home | Next → |
|---|---|---|