Skip to content

Commit 218b2dc

Browse files
committed
Use OFN as the intermediate format more widely.
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.
1 parent 898d9dd commit 218b2dc

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/incatools/odk/templates/src/ontology/Makefile.jinja2

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ $(PRESEED): $(SRCMERGED)
504504
$(SRCMERGED): $(EDIT_PREPROCESSED) $(OTHER_SRC)
505505
$(ROBOT) remove --input $< --select imports --trim false \
506506
merge $(foreach src, $(OTHER_SRC), --input $(src)) \
507-
--output $@
507+
convert --format ofn --output $@
508508

509509
$(EDIT_PREPROCESSED): $(SRC)
510510
$(ROBOT) convert --input $< --format ofn --output $@
@@ -838,9 +838,8 @@ $(COMPONENTSDIR)/{{ component.filename }}: download-component-{{ component.filen
838838
@if [ -f $(TMPDIR)/download-component-{{ component.filename }} ]; then \
839839
$(ROBOT) merge -i $(TMPDIR)/download-component-{{ component.filename }} \{% if component.make_base %}
840840
remove {% for iri in component.base_iris %}--base-iri {{ iri }} \
841-
{% endfor %}--axioms external --preserve-structure false --trim false \{% endif %}
842-
annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \
843-
--output $@ ; \
841+
{% endfor %}--axioms external --preserve-structure false --trim false \{% endif %}\
842+
$(ANNOTATE_CONVERT_FILE) ; \
844843
fi
845844

846845
.PRECIOUS: $(COMPONENTSDIR)/{{ component.filename }}
@@ -905,7 +904,7 @@ $(MIRRORDIR)/{{ ont.id }}.owl: download-mirror-{{ ont.id }}
905904
--base-iri {{ iri }} \{% endfor %}{% else %}
906905
--base-iri $(OBOBASE)/{{ ont.id.upper() }} \{% endif %}
907906
--axioms external --preserve-structure false --trim false \
908-
convert {% else %}convert -i $(TMPDIR)/download-mirror-{{ ont.id }}.owl {% endif %}-o $@ ; \
907+
convert {% else %}convert -i $(TMPDIR)/download-mirror-{{ ont.id }}.owl {% endif %}--format ofn -o $@ ; \
909908
fi
910909

911910
{% if ont.is_large -%}
@@ -924,7 +923,7 @@ MERGE_MIRRORS = true
924923

925924
ifeq ($(MERGE_MIRRORS),true)
926925
$(MIRRORDIR)/merged.owl: $(ALL_MIRRORS)
927-
$(ROBOT) merge $(patsubst %, -i %, $^) {% if project.import_group.annotate_defined_by %}--annotate-defined-by true{% endif %} {% if project.import_group.base_merge_drop_equivalent_class_axioms %}remove --axioms equivalent --preserve-structure false {% endif %}-o $@
926+
$(ROBOT) merge $(patsubst %, -i %, $^) {% if project.import_group.annotate_defined_by %}--annotate-defined-by true{% endif %} {% if project.import_group.base_merge_drop_equivalent_class_axioms %}remove --axioms equivalent --preserve-structure false {% endif %}--format ofn -o $@
928927
.PRECIOUS: $(MIRRORDIR)/merged.owl
929928
endif
930929
{% endif -%}

0 commit comments

Comments
 (0)