Writing a course page or a recipe¶
The course (docs/course/) teaches the basics step by step on data that ships with the repository; recipes (docs/recipes/)
start from a situation and link to the course. The plan and the reasons are in docs/plans/2026-11-27-documentation-rewrite.md.
The shape of a course page¶
# N. Title: a plain statement of what the reader gets
**Time:** ... **You need:** ...
## What this step does 3 sentences, no jargon
## (the idea, with a picture) only if the step needs one
## Do it tabs: "Command line" first, "Graphical interface" second
## What you should see the real output, in a ```text block
## Check that it worked a number or a picture with a pass/fail rule
## If it did not work a table: what you see | cause | what to do
[Next: ... →]
Rules¶
- One sentence per idea. Explain a term the first time (link the glossary); code names go in parentheses.
- Every command is copy-paste and has the output it prints. The output block is tested: a
python -c "..."block followed by atextblock under "What you should see" is run bytests/unit/test_course_smoke.pyand compared line by line. Regenerate the block from a real run when the code changes; never type it by hand. - Every number has a rule ("good: below 0.3 px").
- Use the bundled
test_data/test_cavity_small. A command for the graphical interface must name a menu entry that exists insrc/openptv2/gui/pyptv_gui.py. - No dataset, lab or person names in titles, file names or text, except as "example: ...". Name recipes by the situation.
- No research findings in a how-to: link the reference page in one line.
- Figures come from a script (
docs/course/make_figures.py), not from a screenshot that goes stale.
Check before you commit: uv run mkdocs build --strict and uv run pytest tests/unit/test_course_smoke.py.