29 - Levels 3 to 5 Deep Guide (Competent to Strong Builder)¶
Home: README
Path placeholder: <repo-root> means the folder containing this repository's README.md.
This guide upgrades you from script author to disciplined engineer.
Objective¶
Build reusable, testable, maintainable Python tools with consistent quality checks.
Required docs¶
- 09_QUALITY_TOOLING.md
- 05_AUTOMATION_FILES_EXCEL.md
- projects/level-3/README.md
- projects/level-4/README.md
- projects/level-5/README.md
Standard quality run pattern (copy/paste)¶
cd <repo-root>/projects/level-3/01-package-layout-starter
python project.py --input data/sample_input.txt --output data/output_summary.json
ruff check .
black --check .
pytest -q
Expected output:
Per-project sequence¶
- Run baseline script.
- Run tests.
- Run
ruffandblack --check. - Improve one quality dimension:
- module structure,
- logging clarity,
- validation strictness,
- test depth.
- Add one failure-path test.
- Re-run full checks until clean.
Common failure patterns and direct fixes¶
- Failure: tests pass once and fail on rerun.
- Fix: remove hidden state and reset generated files in tests.
- Failure: code works on your machine only.
- Fix: document setup assumptions in README and pin dependencies.
- Failure: logs exist but are not actionable.
- Fix: log run id, input path, counts, and final status.
Weekly minimum deliverable¶
Per week, complete at least: 1. Three finished projects. 2. Three new or improved tests. 3. Three break/fix notes with root cause.
Exit gate (must pass before level 6)¶
- You can refactor a large function into smaller units.
- You can explain why each critical test exists.
- You can handle malformed input without crashing.
- You can produce readable run summaries in logs.