Extensible linter and quality pipeline for RDF, SKOS, OWL and RDFS vocabularies
Project description
semanticlint
Extensible linter and quality pipeline for RDF, SKOS, OWL and RDFS vocabularies.
Features
- Stage 1 — Lint: syntax validation for Turtle, RDF/XML, N-Triples, JSON-LD
- Stage 2 — Integrity: SKOS integrity conditions (W3C), OWL consistency, RDFS checks
- Stage 3 — Quality: label coverage, definition coverage, hierarchy metrics
- Auto-detection: identifies SKOS / OWL / RDFS / RDF vocabulary types automatically
- Extensible: add custom checks with a single class and
@CheckRegistry.register - Configurable:
onto-ci.ymlalongside your vocabulary files controls which stages run
Installation
pip install semanticlint
Quick start
semanticlint check my-taxonomy.ttl
semanticlint check vocabularies/ --select SKO --ignore SKO003
Writing a custom check
from semanticlint import Check, CheckRegistry, VocabType, Severity, Violation
from rdflib import RDF
from rdflib.namespace import SKOS
@CheckRegistry.register
class CamelCaseConceptCheck(Check):
id = "CUS001"
description = "Concept local names should be CamelCase"
severity = Severity.WARNING
applies_to = VocabType.SKOS
def run(self, graph, config):
violations = []
for concept in graph.subjects(RDF.type, SKOS.Concept):
local = str(concept).split("#")[-1].split("/")[-1]
if not local[0].isupper():
violations.append(Violation(self.id, f"{local} is not CamelCase", self.severity, concept))
return violations
Configuration (onto-ci.yml)
version: 1
sources: ["*.ttl", "vocabularies/**/*.ttl"]
select: ["RDF", "SKO", "QUA"]
ignore: []
quality:
min_label_coverage: 1.0
min_definition_coverage: 0.5
languages: ["en"]
plugins:
- my_project.custom_checks
License
MIT — logo is public domain (W3C RDF logo via Wikimedia Commons).
Project details
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 semanticlint-0.1.0.tar.gz.
File metadata
- Download URL: semanticlint-0.1.0.tar.gz
- Upload date:
- Size: 68.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc52cc6517a401c0e8e739394ee8e5fcd7be611ab80bff4cfb6835e1551bb5e8
|
|
| MD5 |
0fb7443db1fb9613ede1c94039cc3590
|
|
| BLAKE2b-256 |
7efd5f7324bc1a1287d909481ee9abefc20624d44f518a64584eba42d1d9215a
|
Provenance
The following attestation bundles were made for semanticlint-0.1.0.tar.gz:
Publisher:
publish.yml on gbelbe/semanticlint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
semanticlint-0.1.0.tar.gz -
Subject digest:
fc52cc6517a401c0e8e739394ee8e5fcd7be611ab80bff4cfb6835e1551bb5e8 - Sigstore transparency entry: 1441991792
- Sigstore integration time:
-
Permalink:
gbelbe/semanticlint@2509f78f977226a4cf81686f2eebf55dac869d2e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/gbelbe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2509f78f977226a4cf81686f2eebf55dac869d2e -
Trigger Event:
push
-
Statement type:
File details
Details for the file semanticlint-0.1.0-py3-none-any.whl.
File metadata
- Download URL: semanticlint-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9722fc6fc5f3cc9864bc36997584e6ea68efa6836758439764e46ab512877ac
|
|
| MD5 |
402b9fe5ae56a3402c5562f4e7fcf5e2
|
|
| BLAKE2b-256 |
1c1c536efbd9c0a4052331a17c289cc51e0acd7f7996dd6247e51b95fc5ec802
|
Provenance
The following attestation bundles were made for semanticlint-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on gbelbe/semanticlint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
semanticlint-0.1.0-py3-none-any.whl -
Subject digest:
f9722fc6fc5f3cc9864bc36997584e6ea68efa6836758439764e46ab512877ac - Sigstore transparency entry: 1441991988
- Sigstore integration time:
-
Permalink:
gbelbe/semanticlint@2509f78f977226a4cf81686f2eebf55dac869d2e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/gbelbe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2509f78f977226a4cf81686f2eebf55dac869d2e -
Trigger Event:
push
-
Statement type: