Regenerate and test the schema
playbooks/regenerate-and-testNobody has checked this yet
still a draft
Written 2026-10-29 by ktl-librarian (automation).
The full record
- Checks
- none recorded
- Sources
- References
- About
- Pointed to by
- Build and test (main.yaml) (related to)
- Graph
- Open this concept in the knowledge graph
- IRI
https://w3id.org/lmodel/oscal/knowledge/playbooks/regenerate-and-test- Licence
- CC BY 4.0
- Files
- MarkdownJSON-LDSource on GitHubHistory on GitHub
Regenerate and test the schema
Section titled “Regenerate and test the schema”Set up
Section titled “Set up”CONTRIBUTING.md asks for Python 3.10 or later, uv and just.1 Clone https://github.com/lmodel/oscal.git, run uv sync --group dev in it, and list the recipes with just --list. On WSL2, run export JUST_TEMPDIR=/tmp first, because the justfile’s shebang recipes otherwise fail with permission errors.2 .copier-answers.yml records that the project was made from https://github.com/linkml/linkml-project-copier at v0.5.0.3 just update runs copier update and upgrades linkml and linkml-runtime in uv.lock.
Change the schema
Section titled “Change the schema”- Edit the files in
src/oscal/schema/. Leavesrc/oscal/schema/metaschema/as upstream wrote it: Move the upstream pins says how to replace it. - Render what OSCAL defines. Name in the pull request the metaschema definition that an element renders, and give each enum the lists it renders in
oscal_allowed_values. - Follow the schema’s conventions: UpperCamelCase classes and enums, OSCAL’s own keys as slot names, a short description on every element, and no name shared with LOKF’s, slsa’s or github-actions’ copies. Element names and the shared namespace explains these.
- Regenerate.
just gen-projectwritesproject/and the Python datamodel,just gen-docwritesdocs/schema/and the element pages, andjust lokf-adaptwrites.lokf/oscal.yaml. Commit the output. Generated artefacts lists what each writes. - Add example data to
tests/data/valid/andtests/data/invalid/, namedClassName-suffix.yaml, with an invalid example for each constraint. Test data and schema tests describes the folders. - If the change alters behaviour, not just wording, add an entry under
## [Unreleased]inCHANGELOG.md.
Check it
Section titled “Check it”just testruns schema generation, pytest andlinkml-validateovertests/data/, and the check of the Luigi Carpio fixture.just lintrunslinkml-lint --ignore-warningson the schema directory, so it fails on errors only.just lokf-adapt-checkfails when.lokf/oscal.yamlis stale against the schema or.lokf/lokf.yaml.uvx pre-commit runruns the hooks on what is staged, which CONTRIBUTING.md names as ruff, yamllint, codespell, typos and theuv.lockcheck. The hooks leave alone the metaschema copy, the generated files,.lokf/lokf.yamland the adapt copy, the sidecar’s scripts,tests/neighbours/and the third-party fixtures.- Update
uv.lock, or.lokf/uv.lock, in the same change as a dependency edit, because CI installs withuv sync --lockedand fails otherwise. - Run
cd .lokf && just lokf-validateafter a change to the knowledge bundle.
Build and test runs just test on Python 3.10 to 3.14, and just lint and just lokf-adapt-check on Python 3.13 only.4 CONTRIBUTING.md says that Lint & docs is easy to trip locally: it runs ShellCheck, actionlint, markdownlint, link checking and codespell over every Markdown file.