Skip to content

Use OFN as the intermediate format more widely.#8

Merged
gouttegd merged 3 commits intomainfrom
use-ofn-as-intermediate-format
Apr 20, 2026
Merged

Use OFN as the intermediate format more widely.#8
gouttegd merged 3 commits intomainfrom
use-ofn-as-intermediate-format

Conversation

@gouttegd
Copy link
Copy Markdown
Collaborator

OFN is already the default intermediate format for import modules and components. This commit makes it the format for more files, including:

  • the $(EDIT_PREPROCESSED) file;
  • the $(SRCMERGED) file (strictly speaking this is not necessary: the $(SRCMERGED) variable points to a file with a .ofn extension, so ROBOT already writes that file in OFN format;
  • remotely sourced components;
  • the merged mirror file.

Part of INCATools/ontology-development-kit#1299

@gouttegd gouttegd self-assigned this Mar 15, 2026
@gouttegd gouttegd force-pushed the use-ofn-as-intermediate-format branch from 218b2dc to c9db026 Compare March 15, 2026 16:40
OFN is already the default intermediate format for import modules and
components. This commit makes it the format for more files, including:

* the $(EDIT_PREPROCESSED) file;
* the $(SRCMERGED) file (strictly speaking this is not necessary: the
  `$(SRCMERGED)` variable points to a file with a `.ofn` extension, so
  ROBOT already writes that file in OFN format;
* remotely sourced components;
* the merged mirror file.
@gouttegd gouttegd force-pushed the use-ofn-as-intermediate-format branch from c9db026 to 83b48b0 Compare March 15, 2026 17:24
Copy link
Copy Markdown

@matentzn matentzn left a comment

Choose a reason for hiding this comment

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

Here is one that makes sense to change:

$(TRANSLATIONSDIR)/%.babelon.owl: $(TRANSLATIONSDIR)/%-preprocessed.babelon.tsv
	$(BABELONPY) convert $< --output-format owl -o $@.tmp
	$(ROBOT) merge -i $@.tmp \
		annotate \
			--ontology-iri $(ONTBASE)/translations/$*.babelon.owl \
			-V $(ONTBASE)/releases/$(VERSION)/translations/$*.babelon.owl \
			--annotation owl:versionInfo $(VERSION) \
		convert -f owl --output $@

Silly and not necessary in this PR (only cosmetic if you want to fix and boost performance a bit):

reason_test: $(EDIT_PREPROCESSED)
	$(ROBOT) reason --input $< --reasoner $(REASONER) --equivalent-classes-allowed {{ project.allow_equivalents }} \
		--exclude-tautologies {{ project.exclude_tautologies }} --output test.owl && rm test.owl

We can drop --output test.owl && rm test.owl to not even generate this file at all.

@gouttegd
Copy link
Copy Markdown
Collaborator Author

Here is one that makes sense to change:

$(TRANSLATIONSDIR)/%.babelon.owl: $(TRANSLATIONSDIR)/%-preprocessed.babelon.tsv

Along with its siblings $(TRANSLATIONSDIR)/%.synonyms.owl, I suppose?

Silly and not necessary in this PR (only cosmetic if you want to fix and boost performance a bit):
[…]
We can drop --output test.owl && rm test.owl to not even generate this file at all.

I plan to deal with this type of silliness in a dedicated, “Uberon-Makefile-cleanup-style” PR later. :)

OWL translation files (`$(TRANSLATIONSDIR)/*.owl`) are intermediate
files (they are used to produce the "international" release product), so
we switch them to OFN format as the other intermediate files.
@gouttegd gouttegd requested a review from matentzn April 20, 2026 12:08
@matentzn
Copy link
Copy Markdown

wonderful PR and much needed

@gouttegd gouttegd merged commit ae379e4 into main Apr 20, 2026
6 checks passed
@gouttegd gouttegd deleted the use-ofn-as-intermediate-format branch April 20, 2026 12:28
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