Skip to content

Commit 43df30f

Browse files
authored
Merge pull request crs4#122 from kikkomep/doc/ontology-notes
doc: note optional ontology usage in validation profiles
2 parents b00e635 + befa599 commit 43df30f

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

docs/11_writing_a_profile.rst

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,25 @@ These instructions assume you are familiar with code development using Python an
6363
checks to write, you can create multiple files - the validator will
6464
collect them all automatically at runtime.
6565

66-
* Note: some profiles split the checks into folders called ``must/``,
66+
.. note::
67+
68+
Some profiles split the checks into folders called ``must/``,
6769
``should/`` and ``may/`` according to the requirement severity. This
6870
is not mandatory - you can also label individual checks/shapes with
6971
``sh:severity`` in the SHACL code instead.
7072

73+
#. Optionally, associate an ontology graph with the profile by providing
74+
an ``ontology.ttl`` file alongside the SHACL files.
75+
This graph is merged into the crate's data graph at validation time,
76+
allowing you to define formal relationships and additional definitions
77+
between profile entities (e.g., using ``rdfs:subClassOf``,
78+
``owl:equivalentClass``, etc.).
79+
80+
.. warning::
81+
82+
Including an ontology can significantly impact validation times and
83+
overall performance, especially for large graphs. Use with caution.
84+
7185
#. From the root folder of the repo, create a test folder for the profile
7286
under
7387
`tests/integration/profiles <https://github.com/crs4/rocrate-validator/tree/develop/tests/integration/profiles>`_. The name should match the folder you made earlier.
@@ -90,4 +104,6 @@ When running the validator manually, use ``--profile-identifier`` to select the
90104

91105
The crates in ``tests/data/crates``` can be used as examples for running the validator. For example: ::
92106

93-
rocrate-validator validate --profile-identifier your-profile-name tests/data/crates/invalid/1_wroc_crate/no_mainentity/
107+
rocrate-validator validate \
108+
--profile-identifier your-profile-name \
109+
tests/data/crates/invalid/1_wroc_crate/no_mainentity/

0 commit comments

Comments
 (0)