Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

converted IAO import to proper ODK import #254

Merged
merged 2 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/odk-workflows/RepositoryFileStructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ These are the current imports in APOLLO_SV
| Import | URL | Type |
| ------ | --- | ---- |
| ro | http://purl.obolibrary.org/obo/ro.owl | slme |
| pno | http://purl.obolibrary.org/obo/iao/pno/dev/pno.owl | mirror |
| geo | http://purl.obolibrary.org/obo/geo/dev/geo.owl | mirror |
| ido | http://purl.obolibrary.org/obo/ido.owl | slme |
| mf | http://purl.obolibrary.org/obo/mf.owl | slme |
| go | http://purl.obolibrary.org/obo/go.owl | slme |
| iao | http://purl.obolibrary.org/obo/iao.owl | mirror |

## Components
Components, in contrast to imports, are considered full members of the ontology. This means that any axiom in a component is also included in the ontology base - which means it is considered _native_ to the ontology. While this sounds complicated, consider this: conceptually, no component should be part of more than one ontology. If that seems to be the case, we are most likely talking about an import. Components are often not needed for ontologies, but there are some use cases:
Expand Down
31 changes: 16 additions & 15 deletions src/ontology/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# 3. [Update repo to latest ODK](update_repo)

# Fingerprint of the configuration file when this Makefile was last generated
CONFIG_HASH= c731446a515442f3b378e0f8803a2a533d775453ddcf1c23a26ddaed7564e0a1
CONFIG_HASH= 15f7592d9de34fe046ce12ec9f83ca39edbde7b087bef60e9c64a022551c8f57


# ----------------------------------------
Expand Down Expand Up @@ -165,7 +165,7 @@ all_main: $(MAIN_FILES)
# ----------------------------------------


IMPORTS = ro pno geo ido mf go
IMPORTS = ro geo ido mf go iao

IMPORT_ROOTS = $(patsubst %, $(IMPORTDIR)/%_import, $(IMPORTS))
IMPORT_OWL_FILES = $(foreach n,$(IMPORT_ROOTS), $(n).owl)
Expand Down Expand Up @@ -395,12 +395,6 @@ $(IMPORTDIR)/ro_import.owl: $(MIRRORDIR)/ro.owl $(IMPORTDIR)/ro_terms_combined.t
query --update ../sparql/inject-subset-declaration.ru --update ../sparql/inject-synonymtype-declaration.ru --update ../sparql/postprocess-module.ru \
$(ANNOTATE_CONVERT_FILE); fi

## Module for ontology: pno

$(IMPORTDIR)/pno_import.owl: $(MIRRORDIR)/pno.owl $(IMPORTDIR)/pno_terms_combined.txt
if [ $(IMP) = true ]; then $(ROBOT) merge -i $< query --update ../sparql/preprocess-module.ru --update ../sparql/inject-subset-declaration.ru --update ../sparql/inject-synonymtype-declaration.ru --update ../sparql/postprocess-module.ru \
$(ANNOTATE_CONVERT_FILE); fi

## Module for ontology: geo

$(IMPORTDIR)/geo_import.owl: $(MIRRORDIR)/geo.owl $(IMPORTDIR)/geo_terms_combined.txt
Expand Down Expand Up @@ -431,6 +425,12 @@ $(IMPORTDIR)/go_import.owl: $(MIRRORDIR)/go.owl $(IMPORTDIR)/go_terms_combined.t
query --update ../sparql/inject-subset-declaration.ru --update ../sparql/inject-synonymtype-declaration.ru --update ../sparql/postprocess-module.ru \
$(ANNOTATE_CONVERT_FILE); fi

## Module for ontology: iao

$(IMPORTDIR)/iao_import.owl: $(MIRRORDIR)/iao.owl $(IMPORTDIR)/iao_terms_combined.txt
if [ $(IMP) = true ]; then $(ROBOT) merge -i $< query --update ../sparql/preprocess-module.ru --update ../sparql/inject-subset-declaration.ru --update ../sparql/inject-synonymtype-declaration.ru --update ../sparql/postprocess-module.ru \
$(ANNOTATE_CONVERT_FILE); fi


.PHONY: refresh-imports
refresh-imports:
Expand Down Expand Up @@ -471,13 +471,6 @@ mirror-ro: | $(TMPDIR)
$(ROBOT) convert -i $(TMPDIR)/ro-download.owl -o $(TMPDIR)/[email protected]


## ONTOLOGY: pno
.PHONY: mirror-pno
.PRECIOUS: $(MIRRORDIR)/pno.owl
mirror-pno: | $(TMPDIR)
$(ROBOT) convert -I http://purl.obolibrary.org/obo/iao/pno/dev/pno.owl -o $(TMPDIR)/[email protected]


## ONTOLOGY: geo
.PHONY: mirror-geo
.PRECIOUS: $(MIRRORDIR)/geo.owl
Expand Down Expand Up @@ -509,6 +502,14 @@ mirror-go: | $(TMPDIR)
$(ROBOT) convert -i $(TMPDIR)/go-download.owl -o $(TMPDIR)/[email protected]


## ONTOLOGY: iao
.PHONY: mirror-iao
.PRECIOUS: $(MIRRORDIR)/iao.owl
mirror-iao: | $(TMPDIR)
curl -L $(OBOBASE)/iao.owl --create-dirs -o $(TMPDIR)/iao-download.owl --retry 4 --max-time 200 && \
$(ROBOT) convert -i $(TMPDIR)/iao-download.owl -o $(TMPDIR)/[email protected]


$(MIRRORDIR)/%.owl: mirror-% | $(MIRRORDIR)
if [ -f $(TMPDIR)/mirror-$*.owl ]; then if cmp -s $(TMPDIR)/mirror-$*.owl $@ ; then echo "Mirror identical, ignoring."; else echo "Mirrors different, updating." &&\
cp $(TMPDIR)/mirror-$*.owl $@; fi; fi
Expand Down
Loading
Loading