Exercises and exercise packs¶
In the app: Help → Help contents, Exercises and exercise packs.
An exercise is a short guided task: each step says what to do in the app (the menu path and the dialog's fields), with hints, the same step as Python, and a Check that reads your session's results and says, step by step, whether they are right. Exercises come in packs, from a plugin or a folder.
Help → Exercises… lists the packs; Open folder… adds one from a folder (it has pack.toml and
exercises/). Choose an exercise and Start: its data load into the session once you agree, as File → Load
data… steps (in History and the script, and Undo takes them back), and the Exercise panel opens on the right
with every step. In each step, Show hint gives a hint (press again for the next), Show the code the step
as Python, and Check runs the step's checks against the session: green when a value is as expected, red with
a message when it is not, or when the object it reads does not exist yet.
Each pack shows who it is for and, if it has one, its classification (such as "internal"): information only. An exercise can also come with models (Dynare, IRIS or pymetrix files): the panel's Import… opens the model's import dialog filled in with the pack's file and the name the pack gives the model, to run as any step.
Checks only read values (a coefficient, a statistic, a setting); nothing in a pack runs in the app. A pack's
reference solution runs only from the command line: pymetrix-exercises check <pack> loads each exercise's data
in a fresh session, runs its solution and every check, and exits non-zero when one fails, so a pack's own CI can
catch drift. pymetrix-exercises new <folder> starts a pack. The format, and how a plugin ships a pack, are in
the guide (Writing an exercise pack) and docs/exercise-packs.md. The interface is provisional before 1.0.