Skip to content

Regenerate and test the schema

Playbookhow-toplaybooks/regenerate-and-test

Checked by automation only

still a draft

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

The full record
Checks
  • 2026-10-28 by ktl-librarian (automation)
Sources
References
About
Graph
Open this concept in the knowledge graph
IRI
https://w3id.org/lmodel/github-actions/knowledge/playbooks/regenerate-and-test
Licence
CC BY 4.0
Files
MarkdownJSON-LDSource on GitHubHistory on GitHub

CONTRIBUTING.md asks for Python 3.10 or later, uv and just.1 Clone the repository, run uv sync --group dev, and list the recipes with just --list. On WSL2, run export JUST_TEMPDIR=/tmp first, because the justfile’s shebang recipes otherwise fail.2 .copier-answers.yml records that the project was made from gh:linkml/linkml-project-copier at v0.5.0-8-ga2117fc.3 just update runs copier update and upgrades linkml and linkml-runtime in uv.lock.

  1. Edit the files in src/github_actions/schema/. Leave src/github_actions/schema/schemastore/ as upstream wrote it: Move the upstream pins says how to replace it.
  2. Follow the schema’s conventions: UpperCamelCase classes and enums, snake_case slots, GitHub’s strings as permissible values, attributes unless two classes share a field, and a short description on every element. Name in see_also the page each description renders, and keep every name apart from LOKF’s and slsa’s, as Element names and the shared namespace explains.
  3. Regenerate. just gen-project writes project/ and the Python models, just gen-doc writes docs/schema/github_actions.yaml and the pages in docs/elements/, just gen-merged writes docs/schema/github_actions_merged.yaml, and just lokf-adapt writes .lokf/github-actions.yaml. Commit the output. Generated artefacts lists what each writes.
  4. Add example data to tests/data/valid/ and tests/data/invalid/, named ClassName-###.yaml, with an invalid example for each constraint. Test data and schema tests describes the folders.
  5. If the change alters behaviour and not just wording, add an entry under ## [Unreleased] in CHANGELOG.md.
  • just test runs _test-schema, _test-python and _test-examples: it generates the project into tmp/, regenerates the Python models and runs pytest, and runs linkml-run-examples over the example data.
  • just lint runs linkml-lint --ignore-warnings on the schema directory, so it fails on errors only. .linkmllint.yaml applies LinkML’s recommended rules with standard_naming at warning level.
  • just lokf-adapt-check fails when .lokf/github-actions.yaml is stale against the schema or .lokf/lokf.yaml.
  • uvx pre-commit run runs the hooks on what is staged, which CONTRIBUTING.md names as ruff, yamllint, codespell, typos and the uv.lock check. The hooks leave alone the SchemaStore copy, the generated files, .lokf/lokf.yaml and the adapt copy, .lokf/scripts/ and .lokf/m365/, and tests/neighbours/.
  • Update uv.lock, or .lokf/uv.lock, in the same change as a dependency edit, because CI installs with uv sync --locked and fails otherwise.
  • Run cd .lokf && just lokf-validate after a change to .lokf/.

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 Lint & docs runs ShellCheck, actionlint, markdownlint, lychee and codespell. CONTRIBUTING.md says that these checks are easy to trip locally.

  1. CONTRIBUTING.md, Development setup and Before opening a pull request ↩

  2. justfile, the _wsl2_compat_check, update, test and lint recipes ↩

  3. .copier-answers.yml, _src_path and _commit ↩

  4. .github/workflows/main.yaml, the test job ↩