-
Notifications
You must be signed in to change notification settings - Fork 9
Curriculum Authoring Guide
Curriculum is a learner-facing compatibility contract. Treat an exercise name and its position in info.toml as stable once learners can use it. Do not rename, reorder, or remove an exercise without an explicit migration.
For each added or changed exercise, keep these files synchronized:
-
exercises/<topic>/<name>.pycontains the learner-edited, intentionally incomplete exercise. -
checks/<topic>/<name>.pymirrors the exercise path and contains its checks. -
solutions/<name>.pyis the reference-solution loader. -
solutions/_answers.pycontains the corresponding reference answer. -
info.tomlcontains the ordered manifest entry, hint, and documentation URL.
The manifest derives a check path by replacing the exercise path's exercises/ prefix with checks/. Keep the topic directory and filename identical on both sides.
- Keep the
# I AM NOT DONEmarker in learner exercise files. - Keep exercises self-contained because they are copied into learner workspaces.
- Use bare assertions in checks with actionable, beginner-facing messages.
- Make the hint describe a useful next step without replacing the exercise.
- Keep the reference answer separate from the learner exercise.
From the repository root, run the curriculum-specific verification:
python -m pytest tests/integration/test_solution_verify.py -qAlso run the required repository validation:
python -m pytest -q
pythonlings --root tests/fixtures/passing_curriculum verifyConfirm that each changed learner exercise still has its pending marker and that its mirrored check, solution loader, answer, and manifest entry all agree. For packaging, workspace, or curriculum distribution changes, follow the additional build and installed-flow validation in AGENTS.md.
Pythonlings contributor wiki. Repository policy and source are authoritative: Project · Documentation · Code of Conduct · Security Policy