Skip to content

Commit

Permalink
ODK 1.4 migration
Browse files Browse the repository at this point in the history
  • Loading branch information
matentzn committed Feb 19, 2023
1 parent be85492 commit 4ec7348
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 13 deletions.
38 changes: 27 additions & 11 deletions src/ontology/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ----------------------------------------
# Makefile for oba
# Generated using ontology-development-kit
# ODK Version: v1.4-dev
# ODK Version: v1.4
# ----------------------------------------
# IMPORTANT: DO NOT EDIT THIS FILE. To override default make goals, use oba.Makefile instead

Expand Down Expand Up @@ -44,20 +44,20 @@ 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-dev
ODK_VERSION_MAKEFILE = v1.4

TODAY ?= $(shell date +%Y-%m-%d)
OBODATE ?= $(shell date +'%d:%m:%Y %H:%M')
VERSION= $(TODAY)
ANNOTATE_ONTOLOGY_VERSION = annotate -V $(ONTBASE)/releases/$(VERSION)/$@ --annotation owl:versionInfo $(VERSION)
ANNOTATE_CONVERT_FILE = annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) convert -f ofn --output $@.tmp.owl && mv $@.tmp.owl $@
ANNOTATE_CONVERT_FILE = annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) convert -f ofn --output $@.tmp.owl && mv $@.tmp.owl $@
OTHER_SRC = $(PATTERNDIR)/definitions.owl $(COMPONENTSDIR)/obsoletes.owl $(COMPONENTSDIR)/synonyms.owl
ONTOLOGYTERMS = $(TMPDIR)/ontologyterms.txt
EDIT_PREPROCESSED = $(TMPDIR)/$(ONT)-preprocess.owl
EDIT_PREPROCESSED = $(TMPDIR)/$(ONT)-preprocess.owl
PATTERNDIR= ../patterns
PATTERN_TESTER= dosdp validate -i
DOSDPT= dosdp-tools
PATTERN_RELEASE_FILES= $(PATTERNDIR)/definitions.owl $(PATTERNDIR)/pattern.owl
PATTERN_TESTER= dosdp validate -i
DOSDPT= dosdp-tools
PATTERN_RELEASE_FILES= $(PATTERNDIR)/definitions.owl $(PATTERNDIR)/pattern.owl


FORMATS = $(sort owl obo json owl)
Expand Down Expand Up @@ -137,6 +137,19 @@ SUBSET_FILES = $(foreach n,$(SUBSET_ROOTS), $(foreach f,$(FORMATS_INCL_TSV), $(n
.PHONY: all_subsets
all_subsets: $(SUBSET_FILES)

# ----------------------------------------
# Mapping assets
# ----------------------------------------


MAPPINGS =

MAPPING_FILES = $(patsubst %, $(MAPPINGDIR)/%.sssom.tsv, $(MAPPINGS))

.PHONY: all_mappings
all_mappings: $(MAPPING_FILES)


# ----------------------------------------
# QC Reports & Utilities
# ----------------------------------------
Expand Down Expand Up @@ -173,9 +186,10 @@ validate_profile_%: $(REPORTDIR)/validate_profile_owl2dl_%.txt

SPARQL_VALIDATION_QUERIES = $(foreach V,$(SPARQL_VALIDATION_CHECKS),$(SPARQLDIR)/$(V)-violation.sparql)

sparql_test: $(EDIT_PREPROCESSED) catalog-v001.xml | $(REPORTDIR)
sparql_test: $(EDIT_PREPROCESSED) catalog-v001.xml | $(REPORTDIR)
ifneq ($(SPARQL_VALIDATION_QUERIES),)
$(ROBOT) verify --catalog catalog-v001.xml -i $< --queries $(SPARQL_VALIDATION_QUERIES) -O $(REPORTDIR)

$(ROBOT) verify --catalog catalog-v001.xml -i $(EDIT_PREPROCESSED) --queries $(SPARQL_VALIDATION_QUERIES) -O $(REPORTDIR)
endif

# ----------------------------------------
Expand All @@ -197,7 +211,8 @@ ASSETS = \
$(MAIN_FILES) \
$(PATTERN_RELEASE_FILES) \
$(REPORT_FILES) \
$(SUBSET_FILES)
$(SUBSET_FILES) \
$(MAPPING_FILES)

RELEASE_ASSETS = \
$(MAIN_FILES) \
Expand Down Expand Up @@ -723,7 +738,7 @@ $(ONT).owl: $(ONT)-full.owl

$(ONT).obo: $(ONT).owl
$(ROBOT) convert --input $< --check false -f obo $(OBO_FORMAT_OPTIONS) -o $@.tmp.obo && grep -v ^owl-axioms $@.tmp.obo > $@ && rm $@.tmp.obo
$(ONT).json: $(ONT)-full.owl
$(ONT).json: $(ONT).owl
$(ROBOT) annotate --input $< --ontology-iri $(URIBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \
convert --check false -f json -o $@.tmp.json &&\
mv $@.tmp.json $@
Expand Down Expand Up @@ -905,6 +920,7 @@ Additional build commands (advanced users)
* custom_reports: Generate all custom sparql reports you have configured in your oba-odk.yaml file.
* all_assets: Build all assets
* show_assets: Print a list of all assets that would be build by the release pipeline
* all_mappings: Update all SSSOM mapping sets

Additional QC commands (advanced users)
* robot_reports: Run all configured ROBOT reports
Expand Down
3 changes: 2 additions & 1 deletion src/ontology/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,14 @@ fi
if [ -n "$USE_SINGULARITY" ]; then

singularity exec --cleanenv $ODK_SINGULARITY_OPTIONS \
--env "ROBOT_JAVA_ARGS=$ODK_JAVA_OPTS,JAVA_OPTS=$ODK_JAVA_OPTS" \
--bind $VOLUME_BIND \
-W $WORK_DIR \
docker://obolibrary/$ODK_IMAGE:$ODK_TAG $TIMECMD "$@"
else
BIND_OPTIONS="-v $(echo $VOLUME_BIND | sed 's/,/ -v /')"
docker run $ODK_DOCKER_OPTIONS $BIND_OPTIONS -w $WORK_DIR \
\
-e ROBOT_JAVA_ARGS="$ODK_JAVA_OPTS" -e JAVA_OPTS="$ODK_JAVA_OPTS" \
--rm -ti obolibrary/$ODK_IMAGE:$ODK_TAG $TIMECMD "$@"
fi

Expand Down
1 change: 0 additions & 1 deletion src/ontology/run.sh.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
ODK_TAG=dev
ODK_DEBUG=yes
ODK_IMAGE=odkfull
ODK_JAVA_OPTS=-Xmx18G

0 comments on commit 4ec7348

Please sign in to comment.