Repository navigation
Canonical OWL layout: ROBOT formatter, pre-commit hook and CI check; validator reads XML - #154
Merged
Merged
Conversation
…logy as XML Any tool may write the ontology; tools/format-owl.sh (ROBOT 1.9.11, pinned in tools/robot.version) rewrites it into one layout so identical content has identical bytes. The pre-commit hook runs it on staged ontologies/*.owl, and the OWL format workflow fails a PR whose files are not canonical. The validator and the two notebook builders read and edit the file as XML instead of by line, because the layout is no longer theirs. Diff scoping of ontology findings compares statements, not line text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Output of tools/format-owl.sh, nothing else. ROBOT diff reports the ontologies identical to the previous commit; every later diff to these files shows only content. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # ontologies/ari_t1d.owl
This was referenced Oct 25, 2026
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.
Summary
Project 0 of the ontology modules design (#153). Every
ontologies/*.owlis now in one canonical layout, the one ROBOT writes, so the same content always has the same bytes. The app (owlready2), Protégé and scripts can each write the ontology, and a diff shows only what changed.tools/format-owl.sh [--check]robot convertat the release pinned intools/robot.version(1.9.11; the jar's sha256 is checked)..cache/robot/on first use.ontologies/catalog-v001.xmlresolves theari_uberonimport locally, for ROBOT and Protégé..githooks/pre-commitontologies/*.owl. Install it once withgit config core.hooksPath .githooks.OWL formatworkflow fails a PR whose ontology files are not canonical..gitattributeskeeps*.owl,*.shand the hooks LF on every platform.validate_mappings.pyreads the ontology as XML (expat) instead of matching lines. With--since, an ontology finding counts as new only when its statement (subject, property, value) is new.build_symptom_mapping.pyandbuild_uberon_import.pyeditari_t1d.owlas XML and leave the layout to the formatter.ari_t1d.owlandari_uberon.owl, with no content change.Verification
robot diffon the reformat commit reports the ontologies identical. owlready2 loads both versions with the same 228 diseases, 2,294 symptoms and all 37,290 property values, and the import resolves.symptomConceptis still caught.--since HEAD~1on the reformat commit reports 0 findings.--check: exits 1 on an unformatted file. Under Java 8,format-owl.shexits with a clear message.Merge order
This pairs with KrishnaTO/ARI-metadata-manager
canonical-owl-format. Once this is onmain, the deployed app's line splice can no longer order a publish: it matches nothing in this layout and appends every block. So the cutover goes:edit/*PRs.Each server step needs confirmation at the time. Both this PR and #153 add a changelog entry at the top, so whichever merges second needs a one-line rebase.
🤖 Generated with Claude Code