Install, Test, Build¶
This page covers the full setup flow for users and contributors.
Requirements¶
- Python ≥ 3.12 (required — older versions will fail with syntax errors)
- Git
- Make (included with Git Bash on Windows; install via
choco install makeorscoop install makefor PowerShell)
Install¶
git clone https://github.com/ASCS-eV/ontology-management-base.git
cd ontology-management-base
git submodule update --init --recursive
# One-command setup (creates .venv, installs dev deps, installs pre-commit hooks)
make setup
Activate the environment in your current shell when needed:
# Linux / macOS / Git Bash
source .venv/bin/activate
# Windows PowerShell
.venv\Scripts\Activate.ps1
# Windows CMD
.venv\Scripts\activate.bat
VS Code: Auto-activate virtual environment¶
Install 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:
Test¶
Run the full validation suite:
Run a single domain:
Build Documentation¶
Build the site:
To preview locally (auto-generates docs assets):
Notes:
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/.
Common Troubleshooting¶
- If
pyshaclis missing, install dev dependencies. - If catalogs are missing, run the registry updater: