Tutorial plotting API
This package turns the versioned JSON/CSV artifacts emitted by the native Rust application tutorials into consistent Matplotlib figures. It does not put Python callbacks in the optimization hot path.
From public/tutorials/python:
python -m venv .venv
.venv/bin/python -m pip install -r requirements-lock.txt
.venv/bin/python -m pip install --no-deps -e .
.venv/bin/python -m pytest
.venv/bin/python render_all.py --check
.venv/bin/python check_docs.py
Render one run:
.venv/bin/fcmaes-tutorial-plots \
../rapier-trebuchet/results/quick/qd/run.json \
--output-dir ../rapier-trebuchet/images/quick-qd
The API also accepts result arrays from the optional PyO3 bindings through
pareto_from_arrays and qd_from_archive.
Rendering and validation contract
render_all.py --writeregenerates every figure from discovered schema-v1 manifests and runs each tutorial-specificplot_results.py --writescript. The room-ventilation and HPO tutorials use this extension because their publication figures combine evidence from more than one optimizer manifest.- A tutorial whose artifact axes do not fit the common renderer may add a
.custom-renderermarker. The common renderer then skips its manifests, but its deterministicplot_results.pyremains part of the same write/check pass. render_all.py --checkrenders into temporary directories and compares bytes. This prevents volatile Matplotlib metadata from causing silent documentation drift.requirements-lock.txtpins the complete plotting stack used for regeneration and byte-for-byte validation. Use it whenever checked-in figures are updated.check_docs.pyverifies every local Markdown link and image target. Whenpublic/is the Git repository root—as it is after publication and in CI—it also requires every target to be in the Git index. Locally generated but uncommitted files therefore cannot mask broken evidence links.