Repository navigation
Mint Plazi resource IRIs with https:// as the canonical scheme - #34
Merged
Merged
Conversation
This was referenced Sep 19, 2026
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The material-citation rewrite misses valid URI variants, allowing some Plazi IRIs to remain http://.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
What changed in this PR
Updates gg2rdf to mint Plazi resource IRIs with canonical https:// schemes.
Changes:
- Converts treatment, citation, taxon, and publication IRIs to HTTPS.
- Normalizes Plazi material-citation
httpUrivalues. - Documents the canonical scheme and migration context.
| File | Description |
|---|---|
src/gg2rdf.ts |
Updates IRI generation and normalization. |
README.md |
Documents resource IRI conventions. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Collaborator
Author
retog
force-pushed
the
https-canonical-iris
branch
from
September 25, 2026 15:32
f72b568 to
af692c6
Compare
Treatment, material citation, taxon name, taxon concept and DOI-less publication IRIs were written as http://, while the loaders name the graph a treatment lands in https://treatment.plazi.org/id/<id>. A treatment therefore never shared an IRI with its own graph, and `GRAPH ?g { ?g ?p ?o }` returned nothing, silently. https:// resolves on every Plazi host and is already what trt:httpUri used, so it becomes the scheme for every instance IRI. A `httpUri` attribute TreatmentBank supplies with http:// is rewritten to https:// when it points at a Plazi host, so that the scheme of a subject never depends on upstream data. The vocabulary namespace trt: stays http:// on purpose: changing it breaks every consumer's prefix declarations and belongs to a redesign of the ontologies. Closes #33. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
retog
force-pushed
the
https-canonical-iris
branch
from
September 29, 2026 13:07
af692c6 to
62a5030
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
retog
added a commit
to plazi/turtle-hook
that referenced
this pull request
Sep 29, 2026
The subject-IRI change is implemented in plazi/gg2rdf#34; #33 is the issue it closes, so cite both. The graph-per-file migration filter leaves COL_GRAPH out, which review flagged as an omission. It is on purpose: the Catalogue of Life data (plazi/catologueoflife-to-rdf) holds only catalogueoflife.org IRIs and no Plazi resource, so there is nothing in it to rename. The README now says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
retog
added a commit
to plazi/turtle-hook
that referenced
this pull request
Sep 29, 2026
…on (#13) * Follow gg2rdf to https:// subject IRIs and document the store migration gg2rdf now mints every Plazi resource IRI as https:// (plazi/gg2rdf#33), the scheme this loader has always named its graphs with. The subject namespaces that have to match gg2rdf's output follow: the treatment and material-citation prefixes the single-graph delete is scoped by, and the taxon-name and taxon-concept namespaces the sweep and the taxomplete index are limited to. graphUriPrefix is untouched, as the comment on it demands. The fixture is regenerated gg2rdf output; the inline test data and the README's sweep query follow suit. A store loaded before the switch holds http:// subjects that this loader can no longer find, so it has to be renamed in place before the loader is deployed. The README gains the rename update, scoped to our graph and nothing else, and the order of operations. The test engine moves to oxigraph 0.5: 0.4.11 evaluates the owned-subject DELETE wrongly once the filter prefixes are https:// and leaves the material citations behind, while a SELECT with the same WHERE clause is correct. Test-only dependency. Closes #12. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Cite gg2rdf#34 for the https switch and say why COL_GRAPH is not renamed The subject-IRI change is implemented in plazi/gg2rdf#34; #33 is the issue it closes, so cite both. The graph-per-file migration filter leaves COL_GRAPH out, which review flagged as an omission. It is on purpose: the Catalogue of Life data (plazi/catologueoflife-to-rdf) holds only catalogueoflife.org IRIs and no Plazi resource, so there is nothing in it to rename. The README now says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Closes #33.
What changes
Every IRI gg2rdf mints for a Plazi resource is now
https://:src/gg2rdf.tsL236)http://treatment.plazi.org/id/<id>https://…http://tb.plazi.org/GgServer/dwcaRecords/<id>.mc.<n>https://…http://treatment.plazi.org/id/<id>/<specimenCode>https://…http://taxon-name.plazi.org/id/<kingdom>https://…http://taxon-concept.plazi.org/id/<kingdom>https://…http://publication.plazi.org/id/<masterDocId>https://…trt:httpUri(L830) was alreadyhttps://and is unchanged.One step beyond the issue's list, flagged for review: a
httpUriattribute that TreatmentBank supplies on a material citation is passed through as its IRI when there is neither anidnor a GBIF occurrence. TreatmentBank still hands outhttp://for its own resources, so that value is now rewritten tohttps://when — and only when — it points at a*.plazi.orghost. Without this the scheme of a subject would depend on upstream data. Identifiers of other publishers (DOIs, GBIF) are left as they are.The vocabulary namespace
trt:(http://plazi.org/vocab/treatment#) stayshttp://, as the issue scopes: changing it breaks every consumer's prefix declarations and belongs to a redesign of the ontologies.The README gains a "Resource IRIs" section stating the canonical scheme.
Verification
deno check src/gg2rdf.tspasses.deno run src/gg2rdf.ts -i example-data/000040332F2853C295734E7BD4190F05.xmlproduces nohttp://IRI under any Plazi host; the output is byte-identical to the fixture turtle-hook uses (test-data/000040332F2853C295734E7BD4190F05.ttlafter the same flip), so the two repos agree on the shape.What this does not do, and what has to follow
treatments-rdfand both stores holdhttp://subjects. The stores can be renamed in place with oneDELETE/INSERT WHERE(the statement and the order of operations are in the issue and now in turtle-hook's README); regeneratingtreatments-rdfis off the critical path.https://taxon-name.plazi.org/id/Animaliastill answers withrdf:about="http://taxon-name.plazi.org/id/Animalia"(checked 2026-09-19). That RDF comes from GgServer, not from this pipeline. For now it is treated as legacy, deliberately: the store sayshttps://and the dereferenced description sayshttp://, and that stays so until the linked-data side (this change, the loaders, the store rename) is solid. Making the two consistent is a later step, not part of this change.🤖 Generated with Claude Code