Running & validating
Everything on this page runs from source/03-standards/rml/. It needs a JDK
(RMLMapper self-provisions into a repo-root .rmlmapper/ cache on first use)
and the tools/opda-gen Python virtualenv, which the harness scripts already
invoke directly (../opda-gen/.venv/bin/python) — no separate setup.
Make targets
cd source/03-standards/rml | Target | What it does |
|---|---|
make provenance-test | Primary gate. RML↔OWL consistency + resource↔schema-location tracing (Jena arq). No instance data. |
make dct-audit | Audits every ontology dct:source citation against the canonical schema dictionary. |
make rml-test | Full instance-materialisation pipeline: 3 conformant fixtures (sound + layer-1-complete) + 1 negative (must SHACL-violate) + the acyclicity regression guard. |
make rml-map | Materialise the default fixture → build/out.nt. |
make rml-shacl | Validate build/out.nt against opda-shapes-merged.ttl. |
make rml-complete | Layer-1 completeness gate over the materialised output. |
make rml-pytest | Runs tests/test_rml_mapping.py (sound / complete / negative assertions). |
python3 build/final_scope2.py | Regenerates build/final-gap.json — the domain-module resource coverage figure cited on the section overview and Coverage & gaps. |
Run against any conformant PDTF instance directly:
../opda-gen/.venv/bin/python harness/run_mapping.py \
--mapping mapping/opda-pdtf.rml.ttl \
--data ../../source/03-standards/schemas/src/examples/v3/exampleTransaction.json \
--out build/out.nt
bash harness/validate_shacl.sh build/out.nt File layout
| Path | Role |
|---|---|
mapping/opda-pdtf.rml.ttl | The mapping itself — the canonical deliverable. |
mapping/functions/ | FnO functions.ttl + the Java UDF (OpdaFunctions.java) RMLMapper loads for the enum → SKOS-concept-IRI function and date truncation. |
CONTRACT.md | The build contract — ground-truth inputs, namespace law, layer-1/layer-2 definitions, "definitions of done." |
README.md | Usage, the scope/coverage ledger, SHACL traps handled. |
provenance-index.json / .md | The leaf→predicate inversion — machine and human form. |
harness/ | run_mapping.py, validate_shacl.sh, check_completeness.py, audit_dct_source.py, validate_provenance.py. |
testdata/ | 4 fixtures (3 conformant + 1 negative) + MANIFEST.md describing what each exercises. |
tests/test_rml_mapping.py | The pytest suite — sound / complete / negative assertions. |
build/ | Generated output — N-Triples + JSON reports, including final-gap.json. Gitignored; regenerate locally, don't expect it fresh on a clone. |
Two documents in this directory, gap-register.md and
ONTOLOGY-COVERAGE.md, are point-in-time audits from earlier in the
gap-closing effort and now carry their own superseded-notices pointing at
build/final-gap.json as current truth — the same reason
Coverage & gaps on this site cites that file and not them.
Comments
Loading comments…
Sign in to post a comment