Home: README
- Learners who can code basics and now need reliability and repeatability.
- Anyone preparing to share tools with teammates.
- A reusable Python project template.
- A quality workflow: format, lint, test, run, release.
- Operational logging and runbook standards.
- Foundations complete from 04_FOUNDATIONS.md.
- Working local Python environment.
my_tool/
pyproject.toml
README.md
requirements.txt
src/
my_tool/
__init__.py
main.py
logic.py
io_excel.py
io_sql.py
io_sw.py
tests/
test_logic.py
Set standards for:
- Ruff checks,
- Black formatting,
- pytest defaults.
python -m pip install ruff black pytest
ruff check .
black .
pytest -q- structured run log per execution,
- summary counts,
- clear failure traces,
- stable log path.
Every tool must include:
- how to run,
- required input format,
- output locations,
- failure handling,
- support owner.
Must pass before sharing:
- linter clean,
- format clean,
- tests passing,
- one end-to-end sample run,
- README run instructions validated by another person.
- Repeatable project template ready for all capstones.
- Consistent quality process for every script/tool.
- Introduce lint errors and fix them.
- Break a test and isolate regression quickly.
- Simulate missing input file and verify safe failure.
- tooling conflicts:
- centralize config in
pyproject.toml.
- centralize config in
- flaky tests:
- remove hidden dependencies on file order/time.
- unreadable logs:
- enforce stable message format and include run id.
Move forward when you can:
- bootstrap a new project in under 30 minutes,
- pass all quality gates,
- hand project to another engineer who can run it.
- Play: intentionally violate style and quality rules, then recover.
- Build: apply full template to a new mini-tool.
- Dissect: compare two project structures and justify one.
- Teach-back: explain why each quality gate prevents production pain.
| Problem | Likely cause | First fix |
|---|---|---|
ModuleNotFoundError |
wrong venv/interpreter | activate .venv, reinstall package |
ruff fails |
unused imports or style issues | run ruff check . --fix then review |
| tests fail only on rerun | hidden state in files/data | isolate test data and clean temp outputs |
| logs missing | logger not initialized early | initialize logging before main workflow |