Skip to content

Getting started

  • Python 3.10 or later
  • uv for dependency management

Clone the repository:

Terminal window
git clone https://github.com/skg-if/shacl-extractor.git
Terminal window
cd shacl-extractor

Install dependencies:

Terminal window
uv sync

If you want to run the integration tests against the SKG-IF ontology, clone with submodules instead:

Terminal window
git clone --recurse-submodules --remote-submodules https://github.com/skg-if/shacl-extractor.git

Point the extractor at an ontology file and choose where to write the output:

Terminal window
uv run extractor my-ontology.owl shapes.ttl

The tool parses every owl:Class in the input whose dc:description contains property annotations, then writes a SHACL shapes graph in Turtle format.

For a full breakdown of what the annotations look like and how they map to SHACL, see Annotation syntax.