Skip to content

Regenerate the schema and its artefacts

Playbookhow-toplaybooks/regenerate-schema

Nobody has checked this yet

still a draft

Written 2026-10-28 by ktl-librarian (automation).

The full record
Checks
none recorded
Sources
References
Graph
Open this concept in the knowledge graph
IRI
https://w3id.org/lmodel/gist/knowledge/playbooks/regenerate-schema
Licence
CC BY 4.0
Files
MarkdownJSON-LDSource on GitHubHistory on GitHub
  1. Run just install once (uv sync --group dev).
  2. Change the input, never the output: edit a mapping TSV under src/gist/mappings/, the transform script, or replace the Turtle files under upstream/ with a newer gist release. just check-upstream says whether one exists, and upstream-watch.yaml opens an issue when it does.
  3. Run just gen-project. It runs, in order, gen-linkml (Turtle to LinkML), apply-sssom-overlay (overlay), verify-mappings (verifier), then LinkML’s gen-project and gen-pydantic (generated artefacts).
  4. Run just test: it re-runs the generators into tmp/, regenerates the Python model, runs pytest (342 tests), and converts the test data.
  5. Commit the regenerated src/gist/schema/, src/gist/datamodel/ and project/ together with the change that caused them.

CI regenerates src/gist/schema/ the same way and fails a pull request whose committed schema differs, so a pull request that skips step 3 fails there. It also fails when project/ or src/gist/datamodel/ is out of date: just verify-generated compares them by content, since they embed their generation date, and their Turtle is written in a new triple order on each run. CI also runs just gen-lokf-copy, which fails when lokf adapt cannot verify the LOKF copy beside LOKF’s lokf.yaml.