Skip to content

Add VANN preferred namespace metadata (#217) - #281

Open
matthiasautrata wants to merge 2 commits into
EKGF:developfrom
matthiasautrata:issue/217-vann-metadata
Open

matthiasautrata wants to merge 2 commits into
EKGF:developfrom
matthiasautrata:issue/217-vann-metadata

Conversation

@matthiasautrata

Copy link
Copy Markdown
Contributor

Resolves #217. Step 9 of #275. Carries #170 forward.

This adds vann:preferredNamespacePrefix and vann:preferredNamespaceUri to the DPROD ontology and shapes, so deployment and import tooling (e.g. eccenca's cmemc) can tell which graph an imported file belongs to.

Commits

  • d4034e4, Sebastian Tramp's commit from add vann annotations in order to allow automatic deployment #170, keeps his authorship. A note in the commit message records the changes made while carrying it forward:
    • The conflict with owl:versionIRI is resolved.
    • The vann: prefix is sorted into the prefix block.
    • vann:preferredNamespaceUri is now the current namespace, https://ekgf.org/dprod/spec/develop/, instead of https://www.omg.org/spec/DPROD/.
  • 70a5727 adds the same annotations to dprod-shapes.ttl, which is an owl:Ontology imported into its own graph. They use its own prefix (dprod-shapes) and namespace. The commit also adds tests/test_vann_metadata.py and bumps dct:modified on both files.

Decisions

File vann:preferredNamespacePrefix vann:preferredNamespaceUri
ontology/dprod/dprod-ontology.ttl dprod https://ekgf.org/dprod/spec/develop/
ontology/dprod/dprod-shapes.ttl dprod-shapes https://ekgf.org/dprod/spec/develop/shapes/
  • The value is a plain literal equal to the ontology IRI. That is VANN's usage and what RDFUnit's ontologies-vann-preferredNamespaceUri check expects; both RDFUnit VANN checks currently fail in ontology/dprod/artifacts/. The test enforces it, so the namespace move (DPROD Contracts: cleanup tracking — merge order for open contracts PRs, Schedule model, namespace #275 step 10) can't leave a stale value behind.
  • The contracts files are left out.
    • The contracts vocabulary's ontology IRI (…/develop/contracts/) differs from the namespace of its terms (dprod:).
    • dprod-contracts-shapes.ttl binds dprod-shapes: to …/develop/contracts/shapes/, so two namespaces share one prefix.
    • Both need a decision of their own before they get a preferred prefix.

Tests

🤖 Generated with Claude Code

seebi and others added 2 commits October 13, 2026 17:36
Without these annotations, tools such as cmemc can't tell which graph to
use when importing this ontology.

[Carried forward from EKGF#170 onto develop for EKGF#217 by Matthias Autrata:
conflict with owl:versionIRI resolved, the vann prefix declaration sorted
into the prefix block, and vann:preferredNamespaceUri set to the current
namespace, https://ekgf.org/dprod/spec/develop/, instead of
https://www.omg.org/spec/DPROD/. The namespace move to OMG (EKGF#275 step 10)
changes it along with the ontology IRI.]
Resolves: EKGF#217

The ontology gets vann:preferredNamespacePrefix and
vann:preferredNamespaceUri from EKGF#170 (previous commit). The shapes file
is an owl:Ontology of its own and is imported into its own graph, so it
gets them too, with its own prefix, dprod-shapes, and namespace.

tests/test_vann_metadata.py checks, for both files, that the preferred
namespace is the ontology IRI as a plain literal, and that the preferred
prefix is declared for it. The namespace move (EKGF#275 step 10) therefore
can't leave a stale value behind.

Bump dct:modified on both files.

Refs: EKGF#170, EKGF#275

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 13, 2026

Copy link
Copy Markdown

@matthiasautrata is attempting to deploy a commit to the EKGF Team on Vercel.

A member of the Team first needs to authorize it.

@jgeluk

jgeluk commented Nov 17, 2026

Copy link
Copy Markdown
Member

Since dprod-shapes.ttl already carries sh:declare for the same prefix/namespace, could we:

  1. add the matching sh:declare (prefix dprod) to dprod-ontology.ttl, so SHACL-SPARQL consumers can get it via sh:prefixes dprod:;
  2. type sh:namespace as xsd:anyURI per SHACL §5.2.1 (the existing ones are plain strings, which strict processors reject), noting VANN keeps a plain literal;
  3. have test_vann_metadata.py assert that the VANN values and the sh:declare values agree, instead of relying on the Turtle @prefix binding, which is a serialization detail.

Agree with leaving the contracts files out for now; worth a follow-up issue for the contracts namespace and the dprod-shapes: prefix being bound to two namespaces.

@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
dprod Ready Ready Preview Nov 17, 2026 11:20pm UTC

@tonyseale tonyseale left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. Tested on top of develop together with #277 and #282: core and contracts suites pass.

This branch was successfully deployed

1 active deployment
Preview — 70a5727e Deployed Nov 17, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decide and add VANN preferred namespace metadata

4 participants