feat(scenario): scenario runner, extensions and working copy

scenario.py runs all five simulators of the core from a JSON scenario file,
with sweeps, and reproduces 20 of the note's data files (14 byte for byte,
6 column-wise). Extensions live outside the core and must reproduce it
exactly in a limit case; paadrag_tidsserie is the worked example.
arbeidskopi.py gives the user a copy of the model they can change.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-11-11 14:17:32 +01:00
commit 03151cfb3b
Signed by: ktg
SSH key fingerprint: SHA256:JakMjO6FTBBzN0Bhfj9saOoEjaFxlSdYuZQQpM/lF9Q
36 changed files with 3580 additions and 5 deletions

View file

@ -41,11 +41,11 @@ justice chain (mostly non-programmers) and researchers. The note and its code li
passes through as 2 with the message unchanged), 3 numpy/scipy missing.
## Commands
- Development environment: `python3 -m venv .venv && .venv/bin/pip install -r modell/requirements.txt pytest ruff mypy`
- Tests: `.venv/bin/python -m pytest tests/`
- Lint and types (not the core): `.venv/bin/ruff check modell tests` and `.venv/bin/mypy modell`
- Reproduction check against the note: `python3 modell/kjor.py kontroll` (full run, about 2 min) or
`python3 modell/kjor.py kontroll --rask`
- Development environment (versions pinned in `pyproject.toml`, group `dev`): `python3 -m venv .venv && .venv/bin/pip install --group dev`
- Tests: `.venv/bin/pytest` (fast, about 1.5 min); `.venv/bin/pytest -m treg` runs the note's full simulation (about 2.5 min)
- Lint and types (the core is excluded in `pyproject.toml`): `.venv/bin/ruff check .` and `.venv/bin/mypy .`
- Reproduction check against the note: `.venv/bin/python modell/kjor.py kontroll` (full run, about 75 s) or
`.venv/bin/python modell/kjor.py kontroll --rask`
- Try the skills' commands: `python3 modell/kjor.py diagnose eksempler/eksempel_domstol.json`,
`python3 modell/kjor.py forlop eksempler/eksempel_domstol.json`
- Validate the plugin: `claude plugin validate .`