This page covers the full setup flow for users and contributors.
- Python 3.12
- Git
git clone https://github.com/gaia-x4plc-aad/ontology-management-base.git
cd ontology-management-base
git submodule update --init --recursive
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install -e .For development:
python3 -m pip install -e ".[dev]"
pre-commit installInstall the Python extension, then select the interpreter for this workspace so terminals auto-activate it.
- Command Palette → "Python: Select Interpreter" → choose
.venv. - Ensure these settings are enabled:
{
"python.terminal.activateEnvironment": true,
"python.venvFolders": [".venv", "venv", "env"]
}Run the full validation suite:
make testRun a single domain:
python3 -m src.tools.validators.validation_suite --run all --domain hdmapInstall docs extras first:
python3 -m pip install -e ".[docs]"Build the site:
mkdocs buildTo preview 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/.
- If
pyshaclis missing, install dev dependencies. - If catalogs are missing, run the registry updater:
python3 -m src.tools.utils.registry_updater