Skip to content

Download uberon.obo into tmp/ so each build converts a fresh copy - #1700

Open
turbomam wants to merge 3 commits into
masterfrom
uberon-download-in-tmp
Open

turbomam wants to merge 3 commits into
masterfrom
uberon-download-in-tmp

Conversation

@turbomam

@turbomam turbomam commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

The mirror/uberon.owl rule ran wget with no -O, so uberon.obo landed in src/envo/. On a second build wget saved the download as uberon.obo.1 and owltools converted the old file. The rule now runs mkdir -p $(TMPDIR), downloads with -O $(TMPDIR)/uberon.obo, and owltools reads the file from there. That puts the download under make clean. The rule keeps its comment linking the PR below.

I checked this in obolibrary/odkfull:v1.6 on 2026-11-02. Two forced rebuilds with make -B mirror/uberon.owl both exit 0, write only tmp/uberon.obo, and leave no uberon.obo files in src/envo/. make clean then empties tmp/.

Related:

Closes #1699

Copilot AI balanced review requested due to automatic review settings November 2, 2026 15:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues for the UBERON temporary-path update.

No open issues 🎉

What changed in this PR

Fixes stale UBERON input reuse in the ontology build by downloading to a consistent temporary path, addressing #1699.

Changes:

  • Creates $(TMPDIR) and uses wget -O to overwrite $(TMPDIR)/uberon.obo.
  • Converts that downloaded file with owltools, keeping the input within the existing make clean scope.
File Description
src/​envo/​Makefile Updates the UBERON mirror rule to download and convert a fresh copy under $(TMPDIR).

Review effort: Balanced

@pbuttigieg pbuttigieg left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks cleaner. Could you confirm why we're working with the OBO vs the OWL (and perhaps add that as a comment in the makefile)?

@matentzn any insight there ?

@turbomam

turbomam commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

confirm why we're working with the OBO vs the OWL

I added the makefile comment. Good idea.

I don't know why the build read uberon.obo originally. The download-then-owltools step comes from

where @cmungall explained that the OWLAPI inside owltools did not follow the PURL redirect and tried to parse the error page. The failing command there already read uberon.obo, so the OBO choice predates that fix. I added a Makefile comment saying this in

It also notes that mirroring uberon-base.owl with ROBOT the way ODK does would remove the need for owltools and the OBO file. I opened an issue for that so it isn't lost, but the release doesn't need it:

@turbomam
turbomam requested a review from cmungall November 2, 2026 15:45
@turbomam

turbomam commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

Was using OBO instead of OWL a pragmatic solution to avoiding the numerous axioms that are imported into EnvO for Uberon?

Who else uses tmp/ ?

@turbomam

turbomam commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

If we decided to import OWL instead of OBO, would ROBOT has an elegant solution for not importing anything other than subClasssOf assertions?

@pbuttigieg

Copy link
Copy Markdown
Member

Was using OBO instead of OWL a pragmatic solution to avoiding the numerous axioms that are imported into EnvO for Uberon?

Who else uses tmp/ ?

It may have been - this is some years back, so recollection is foggy and documentation wasn't so high on the agenda. If we can use the OWL file with ROBOT stripping away superfluous axioms (for import purposes), this would be better in my opinion.

@matentzn matentzn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

On the questions for me (@pbuttigieg, @turbomam):

Why OBO and not OWL? Historical. My guess is the usual one from back then: uberon.owl was heavy (imports, GCIs, taxon constraints) and the OBO was the lighter thing to grab. It hardly matters for the output, though. --make-subset-by-properties -f $(KEEPRELS), --remove-external-classes and the annotation stripping cut the mirror down to the same small graph from either format.

Can ROBOT strip it down to subClassOf? Yes. filter/remove take --axioms (subclass, equivalent, logical, annotation, external, ...), so something like robot merge -I .../uberon-base.owl remove --base-iri UBERON --axioms external filter --axioms "subclass" --trim false gets you subClassOf only. ODK goes further with extract -m BOT on the seed plus its minimal/"simple" import modes. That's #1703. I agree with @pbuttigieg that it's the better setup, but it doesn't need to block this.

Who else uses tmp/? validate-dl-profile (tmp/validate.ofn) and a few targets in envo.Makefile (tmp/envo-edit-merged.owl, tmp/tags-dosdp.*). They're all scratch files, src/envo/tmp is gitignored, and make clean empties it, so a downloaded OBO fits there fine.

This branch has not been deployed

No deployments
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.

mirror/uberon.owl is built from a stale uberon.obo when one is already in src/envo

4 participants