Skip to content

CLAUDE.md: refresh for the current repo (ontology + site + mappings)

Steve CAPELL requested to merge vocabulary-cleanup into main

Summary

This branch finishes treating Buy-Ship-Pay (BSP) and the UN Transparency Protocol (UNTP) as the legacy sources UNSCRO replaces, not external peers. It removes their now-dangling in-band references, keeps provenance in the ledgers, and fixes the documentation and resolvable-vocabulary sites. validate-vocab.py passes all seven gates.

Vocabulary

  • Remove all in-band BSP/UNTP mappings: skos:*Match to unece:/untp: (79) and term-level dcterms:source (703). Provenance is preserved in the methodology/ ledgers; scheme-level dcterms:source anchors are kept for the code-list gate.
  • Remove 7,035 legacy owl:sameAs self-references from code-list schemes and concepts; external mappings (QUDT on units) are kept. rdflib-verified: only the intended triples removed, nothing else changed.

Documentation site (GitLab Pages)

  • Apply the writing style to the hand-authored pages (remove em dashes, trim prose-emphasis bold, plainer phrasing).
  • Link class names and code lists on the ontology pages to their published vocabulary URLs; give the "Classes" and "Code lists" headings stable anchors (#classes, #code-lists) that do not change as terms are added or removed.
  • Move BSP/UNTP out of the External Vocabularies register into a "Sources" table under "How UNSCRO was built"; drop them as mapping targets.
  • Fix the clickable domain diagrams so their links point at /docs/ontology/<domain>/.

Resolvable vocabulary (test.uncefact.org/vocabulary)

  • Fix the local content-negotiation server (mount-prefix stripping) and the diagram class links (/vocabulary/<name>), which were also broken on the deployed site.
  • Rework the landing page: high-level domain map linked to the vocab domain pages, a one-line description plus a link to the documentation site, a content-negotiation callout with curl examples for HTML/JSON-LD/Turtle, and alphabetical hyperlinked Classes and Code lists tables.

Tooling

  • Derive the vocabulary base URI from ontology/prefixes.ttl across all scripts, so a host cutover (test to prod) is a single TTL rebase.
  • Stop the code-list generators emitting owl:sameAs, and fix a base-hardcoding bug in four generators.
  • Delete build-ld-mappings.py so the frozen grounding-test coverage cannot be overwritten.

Notes

  • No CI/CD changes; the resolvable-vocab build is unaffected.
  • The base currently resolves to test.uncefact.org/vocabulary/. At cutover, rebase the TTL to vocabulary.uncefact.org/ and every script, page and link follows automatically.

Merge request reports

Loading