Ontology Quality Suite
Python tools for checking that an OWL2 ontology stays internally consistent across versions, and that TARQL/oxi-gen CONSTRUCT-query transformation files stay aligned with the ontology(ies) they triplify against -- namespaces, class/property usage -- with suggested diffs for automated repair, either against local files or a live Fuseki (SPARQL 1.1 Protocol) triplestore.
This package carries forward the full ontology_suite pipeline from the
sibling consolidated_ontology_suite checkout (OntoQA/OQuaRE metrics,
SHACL+SPARQL registry checks, OWL2 profile/reasoner-backed consistency,
docgen -- the same logic is also ported to TypeScript in
consolidated_ontology_suite_webapp, the VS Code extension) and adds three
things that didn't exist in Python before:
- Ontology-version consistency + rename detection
(
ontology_suite.versioning.rename_detection) -- pairs up a version diff's removed/added classes and properties into probable renames, using either an explicitowl:equivalentClass/dcterms:isReplacedBymigration annotation (high confidence) or local-name similarity (fallback). - Automated repair suggestions (
ontology_suite.repair,ontology_suite.checks.repair) -- turns a TARQL/ontology misalignment or a registry-check finding into a concrete unified diff: aPREFIXline fix, an IRI-rename substitution across a query file, an ontology declaration stub, or a real SPARQL 1.1 Update -- reviewable as a.patchfile, or applied directly. - Live triplestore support (
ontology_suite.remote) -- runs the same checks against a Fuseki (or any SPARQL 1.1 Protocol) dataset, named-graph aware: diff two ontology versions held as separate named graphs, run the existing registry.rqchecks scoped to exactly the graphs they should see, or three-way check a live triplified named graph against its ontology graph and its local TARQL source file.
Every --ontology/--data/query-source argument throughout accepts a
local file, an http(s) URL, or either gzip-compressed, transparently (see
ontology_suite/io_utils.py and docs/ARCHITECTURE.md's "Loading files"
section).
See docs/CONSISTENCY_AND_REPAIR.md for the local-file workflow,
docs/FUSEKI.md for the live-triplestore one, docs/ARCHITECTURE.md for
the inherited pipeline this all sits on top of, and
docs/UPSTREAM_README.md for that pipeline's own original README.
Quick start
uv sync
uv run ontology-quality-suite consistency --new domain-v2.ttl --old domain-v1.ttl --queries queries/
from ontology_suite import consistency
report = consistency.check_consistency(
"domain-v2.ttl", old_ontology="domain-v1.ttl", tarql_sources=["queries/"],
)
print(consistency.format_consistency_report(report))
consistency.apply_repairs(report.repairs, min_confidence=0.7)
CLI
ontology-quality-suite ontology --ontology domain.ttl
ontology-quality-suite checks --ontology domain.ttl [--data data.ttl]
ontology-quality-suite sketch --queries queries/ [--ontology domain.ttl]
ontology-quality-suite triplify --csv-dir csv/ --queries queries/
ontology-quality-suite data data.ttl [more.ttl ...] [--ontology domain.ttl]
ontology-quality-suite docgen --ontology domain.ttl
ontology-quality-suite run whichever of --ontology/--queries/--csv-dir/--data apply
ontology-quality-suite version-diff old.ttl new.ttl
ontology-quality-suite consistency --new domain.ttl [--old domain-v1.ttl] [--queries queries/] [--apply-repairs]
ontology-quality-suite consistency-remote --query-endpoint URL --manifest graphs.json
Tests
uv run pytest
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ontology_quality_suite-0.3.3.tar.gz.
File metadata
- Download URL: ontology_quality_suite-0.3.3.tar.gz
- Upload date:
- Size: 542.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f903984c458d3f02046a8d6de1172d82a23770136cd140a907497cbc6616669d
|
|
| MD5 |
98ecfd640efabf1232f9deb87636be03
|
|
| BLAKE2b-256 |
8f0e3a2b2ce2852b4190eae702bd03f6dfa731936935dee4cec6e61fa56cc775
|
Provenance
The following attestation bundles were made for ontology_quality_suite-0.3.3.tar.gz:
Publisher:
publish.yml on pwin/consolidated-ontology-quality-suite-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ontology_quality_suite-0.3.3.tar.gz -
Subject digest:
f903984c458d3f02046a8d6de1172d82a23770136cd140a907497cbc6616669d - Sigstore transparency entry: 2421865120
- Sigstore integration time:
-
Permalink:
pwin/consolidated-ontology-quality-suite-python@75af065c45721f3eb43177f4065a9f3132285111 -
Branch / Tag:
refs/tags/v0.3.3 - Owner: https://github.com/pwin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@75af065c45721f3eb43177f4065a9f3132285111 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ontology_quality_suite-0.3.3-py3-none-any.whl.
File metadata
- Download URL: ontology_quality_suite-0.3.3-py3-none-any.whl
- Upload date:
- Size: 233.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97972f7d76b030509b6e3956a541207d6e8043f1091b2242df5bd844ee605c5a
|
|
| MD5 |
a35e07a52e6064210965b3516ae1d245
|
|
| BLAKE2b-256 |
352baaa2c8d8e9bc37561521128605bd3787ca80ff9bd6a80fda29950c58174d
|
Provenance
The following attestation bundles were made for ontology_quality_suite-0.3.3-py3-none-any.whl:
Publisher:
publish.yml on pwin/consolidated-ontology-quality-suite-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ontology_quality_suite-0.3.3-py3-none-any.whl -
Subject digest:
97972f7d76b030509b6e3956a541207d6e8043f1091b2242df5bd844ee605c5a - Sigstore transparency entry: 2421865137
- Sigstore integration time:
-
Permalink:
pwin/consolidated-ontology-quality-suite-python@75af065c45721f3eb43177f4065a9f3132285111 -
Branch / Tag:
refs/tags/v0.3.3 - Owner: https://github.com/pwin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@75af065c45721f3eb43177f4065a9f3132285111 -
Trigger Event:
push
-
Statement type: