From 6b47792ce23887f0767d5c0c4642f9dd050fe22d Mon Sep 17 00:00:00 2001 From: Nico Matentzoglu Date: Thu, 22 Aug 2024 00:59:03 +0300 Subject: [PATCH 1/2] Hot fix - reinstate the old cob-base This was requested by @jamesaoverton in #259 and not implemented --- products/.gitkeep | 0 src/ontology/cob.Makefile | 7 +++++++ 2 files changed, 7 insertions(+) create mode 100644 products/.gitkeep diff --git a/products/.gitkeep b/products/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/ontology/cob.Makefile b/src/ontology/cob.Makefile index bed35d7..2e77f28 100644 --- a/src/ontology/cob.Makefile +++ b/src/ontology/cob.Makefile @@ -61,6 +61,13 @@ cob-native.owl: $(SRC) #cob-base.owl: cob.owl $(COB_TO_EXTERNAL) # $(ROBOT) merge $(patsubst %, -i %, $^) -o $@ +$(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 $@ + cob-base-reasoned.owl: cob-base.owl $(ROBOT) remove --input $< --select imports --trim false \ reason -r HERMIT \ From 9963fad370ad0ff5317d5e81a6e2ee176011cdc3 Mon Sep 17 00:00:00 2001 From: Nico Matentzoglu Date: Thu, 22 Aug 2024 01:01:54 +0300 Subject: [PATCH 2/2] Make RO module custom --- docs/odk-workflows/RepositoryFileStructure.md | 2 +- src/ontology/Makefile | 10 +++------- src/ontology/cob-odk.yaml | 2 +- src/ontology/cob.Makefile | 8 ++++++++ 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/docs/odk-workflows/RepositoryFileStructure.md b/docs/odk-workflows/RepositoryFileStructure.md index 180907c..b570bb9 100644 --- a/docs/odk-workflows/RepositoryFileStructure.md +++ b/docs/odk-workflows/RepositoryFileStructure.md @@ -16,7 +16,7 @@ These are the current imports in COB | Import | URL | Type | | ------ | --- | ---- | -| ro | http://purl.obolibrary.org/obo/ro.owl | slme | +| ro | http://purl.obolibrary.org/obo/ro.owl | custom | | omo | http://purl.obolibrary.org/obo/omo.owl | mirror | ## Components diff --git a/src/ontology/Makefile b/src/ontology/Makefile index 0a2126d..0c14749 100644 --- a/src/ontology/Makefile +++ b/src/ontology/Makefile @@ -19,7 +19,7 @@ # 6. [Run everything (COB products and release pipeline)](all) # Fingerprint of the configuration file when this Makefile was last generated -CONFIG_HASH= ee0faa650404ebb7b2d591feab04561dbd60f347a990a5e1c925bb6cb0ef0904 +CONFIG_HASH= 5daef41d99e802417bd9ad0f378f72168e2d30f0488f5b2423330cbc561ec834 # ---------------------------------------- @@ -377,12 +377,8 @@ $(IMPORTDIR)/%_import.owl: $(MIRRORDIR)/%.owl $(IMPORTDIR)/%_terms_combined.txt ## Module for ontology: ro -$(IMPORTDIR)/ro_import.owl: $(MIRRORDIR)/ro.owl $(IMPORTDIR)/ro_terms_combined.txt - if [ $(IMP) = true ]; then $(ROBOT) query -i $< --update ../sparql/preprocess-module.ru \ - extract -T $(IMPORTDIR)/ro_terms_combined.txt --copy-ontology-annotations true --force true --individuals exclude --method BOT \ - query --update ../sparql/inject-subset-declaration.ru --update ../sparql/inject-synonymtype-declaration.ru --update ../sparql/postprocess-module.ru \ - $(ANNOTATE_CONVERT_FILE); fi - +$(IMPORTDIR)/ro_import.owl: $(MIRRORDIR)/ro.owl + echo "ERROR: You have configured your default module type to be custom; this behavior needs to be overwritten in cob.Makefile!" && false ## Module for ontology: omo $(IMPORTDIR)/omo_import.owl: $(MIRRORDIR)/omo.owl $(IMPORTDIR)/omo_terms_combined.txt diff --git a/src/ontology/cob-odk.yaml b/src/ontology/cob-odk.yaml index e17effd..a92b2c7 100644 --- a/src/ontology/cob-odk.yaml +++ b/src/ontology/cob-odk.yaml @@ -23,7 +23,7 @@ import_group: - IAO:0000111 products: - id: ro - module_type: slme + module_type: custom slme_individuals: exclude - id: omo module_type: mirror diff --git a/src/ontology/cob.Makefile b/src/ontology/cob.Makefile index 2e77f28..67e5776 100644 --- a/src/ontology/cob.Makefile +++ b/src/ontology/cob.Makefile @@ -110,6 +110,14 @@ $(COB_ANNOTATIONS): $(TMPDIR)/cob-annotations.ttl --annotation owl:versionInfo $(TODAY) \ --output $@ +# This is the custom import: removing all COB related axioms from RO, but otherwise pulling in logical dependencies. + +$(IMPORTDIR)/ro_import.owl: $(MIRRORDIR)/ro.owl $(IMPORTDIR)/ro_terms_combined.txt + if [ $(IMP) = true ]; then $(ROBOT) query -i $< --update ../sparql/preprocess-module.ru \ + extract -T $(IMPORTDIR)/ro_terms_combined.txt --copy-ontology-annotations true --force true --individuals exclude --method BOT \ + remove --base-iri http://purl.obolibrary.org/obo/COB_ --axioms internal --preserve-structure false --trim false \ + query --update ../sparql/inject-subset-declaration.ru --update ../sparql/inject-synonymtype-declaration.ru --update ../sparql/postprocess-module.ru \ + $(ANNOTATE_CONVERT_FILE); fi ######################################## # -- TESTING --