Skip to content

Fix review findings for the owlmake migration - #2769

Merged
jamesamcl merged 4 commits into
owlmake-migrationfrom
claude/pr-2768-review-qmdgu1
Aug 26, 2026
Merged

jamesamcl merged 4 commits into
owlmake-migrationfrom
claude/pr-2768-review-qmdgu1

Conversation

@jamesamcl

Copy link
Copy Markdown
Member

Fixes for the findings from the #2768 review, targeted at owlmake-migration so merging folds them into that PR. Four commits, validated against a locally built om 0.2.2 (plan loads, --list-targets resolves every new target, and the import-refresh procedure below was verified by real runs).

Plan (owlmake.yaml)

  • mirror/hpoa.owl and mirror/mondo-owl.owl now have producers: op: fetch rules using the URLs from get_mirrors.sh, registered in the mirrors refresh group, so the d2p components are buildable from the plan alone. ⚠️ Note for the author: https://data.monarchinitiative.org/ttl/hpoa.ttl currently returns 404 upstream — get_mirrors.sh was equally broken, so this is pre-existing URL rot, but a replacement hpoa source needs choosing. The failure is loud and names the URL.
  • Deleted the two inert rules (build/fbbt-self-xref.txt, remove-fbbt-self-xref) whose SPARQL files exist on neither branch.
  • Encoded the merged-ontology-removal pipeline for its five instantiable ontologies (chebi, cl, fbbt, hp, obi): filtered-X-mirror.owl → efo-edit-without-X.owl → remaining-X.ofn → preserve-axioms-X.{ttl,owl} → phony dump_X, translated op-for-op from the deleted Makefile (lines 112–141). The one-shot %_terms_in_src bootstrap was deliberately not encoded — it overwrites curated iri_dependencies/*_terms.txt files.
  • HGNC auto-exclude echo now reads its count file by root-relative path (the count printed empty before).

Import-refresh docs — corrected to what actually works

Testing showed -B does not override a kept refresh group, even on an explicitly named target: om make mirror/hancestro.owl -B and om make imports/hancestro_import.owl -B both no-op with "pinned (MIR=false)" / "pinned (IMP=false)". So both prior procedures — the one-step -B and the two-step mirror-then-import — were wrong. All five documents (CLAUDE.md, .claude/agents/efo-importer.md, .github/agents/EFO-importer.md, .github/copilot-instructions.md, docs/Import_terms_from_another_ontology.md) now describe the verified command:

om make imports/<ontology>_import.owl --rebuild mirrors,imports

Verified end-to-end on hancestro: re-fetches the mirror, regenerates the import, and reproduced hancestro_import.owl byte-identically on an unchanged seed list.

One owlmake version line, never mixed

The branch mixed three schemes (image 0.2-python, an exact release, releases/latest in the README). Since EFO and owlmake are developed together, every environment now tracks latest — latest-python for the QC and ID-allocation containers, releases/latest for the copilot-setup binary, matching the README — with owlmake.yaml's min_owlmake_version as the floor that fails a lagging environment outright.

Workflows and doc tidy-ups

  • allocate-definitive-ids.yml spells the target om make allocate-definitive-ids (the bare form worked via default_to_make, but the explicit spelling is self-evident).
  • qc.yml: stale # Basic ODK workflow header and unused DEFAULT_BRANCH removed.
  • docs/odk-workflows/components.md rewritten for the owlmake build (it still described ODK yaml + custom Makefiles).
  • Left alone by design: neoplasm.Makefile (stays in tree, unused), default_targets (omitting all_imports matches the refresh-group semantics; the explicit all target still includes it).

🤖 Generated with Claude Code

https://claude.ai/code/session_01RMkT6NpLSiwerUD773q8V1


Generated by Claude Code

claude added 3 commits August 26, 2026 15:36
Plan (owlmake.yaml):
- Add fetch rules for mirror/hpoa.owl and mirror/mondo-owl.owl (the two
  non-import fetches from get_mirrors.sh that had no producer in the plan)
  and register them in the mirrors refresh group, so the d2p components
  build on a fresh clone.
- Delete the two inert rules referencing SPARQL files that do not exist
  (build/fbbt-self-xref.txt, remove-fbbt-self-xref).
- Encode the merged-ontology-removal pipeline for its five instantiable
  ontologies (chebi, cl, fbbt, hp, obi): filtered-X-mirror.owl,
  efo-edit-without-X.owl, remaining-X.ofn, preserve-axioms-X.{ttl,owl}
  and phony dump_X, translated from the deleted Makefile lines 112-141.
- Fix the HGNC auto-exclude echo to read the terms file by its
  root-relative path, so the reported count is no longer empty.

Docs: make .claude/agents/efo-importer.md and
docs/Import_terms_from_another_ontology.md describe the same two-step
import refresh as the .github variants (refresh the mirror explicitly,
then rebuild the import): mirrors are kept by default, so -B on the
import target reuses the on-disk mirror rather than re-fetching it.
Rewrite docs/odk-workflows/components.md for the owlmake build.

Workflows: spell the ID-allocation step om make allocate-definitive-ids;
pin the copilot-setup owlmake download to v0.2.2 instead of latest; drop
qc.yml's stale ODK header and unused DEFAULT_BRANCH.

Refs #2768.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RMkT6NpLSiwerUD773q8V1
…s,imports

Validating the previous commit's two-step procedure against om 0.2.2 showed
it does not work: mirrors AND imports are refresh groups the plan keeps by
default, and a kept target is reused even when named explicitly with -B
(om make mirror/hancestro.owl -B and om make imports/hancestro_import.owl -B
both no-op with "pinned (MIR=false)" / "pinned (IMP=false)"). The .github
docs' two-step spelling had the same defect, so all five documents now
describe the one verified command:

    om make imports/<ontology>_import.owl --rebuild mirrors,imports

which re-downloads the plan-named mirror and regenerates the import, touching
only the requested target's closure (verified: re-fetches hancestro.owl and
rewrites hancestro_import.owl byte-identically on an unchanged seed list).
The full-set spelling becomes om make all_imports --rebuild mirrors,imports.

Files: CLAUDE.md, .claude/agents/efo-importer.md,
.github/agents/EFO-importer.md, .github/copilot-instructions.md,
docs/Import_terms_from_another_ontology.md.

Refs #2768.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RMkT6NpLSiwerUD773q8V1
EFO and owlmake are developed together, so no environment pins an exact
owlmake release and no two environments follow different lines: the QC and
ID-allocation containers move from the 0.2-python image tag to latest-python,
and the copilot-setup binary download returns to releases/latest, matching
the README's editor install. owlmake.yaml's min_owlmake_version stays as the
floor that fails a build outright if an environment lags it.

Refs #2768.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RMkT6NpLSiwerUD773q8V1
The disease-to-phenotype component's hpoa half was built from Monarch's
dipper RDF (data.monarchinitiative.org/ttl/hpoa.ttl), which no longer
exists — the URL 404s and no current Monarch product publishes the OBAN
association model the d2p-hpoa.ru query consumed. Rebuild that half from
the maintained upstream instead: the plan fetches
purl.obolibrary.org/obo/hp/hpoa/phenotype.hpoa (already the IRI the
component stamps as dc:source) into the mirrors group, and a new
stdlib-only repo script, src/scripts/hpoa_to_d2p.py, converts it to the
same Turtle shape the MONDO half produces: disease skos:related
phenotype with a reified axiom per pair. ORPHA ids map to ORDO IRIs
(the form EFO's disease branch carries, matching the 77k Orphanet
axioms in the committed component); OMIM and DECIPHER map to their
entry URLs; NOT-qualified rows are excluded; all aspects are kept,
matching the inheritance terms present in the committed component.
d2p-hpoa.ru is deleted with the OBAN model it queried, and
get_mirrors.sh goes too — every fetch it performed is now a plan rule,
and its hpoa line was the dead URL.

Verified with om 0.2.2: om make components/d2p_hpoa.ttl fetches
phenotype.hpoa (35 MB) and writes 284,267 distinct disease-phenotype
pairs (128 MB Turtle), which om convert parses and maps to axioms
cleanly in 26s.

Refs #2768.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RMkT6NpLSiwerUD773q8V1
@jamesamcl
jamesamcl merged commit 91c96ce into owlmake-migration Aug 26, 2026
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