SLSA
Theme
Text size
GitHub Menu

Regenerate and test the schema

Playbook how-to playbooks/regenerate-and-test

Checked by automation only

still a draft

Written 2026-11-15 by ktl-librarian (automation). Last checked 2026-10-21 by ktl-librarian (automation).

The full record
Checks
  • 2026-10-21 by ktl-librarian (automation)
Sources
References
Graph
Open this concept in the knowledge graph
IRI
https://w3id.org/lmodel/slsa/knowledge/playbooks/regenerate-and-test
Licence
CC BY 4.0
Files
Markdown JSON-LD Source on GitHub History on GitHub
  1. Install the dependencies with just install. CONTRIBUTING.md asks for Python 3.11 or later, uv and just.
  2. Edit the schema in src/slsa/schema/: slsa.yaml and the modules it imports. Leave in_toto/in_toto_core.yaml as it is: it is lmodel/in-toto’s core module, copied unchanged,1 and tests/test_in_toto_import.py fails when its git object hash differs from the one it pins. To take a later release of lmodel/in-toto, replace the file and the pinned hash together.2
  3. Run just gen-project to regenerate project/ and the Python data models. After you rename or remove a class, run just clean first: gen-java writes one file per class into project/java/ and deletes none.
  4. Run just gen-doc to regenerate docs/schema/slsa.yaml and docs/elements/. To see them on the site, run scripts/build.sh serve in website/, as website/README.md says. Then run just gen-merged to regenerate docs/schema/slsa_merged.yaml.
  5. Run just lokf-adapt to regenerate .lokf/schema/slsa.yaml, the bundle’s domain schema. slsa LinkML schema says which lokf the recipe runs, and how to run another.
  6. Run just test. It runs three steps:
    • _test-schema runs gen-project into a scratch tmp/ folder.
    • _test-python regenerates the Python models and runs pytest.
    • _test-examples runs linkml-run-examples over tests/data/.
  7. Run just lint, which runs linkml-lint over the schema folder and reports errors only. .linkmllint.yaml sets its rules.
  8. Commit the regenerated files with the schema change.

.github/workflows/main.yaml runs just test on every push to main and on every pull request, on Python 3.11, 3.12, 3.13 and 3.14. On Python 3.13 it also runs two more steps:

  • just lint, before the tests;
  • just lokf-adapt-check, after the tests and after uv sync --locked --project .lokf installs the bundle’s toolkit. It fails when .lokf/schema/slsa.yaml is stale against the schema or .lokf/schema/lokf.yaml.

On WSL2 (Windows Subsystem for Linux), run export JUST_TEMPDIR=/tmp before any recipe. Without JUST_TEMPDIR, shebang recipes fail with “Permission denied” errors, so the justfile prints a warning when the variable is missing.


  1. NOTICE, the lmodel/in-toto section ↩︎

  2. tests/test_in_toto_import.py, PINNED_BLOB ↩︎