This guide describes how to add or update ontologies, shapes, and test data.
- Add or update ontology artifacts under
artifacts/{domain}/. - Add or update JSON-LD contexts in the same folder.
- Add test instances under
tests/data/{domain}/. - Update catalogs and registry.
- Run validation.
Run the updater to regenerate docs/registry.json and the XML catalogs:
python3 -m src.tools.utils.registry_updaterThis updates:
docs/registry.jsonartifacts/catalog-v001.xmlimports/catalog-v001.xmltests/catalog-v001.xml
python3 -m src.tools.validators.validation_suite --run all --domain {domain}Build or preview docs locally (auto-generates docs assets):
DOCS_SITE_URL=http://127.0.0.1:8000/ontology-management-base mkdocs serveNotes:
Hook flow (via hooks/copy_artifacts.py):
- The hook runs
properties_updaterandclass_page_generator(DOCS_SITE_URL is optional and only affects local diagram links). properties_updaterwrites trackedartifacts/<domain>/PROPERTIES.md, generatesdocs/ontologies/properties/<domain>.md(ignored by git), builds thedocs/ontologies/properties.mddomains overview, and refreshesdocs/ontologies/catalog.md.class_page_generatorwritesdocs/ontologies/classes/<domain>/*.mdand usesDOCS_SITE_URLto build local diagram links.- The hook copies
artifacts/<domain>/intodocs/artifacts/<domain>/<versionInfo>/and adds example instances fromtests/data/. - Generated folders (
docs/artifacts/,docs/ontologies/classes/,docs/ontologies/properties/) are ignored by git.
- Ontology IRI and version are consistent
- SHACL shapes import the ontology
- Context points to the correct W3ID namespace
- Tests cover both valid and invalid cases
- Catalogs and registry are up to date