Contribute a tutorial¶
The tutorials live as Markdown files in the idss-mesa/trainings repository1. Anyone who can write Markdown can improve them.
Report a problem¶
If a step did not match what you saw, open an issue with the tutorial's title, the step number, what the page said, and what you saw instead. A screenshot helps. Leave passwords, tokens, and private data out of it.
Fix or write a tutorial¶
- Fork the repository, or create a branch if you are a member of the organization.
- For a new tutorial, copy the tutorial template into
docs/tutorials/<task-name>.mdand follow its rules. One task per tutorial, up to about 600 words. - Add the page in two places: the
navlist inzensical.toml, and a bullet indocs/tutorials/index.mdwhose description matches the page'sdescription. - Add a dated entry to
docs/log.md. - To put the tutorial in a learning pathway, add its file name to one
tutorials:list indata/pathways.yml. Without that it is still listed under its point on Every tutorial, by pathway point. -
Check it locally:
pip install zensical pyyaml python scripts/okf_validate.py docs # front matter is complete python scripts/gen_pathways.py # regenerate the pathway pages python scripts/gen_llms_txt.py # regenerate llms.txt and llms-full.txt zensical build --clean --strict # the site builds with no broken links zensical serve # preview at http://localhost:8000 -
Commit the regenerated files with your change, and open a pull request. Changes reach the site only through a reviewed pull request.
Add a tutorial to a pathway¶
A learning pathway is a short route through the tutorials towards
one goal. The pathways are described in one file, data/pathways.yml, and the pages
are written from it by a script. Never edit docs/pathways/ or docs/pathway.md by
hand.
- Give the tutorial its pathway tag,
p1top5, in its front matter, and a**Time:** N minutes.line. The pathway pages read its title, point, and time from the tutorial itself. -
In
data/pathways.yml, find the pathway and the stage for the tutorial's point, and add the file name, without.md, to that stage'smore:list:- point: p2 tutorials: - practice-data - load-a-file more: - your-new-tutorialtutorials:holds the essentials, the few a reader cannot do without, andmore:holds what to take with more time. Pathways are kept short on purpose: the essentials of a pathway may not add up to more thanessentials_minutes, now 25. Add totutorials:only if a reader would be stuck without the tutorial, and expect to move another one tomore:to make room. 3. Runpython scripts/gen_pathways.pyand commit what it writes. It stops with a message if a name matches no tutorial, if a tutorial sits under the wrong point, or if the essentials run over the limit.
Readers can shorten a pathway further by answering "Where are you starting?" on the
pathways page. Two lists under tailoring: in the same file
drive that: foundations, the point 2 tutorials that later ones build on, and in_r,
which names the R tutorial that replaces a Python one. A new R counterpart is one line
there.
A tutorial that is in no pathway still appears under its point on
Every tutorial, by pathway point. To choose its place there, add it to a
group under by_point: in the same file.
A new pathway is a new entry under pathways: and one line in the nav list in
zensical.toml. Name it for what the reader wants to do, never for a numbered session
or a date.
Write a self-check¶
A self-check is one short question a reader tries after a
tutorial. It lives under checks: in data/pathways.yml, not in the tutorial, so the
tutorial keeps its six parts.
rows-without-repeats:
tutorial: count-records-per-day
ask: Remove exact repeats with `drop_duplicates()`. How many rows remain?
answer: 151
how: len(readings.drop_duplicates())
verify:
python: |
len(readings.drop_duplicates())
right: One row, G03 on 5 July, is written twice, so 152 becomes 151.
slips:
"152": That is the table as loaded. One row for G03 is written twice.
otherwise: Count the rows of `readings.drop_duplicates()`.
- Ask for something the tutorial does not print. Choose a number the reader gets by a small change to what the tutorial taught. If the answer is on the page, it can be read off without doing the task.
- Give a number, or for an answer in two parts, a list of
options:with the right one repeated asanswer:. List the options in a plain order, such as by name or by size, not with the right one first. The site will not build if the right answer sits in the same place in most self-checks. - Write
verify:code whose last line gives the answer from the practice data.pandasaspd,duckdb, and the tablesreadings,august,gauges,sites, andobsare already loaded. For an R tutorial user:with one expression. The site will not build if the code and the answer disagree. - Name the likely slips. For each wrong answer a careful person might give, write
one sentence under
slips:that says what went wrong, and a general hint underotherwise:. Writeright:as the one sentence that explains the answer. - A question about a portal screen has no
verify:. It is shown as "not machine-checked". Write one only for a tutorial that has been followed on the live portal, and take the answer from that tutorial's own text. - To let readers skip a point by answering its questions, list their names under that
point's
skip_check:. -
Check it:
pip install pandas==3.1.1 duckdb==2.0.0 pyyaml python scripts/gen_pathways.py # writes the self-checks page python scripts/check_self_checks.py # the answers agree with the data
Self-check answers are public and are for a reader's own use. Answer keys for training sessions do not belong in this repository.
What belongs here¶
Only what a participant or a MESA user should read.
- Yes: single-task tutorials, and pages that help readers find and use them.
- No: answer keys, facilitator notes, session plans, review checklists, or correspondence with partners. Those are kept elsewhere.
- No: features that the public MESA documentation does not describe. Document the feature there first, then write the tutorial.
- Never: usernames, passwords, tokens, or keys, including in screenshots.
Validate a tutorial¶
A tutorial is a draft until someone other than its author has followed it from start to finish on the live portal. To validate one:
- Follow every step exactly as written, in a fresh browser session.
- At each step, compare what you see with "You should see". Note every difference, however small: a button with another name, a screen in another order.
- Do the check at the end, and try the "If it didn't" slip on purpose to confirm its symptom and its fix.
- Open a pull request that corrects the text and replaces the last line with the date, your name, and what you tested against (portal, app, and image or version).
A maintainer then removes the draft notice, sets status: stable, and records the
validation. Only a human maintainer adds the verified: key.
If you used AI¶
Say so. Put the tool in generated.by, and keep the "Drafted with AI assistance" wording
in the tutorial's last line; How AI was used explains why. You
are responsible for what you submit: run every step and every code block yourself before
opening the pull request.
License of contributions¶
By contributing you agree that your text and images are released under CC BY 4.0 and any code under the BSD 3-Clause license, the same terms as the rest of the site.
-
idss-mesa/trainings repository, https://github.com/idss-mesa/trainings. ↩
Machine-readable versions of this page: Markdown twin · raw source on GitHub · llms.txt · llms-full.txt (whole site). See For AI agents.