Skip to content

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

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:

All checks passed!
would reformat 0 files
2 passed

Per-project sequence

  1. Run baseline script.
  2. Run tests.
  3. Run ruff and black --check.
  4. Improve one quality dimension:
  5. module structure,
  6. logging clarity,
  7. validation strictness,
  8. test depth.
  9. Add one failure-path test.
  10. Re-run full checks until clean.

Common failure patterns and direct fixes

  1. Failure: tests pass once and fail on rerun.
  2. Fix: remove hidden state and reset generated files in tests.
  3. Failure: code works on your machine only.
  4. Fix: document setup assumptions in README and pin dependencies.
  5. Failure: logs exist but are not actionable.
  6. 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)

  1. You can refactor a large function into smaller units.
  2. You can explain why each critical test exists.
  3. You can handle malformed input without crashing.
  4. You can produce readable run summaries in logs.

Primary Sources

Optional Resources

Next

Next: 30_LEVEL_6_TO_8_DEEP_GUIDE.md →