chore: normalize lowercase metpo: CURIE prefix to uppercase METPO:#558
Merged
Conversation
Aligns hand-authored RDF, SPARQL, and docs with the blessed prefix scheme from #16: uppercase CURIE prefix METPO: over the lowercase URI path https://w3id.org/metpo/. Adds a CI guard so lowercase metpo: prefixes do not creep back in. Deliberately not touched: - Generated release artifacts (metpo.obo/-base/-full and the .owl) still emit lowercase idspace: metpo; fixing that needs a generator change plus a rebuild and is tracked in #557. - external/metpo_historical/*.owl are frozen archival submissions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Normalizes the METPO CURIE prefix casing across hand-authored RDF/SPARQL/docs to consistently use uppercase METPO: (while keeping the namespace IRI https://w3id.org/metpo/ lowercase), and adds CI enforcement to prevent reintroducing lowercase metpo: CURIE prefixes.
Changes:
- Replace
metpo:CURIE prefix bindings/usages withMETPO:across affected.ttl,.rq/.sparql, and.mdsources. - Update one SPARQL query’s emitted display CURIE to the canonical uppercase form (
"METPO:"). - Add a repo guard script plus a dedicated GitHub Actions workflow to fail PRs that reintroduce lowercase
metpo:CURIE prefixes in tracked RDF/SPARQL/doc file types.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/sparql_qc/qc-positive-fixture.ttl | Updates fixture data to use METPO: and adds clarifying fixture-only comment. |
| tests/check_curie_prefix_case.sh | Adds a git grep-based guard to detect lowercase metpo: CURIE prefixes in tracked .ttl/.rq/.sparql/.md. |
| sparql/README.md | Updates documentation examples to reference METPO: instead of metpo:. |
| sparql/query_metpo_entities.sparql | Renames the prefix declaration to PREFIX METPO:. |
| sparql/chem_interaction_props.rq | Updates the query header comment to reference METPO:. |
| sparql/bacdive_oxygen_phenotype_mappings.rq | Changes the display CURIE generation to emit METPO: instead of metpo:. |
| docs/src/sparql/definition_sources.sparql | Renames the prefix declaration to PREFIX METPO:. |
| docs/presentations/icbo_2025/icbo_metpo_slides.md | Updates slide examples to use METPO:. |
| docs/presentations/icbo_2025/figures/metpo_viz/key_properties.ttl | Updates visualization Turtle to use METPO: throughout. |
| docs/presentations/icbo_2025/figures/metpo_viz/current_metpo_structure.ttl | Updates Turtle snippet to use METPO: throughout. |
| docs/n4l/graphdb_workflow/sparql/metpo_classes_temperature_limits.rq | Updates archived workflow query to use METPO: in prefix and term references. |
| .github/workflows/curie-prefix-case.yml | Adds CI workflow to run the guard script on pushes/PRs to main. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 the gap between the blessed prefix decision (#16) and the hand-authored source: the CURIE prefix should be uppercase
METPO:over the lowercase URI pathhttps://w3id.org/metpo/(matches bioregistrypreferred_prefix: METPO,README.md,metpo-odk.yaml,metpo-idranges.owl).Normalizes
metpo:->METPO:in 9 RDF/SPARQL/doc files (prefix bindings and usages flipped together, so resolution is unchanged), plus adds a CI guard.One change affects emitted output, called out for review:
sparql/bacdive_oxygen_phenotype_mappings.rqbuilds a display CURIE; itsBIND(... "metpo:" ...)becomes"METPO:", so the?metpo_curiecolumn is now emitted in canonical case.New guard
tests/check_curie_prefix_case.sh+curie-prefix-case.ymlworkflow fails on a lowercasemetpo:CURIE prefix in tracked.ttl/.rq/.sparql/.md. Its regex ignores non-CURIEmetpo:(Make targets likeload-metpo:, YAML keys, Python names). Verified locally: passes clean, catches a planted violation, ignores the false positives.Deliberately out of scope:
metpo.obo/-base/-full,.owl) still carry lowercaseidspace: metpo; that needs a generator fix + rebuild and is tracked in Generated .obo artifacts emit lowercaseidspace: metpoinstead of the blessedMETPOprefix #557 (so the guard does not scan them).external/metpo_historical/*.owlare frozen archival BioPortal submissions, left as-is.metpo:<filename>placeholder id inanalyze_metpo_grounding.pyis an internal analysis id, not an ontology term CURIE, so it is left as-is and outside the guard's RDF/query/doc scope.