diff --git a/src/ontology/Makefile b/src/ontology/Makefile index a81b9592..15897504 100644 --- a/src/ontology/Makefile +++ b/src/ontology/Makefile @@ -1,7 +1,7 @@ # ---------------------------------------- # Makefile for oba # Generated using ontology-development-kit -# ODK Version: v1.4 +# ODK Version: v1.5 # ---------------------------------------- # IMPORTANT: DO NOT EDIT THIS FILE. To override default make goals, use oba.Makefile instead @@ -44,7 +44,7 @@ REPORT_PROFILE_OPTS = --profile $(ROBOT_PROFILE) OBO_FORMAT_OPTIONS = SPARQL_VALIDATION_CHECKS = equivalent-classes owldef-self-reference SPARQL_EXPORTS = basic-report -ODK_VERSION_MAKEFILE = v1.4 +ODK_VERSION_MAKEFILE = v1.5 TODAY ?= $(shell date +%Y-%m-%d) OBODATE ?= $(shell date +'%d:%m:%Y %H:%M') @@ -62,7 +62,7 @@ PATTERN_RELEASE_FILES= $(PATTERNDIR)/definitions.owl $(PATTERNDIR)/pattern. FORMATS = $(sort owl obo json owl) FORMATS_INCL_TSV = $(sort $(FORMATS) tsv) -RELEASE_ARTEFACTS = $(sort $(ONT)-base $(ONT)-full $(ONT)-basic $(ONT)-baseplus ) +RELEASE_ARTEFACTS = $(sort $(ONT)-base $(ONT)-full $(ONT)-basic $(ONT)-baselite ) # ---------------------------------------- # Top-level targets @@ -80,6 +80,10 @@ all_odk: odkversion test all_assets release_diff test: odkversion dosdp_validation reason_test sparql_test robot_reports $(REPORTDIR)/validate_profile_owl2dl_$(ONT).owl.txt echo "Finished running all tests successfully." +.PHONY: test +test_fast: + $(MAKE_FAST) test + .PHONY: release_diff release_diff: $(REPORTDIR)/release-diff.md @@ -430,7 +434,7 @@ mirror-ro: | $(TMPDIR) .PRECIOUS: $(MIRRORDIR)/chebi.owl mirror-chebi: | $(TMPDIR) if [ $(MIR) = true ] && [ $(IMP) = true ]; then $(ROBOT) convert -I https://raw.githubusercontent.com/obophenotype/chebi_obo_slim/main/chebi_slim.owl -o $@.tmp.owl && \ - $(ROBOT) remove -i $@.tmp.owl --base-iri $(URIBASE)/CHEBI --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\ + $(ROBOT) remove -i $@.tmp.owl --base-iri $(OBOBASE)/CHEBI --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\ mv $@.tmp.owl $(TMPDIR)/$@.owl; fi @@ -498,7 +502,7 @@ mirror-ncbitaxon: | $(TMPDIR) mirror-uberon: | $(TMPDIR) if [ $(MIR) = true ] && [ $(IMP) = true ]; then curl -L $(OBOBASE)/uberon.owl --create-dirs -o $(MIRRORDIR)/uberon.owl --retry 4 --max-time 200 &&\ $(ROBOT) convert -i $(MIRRORDIR)/uberon.owl -o $@.tmp.owl && \ - $(ROBOT) remove -i $@.tmp.owl --base-iri $(URIBASE)/UBERON --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\ + $(ROBOT) remove -i $@.tmp.owl --base-iri $(OBOBASE)/UBERON --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\ mv $@.tmp.owl $(TMPDIR)/$@.owl; fi @@ -523,7 +527,7 @@ mirror-nbo: | $(TMPDIR) .PRECIOUS: $(MIRRORDIR)/pr.owl mirror-pr: | $(TMPDIR) if [ $(MIR) = true ] && [ $(IMP) = true ]; then $(ROBOT) convert -I https://raw.githubusercontent.com/obophenotype/pro_obo_slim/master/pr_slim.owl -o $@.tmp.owl && \ - $(ROBOT) remove -i $@.tmp.owl --base-iri $(URIBASE)/PR --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\ + $(ROBOT) remove -i $@.tmp.owl --base-iri $(OBOBASE)/PR --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\ mv $@.tmp.owl $(TMPDIR)/$@.owl; fi @@ -533,7 +537,7 @@ mirror-pr: | $(TMPDIR) mirror-so: | $(TMPDIR) if [ $(MIR) = true ] && [ $(IMP) = true ]; then curl -L $(OBOBASE)/so.owl --create-dirs -o $(MIRRORDIR)/so.owl --retry 4 --max-time 200 &&\ $(ROBOT) convert -i $(MIRRORDIR)/so.owl -o $@.tmp.owl && \ - $(ROBOT) remove -i $@.tmp.owl --base-iri $(URIBASE)/SO --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\ + $(ROBOT) remove -i $@.tmp.owl --base-iri $(OBOBASE)/SO --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\ mv $@.tmp.owl $(TMPDIR)/$@.owl; fi @@ -543,7 +547,7 @@ mirror-so: | $(TMPDIR) mirror-po: | $(TMPDIR) if [ $(MIR) = true ] && [ $(IMP) = true ]; then curl -L $(OBOBASE)/po.owl --create-dirs -o $(MIRRORDIR)/po.owl --retry 4 --max-time 200 &&\ $(ROBOT) convert -i $(MIRRORDIR)/po.owl -o $@.tmp.owl && \ - $(ROBOT) remove -i $@.tmp.owl --base-iri $(URIBASE)/PO --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\ + $(ROBOT) remove -i $@.tmp.owl --base-iri $(OBOBASE)/PO --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\ mv $@.tmp.owl $(TMPDIR)/$@.owl; fi @@ -553,14 +557,14 @@ mirror-po: | $(TMPDIR) mirror-bfo: | $(TMPDIR) if [ $(MIR) = true ] && [ $(IMP) = true ]; then curl -L $(OBOBASE)/bfo.owl --create-dirs -o $(MIRRORDIR)/bfo.owl --retry 4 --max-time 200 &&\ $(ROBOT) convert -i $(MIRRORDIR)/bfo.owl -o $@.tmp.owl && \ - $(ROBOT) remove -i $@.tmp.owl --base-iri $(URIBASE)/BFO --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\ + $(ROBOT) remove -i $@.tmp.owl --base-iri $(OBOBASE)/BFO --axioms external --preserve-structure false --trim false -o $@.tmp.owl &&\ mv $@.tmp.owl $(TMPDIR)/$@.owl; fi ALL_MIRRORS = $(patsubst %, $(MIRRORDIR)/%.owl, $(IMPORTS)) MERGE_MIRRORS = true $(MIRRORDIR)/merged.owl: $(ALL_MIRRORS) - if [ $(IMP) = true ] && [ $(MERGE_MIRRORS) = true ]; then $(ROBOT) merge $(patsubst %, -i %, $^) -o $@; fi + if [ $(IMP) = true ] && [ $(MERGE_MIRRORS) = true ]; then $(ROBOT) merge $(patsubst %, -i %, $^) remove --axioms equivalent --preserve-structure false -o $@; fi .PRECIOUS: $(MIRRORDIR)/merged.owl @@ -722,9 +726,9 @@ $(ONT)-basic.json: $(ONT)-basic.owl $(ROBOT) annotate --input $< --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \ convert --check false -f json -o $@.tmp.json &&\ mv $@.tmp.json $@ -$(ONT)-baseplus.obo: $(ONT)-baseplus.owl +$(ONT)-baselite.obo: $(ONT)-baselite.owl $(ROBOT) convert --input $< --check false -f obo $(OBO_FORMAT_OPTIONS) -o $@.tmp.obo && grep -v ^owl-axioms $@.tmp.obo > $@ && rm $@.tmp.obo -$(ONT)-baseplus.json: $(ONT)-baseplus.owl +$(ONT)-baselite.json: $(ONT)-baselite.owl $(ROBOT) annotate --input $< --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \ convert --check false -f json -o $@.tmp.json &&\ mv $@.tmp.json $@ @@ -756,15 +760,8 @@ ROBOT_RELEASE_IMPORT_MODE=$(ROBOT) merge --input $< # ROBOT pipeline that removes imports, then merges components. This is for release artefacts that start from "base" ROBOT_RELEASE_IMPORT_MODE_BASE=$(ROBOT) remove --input $< --select imports --trim false merge $(patsubst %, -i %, $(OTHER_SRC)) -# base: All the axioms as they are editted by the editors, excluding reasoning +# base: A version of the ontology that does not include any externally imported axioms. $(ONT)-base.owl: $(EDIT_PREPROCESSED) $(OTHER_SRC) - $(ROBOT_RELEASE_IMPORT_MODE_BASE) \ - $(SHARED_ROBOT_COMMANDS) \ - annotate --link-annotation http://purl.org/dc/elements/1.1/type http://purl.obolibrary.org/obo/IAO_8000001 \ - --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \ - --output $@.tmp.owl && mv $@.tmp.owl $@ -# baseplus: A highly experimental variant of base, UNSTABLE. Only to be used experimentally (may disappear in future ODK releases). -$(ONT)-baseplus.owl: $(EDIT_PREPROCESSED) $(OTHER_SRC) $(IMPORT_FILES) $(ROBOT_RELEASE_IMPORT_MODE) \ reason --reasoner ELK --equivalent-classes-allowed asserted-only --exclude-tautologies structural \ relax \ @@ -774,12 +771,17 @@ $(ONT)-baseplus.owl: $(EDIT_PREPROCESSED) $(OTHER_SRC) $(IMPORT_FILES) annotate --link-annotation http://purl.org/dc/elements/1.1/type http://purl.obolibrary.org/obo/IAO_8000001 \ --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \ --output $@.tmp.owl && mv $@.tmp.owl $@ +# baselite: All the axioms as they are editted by the editors, excluding reasoning. This is currently the same as "base". Only to be used experimentally (may disappear in future ODK releases). +$(ONT)-baselite.owl: $(EDIT_PREPROCESSED) $(OTHER_SRC) + $(ROBOT_RELEASE_IMPORT_MODE_BASE) \ + $(SHARED_ROBOT_COMMANDS) annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \ + --output $@.tmp.owl && mv $@.tmp.owl $@ # Full: The full artefacts with imports merged, reasoned. $(ONT)-full.owl: $(EDIT_PREPROCESSED) $(OTHER_SRC) $(IMPORT_FILES) $(ROBOT_RELEASE_IMPORT_MODE) \ - reason --reasoner ELK --equivalent-classes-allowed asserted-only --exclude-tautologies structural \ - relax \ - reduce -r ELK \ + reason --reasoner ELK --equivalent-classes-allowed asserted-only --exclude-tautologies structural \ + relax \ + reduce -r ELK \ $(SHARED_ROBOT_COMMANDS) annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) --output $@.tmp.owl && mv $@.tmp.owl $@ # foo-basic: A version of -simple containing only relationships using relations on a configurable whitelist (default = BFO:0000050 (?)). @@ -881,6 +883,7 @@ Core commands: * prepare_release_fast: Run the entire release pipeline without refreshing imports, recreating components or recompiling patterns. * update_repo: Update the ODK repository setup using the config file oba-odk.yaml * test: Running all validation tests +* test_fast: Runs the test suite, but without updating imports or components * odkversion: Show the current version of the ODK Makefile and ROBOT. * clean: Delete all temporary files * help: Print ODK Usage information @@ -907,8 +910,8 @@ DOSDP templates Editor utilities: * validate_idranges: Make sure your ID ranges file is formatted correctly -* normalize_src: Load and safe your oba-edit file after you to make sure its serialised correctly -* normalize_obo_src: Load and safe your oba-edit.obo file after you to merge duplicate annotation assertions +* normalize_src: Load and save your oba-edit file after you to make sure its serialised correctly +* normalize_obo_src: Load and save your oba-edit.obo file after you to merge duplicate annotation assertions * explain_unsat: If you have unsatisfiable classes, this command will create a markdown file (tmp/explain_unsat.md) which will explain all your unsatisfiable classes * validate-all-tsv: Check all your tsv files for possible problems in syntax. Use ALL_TSV_FILES variable to list files * validate-tsv: Check a tsv file for syntactic problems with tsvalid. Use TSV variable to pass filepath, e.g. make TSV=../my.tsv validate-tsv. diff --git a/src/ontology/oba-odk.yaml b/src/ontology/oba-odk.yaml index 076cc7ea..51567f0b 100644 --- a/src/ontology/oba-odk.yaml +++ b/src/ontology/oba-odk.yaml @@ -17,7 +17,7 @@ release_artefacts: - base - full - basic - - baseplus + - baselite primary_release: full import_group: use_base_merging: TRUE diff --git a/src/ontology/run.sh b/src/ontology/run.sh index 2718ff67..9bcb17e2 100755 --- a/src/ontology/run.sh +++ b/src/ontology/run.sh @@ -40,6 +40,14 @@ ODK_TAG=${ODK_TAG:-latest} ODK_JAVA_OPTS=${ODK_JAVA_OPTS:--Xmx8G} ODK_DEBUG=${ODK_DEBUG:-no} +# Convert OWLAPI_* environment variables to the OWLAPI as Java options +# See http://owlcs.github.io/owlapi/apidocs_4/org/semanticweb/owlapi/model/parameters/ConfigurationOptions.html +# for a list of allowed options +OWLAPI_OPTIONS_NAMESPACE=org.semanticweb.owlapi.model.parameters.ConfigurationOptions +for owlapi_var in $(env | sed -n s/^OWLAPI_//p) ; do + ODK_JAVA_OPTS="$ODK_JAVA_OPTS -D$OWLAPI_OPTIONS_NAMESPACE.${owlapi_var%=*}=${owlapi_var#*=}" +done + TIMECMD= if [ x$ODK_DEBUG = xyes ]; then # If you wish to change the format string, take care of using