Repository navigation
Follow gg2rdf to https:// subject IRIs and document the store migration - #13
Merged
Merged
Conversation
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>
This was referenced Sep 19, 2026
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The graph-per-file migration omits COL_GRAPH, and the documented issue references need correction.
Review effort: Lite
Findings: None
What changed in this PR
Updates Turtle-Hook to consume gg2rdf’s canonical https:// resource IRIs and documents store migration.
Changes:
- Updates namespaces, fixtures, tests, and Catalogue of Life links.
- Adds migration guidance for both store graph modes.
- Upgrades the test-only Oxigraph dependency.
| File | Summary |
|---|---|
test-data/000040332F2853C295734E7BD4190F05.ttl |
Regenerated fixture with HTTPS IRIs. |
src/test_deps.ts |
Upgrades test-only Oxigraph. |
src/sparql.ts |
Updates taxon namespaces and documentation; nit (1 vote) to reference #34 for the subject-IRI change. |
src/sparql_test.ts |
Adjusts SPARQL fixtures and assertions for HTTPS IRIs. |
src/col_test.ts |
Updates Catalogue of Life test links. |
README.md |
Documents HTTPS migration; moderate issue (1 vote): graph-per-file migration omits COL_GRAPH; nit (1 vote) to correct issue references. |
config/config.ts |
Updates subject prefixes; nit (1 vote) to reference #34 for the subject-IRI change. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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>
Collaborator
Author
|
Addressed the Copilot review in eafcdcc:
|
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 #12.
Companion to plazi/gg2rdf#34 (the fix — gg2rdf mints
https://subjects) and plazi/turtle-hook-nq#8 (the other loader).What changes
gg2rdf now writes every Plazi resource IRI as
https://, the scheme this loader has always named its graphs with. The subject namespaces that have to match gg2rdf's output follow:config/config.ts:treatmentUriPrefixandmaterialCitationUriPrefix, which the single-graph delete is scoped by.src/sparql.ts:TAXON_NAME_NAMESPACEand the taxon-concept namespace inSWEEPABLE_NAMESPACES, which the sweep and the taxomplete index are limited to.graphUriPrefixis untouched, as the comment on it demands; the doc comments that explained the two prefixes by their scheme now explain them by their role.test-data/000040332F2853C295734E7BD4190F05.ttlis regenerated gg2rdf output from the branch in Mint Plazi resource IRIs with https:// as the canonical scheme gg2rdf#34 (byte-identical to flipping the scheme in the old fixture); the inline test data,col_test.ts's CoL→taxon-name link and the README's sweep query follow suit.Store migration
A store loaded before the switch holds
http://subjects that this loader can no longer find — insingle-graphmode the delete follows links from the stored treatment IRI, so an update to an old-style treatment would insert the new one next to the old rather than replace it. The README gains a section "Migrating a store to https:// IRIs": theDELETE/INSERT WHEREthat renames every affected IRI in subject and object position, scoped to our graph and nothing else; thegraph-per-filevariant; why predicates need no renaming; and the order of operations (stop loader → rename → deploy → start). This is the text from the discussion in plazi/gg2rdf#33, placed where an operator will look for it.Test engine
src/test_deps.tsmoves oxigraph from 0.4.11 to 0.5.11 (test-only dependency, not in the image). Reason, and worth knowing: with 0.4.11, the owned-subjectDELETEleaves the material citations behind once the filter prefixes arehttps://— while aSELECTwith the identicalWHEREclause returns them. Narrowed down to theSTRSTARTS(STR(?owned), "https://treatment.plazi.org/id/<id>/")clause; replacing its literal, or dropping it, makes 0.4.11 delete correctly, so this is an optimiser fault in the update path of the old version, not a property of the statement. 0.5.11 evaluates it correctly. The production endpoints (GraphDB on LINDAS, Blazegraph) are not oxigraph.Verification
deno test --allow-read --allow-env --allow-net src/: 27 passed, 0 failed (same count asmain).🤖 Generated with Claude Code