Skip to content

chore: normalize lowercase metpo: CURIE prefix to uppercase METPO:#558

Merged
turbomam merged 2 commits into
mainfrom
chore/normalize-metpo-curie-prefix
Jun 26, 2026
Merged

chore: normalize lowercase metpo: CURIE prefix to uppercase METPO:#558
turbomam merged 2 commits into
mainfrom
chore/normalize-metpo-curie-prefix

Conversation

@turbomam

Copy link
Copy Markdown
Contributor

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 path https://w3id.org/metpo/ (matches bioregistry preferred_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.rq builds a display CURIE; its BIND(... "metpo:" ...) becomes "METPO:", so the ?metpo_curie column is now emitted in canonical case.

New guard tests/check_curie_prefix_case.sh + curie-prefix-case.yml workflow fails on a lowercase metpo: CURIE prefix in tracked .ttl/.rq/.sparql/.md. Its regex ignores non-CURIE metpo: (Make targets like load-metpo:, YAML keys, Python names). Verified locally: passes clean, catches a planted violation, ignores the false positives.

Deliberately out of scope:

  • Generated release artifacts (metpo.obo/-base/-full, .owl) still carry lowercase idspace: metpo; that needs a generator fix + rebuild and is tracked in Generated .obo artifacts emit lowercase idspace: metpo instead of the blessed METPO prefix #557 (so the guard does not scan them).
  • external/metpo_historical/*.owl are frozen archival BioPortal submissions, left as-is.
  • A synthetic metpo:<filename> placeholder id in analyze_metpo_grounding.py is an internal analysis id, not an ontology term CURIE, so it is left as-is and outside the guard's RDF/query/doc scope.

turbomam and others added 2 commits June 26, 2026 15:35
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>
Copilot AI review requested due to automatic review settings June 26, 2026 19:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 with METPO: across affected .ttl, .rq/.sparql, and .md sources.
  • 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.

@turbomam turbomam merged commit 3a20b5b into main Jun 26, 2026
16 checks passed
@turbomam turbomam deleted the chore/normalize-metpo-curie-prefix branch June 26, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants