@@ -10,16 +10,11 @@ SHELL := bash
10
10
.SUFFIXES :
11
11
.SECONDARY :
12
12
13
- COB_TO_EXTERNAL = $(COMPONENTSDIR ) /cob-to-external.owl
14
- COB_ANNOTATIONS = $(COMPONENTSDIR ) /cob-annotations.owl
15
- COB_EXAMPLES = $(COMPONENTSDIR ) /cob-examples.owl
16
-
17
13
.PHONY : prepare_release
18
- prepare_release : $(ASSETS ) $(PATTERN_RELEASE_FILES ) cob.tsv
19
- rsync -R $(RELEASE_ASSETS ) cob.tsv $(RELEASEDIR ) && \
20
- rm -f $(CLEANFILES) &&\
21
- rm -f cob.tsv &&\
22
- echo "Release files are now in $(RELEASEDIR) - now you should commit, push and make a release on your git hosting site such as GitHub or GitLab"
14
+ prepare_release : $(ASSETS ) $(PATTERN_RELEASE_FILES )
15
+ rsync -R $(RELEASE_ASSETS ) $(RELEASEDIR ) && \
16
+ rm -f $(CLEANFILES ) && \
17
+ echo " Release files are now in $( RELEASEDIR) - now you should commit, push and make a release on your git hosting site such as GitHub or GitLab"
23
18
24
19
.PHONY : prepare_cob_products
25
20
prepare_cob_products : test
@@ -36,88 +31,44 @@ products/:
36
31
$(TMPDIR ) /robot.jar : | $(TMPDIR )
37
32
if [ $( ROBOT_DOWNLOAD) = true ]; then curl -L -o $@ https://build.obolibrary.io/job/ontodev/job/robot/job/master/lastSuccessfulBuild/artifact/bin/robot.jar; fi
38
33
34
+
39
35
# #######################################
40
- # -- MAIN RELEASE PRODUCTS --
36
+ # -- TEMPLATES --
41
37
# #######################################
42
38
43
- # build main release product
44
- REWIRE_PRECEDENCE = PR CHEBI
45
- cob.ttl : components/cob-to-external.tsv cob-native.owl
46
- sssom rewire -I xml -m $< $(patsubst % ,--precedence % ,$(REWIRE_PRECEDENCE ) ) cob-native.owl -o $@
39
+ $(TMPDIR ) /cob-% .tsv : $(SCRIPTSDIR ) /split-cob-edit.py cob-edit.tsv
40
+ $^ $(TMPDIR )
47
41
48
- cob.owl : cob.ttl
49
- robot merge --include-annotations true -i $< -i ontology-metadata.owl \
50
- annotate --ontology-iri $(URIBASE ) /$@ $(ANNOTATE_ONTOLOGY_VERSION ) \
51
- --output $@ .tmp.owl && mv $@ .tmp.owl $@
52
- .PRECIOUS : cob.owl
53
42
54
- cob-native.owl : $(SRC )
55
- $(ROBOT ) remove --input $< --select imports --trim false \
56
- reason -r HERMIT \
57
- annotate --ontology-iri $(ONTBASE ) /$@ $(ANNOTATE_ONTOLOGY_VERSION ) \
58
- --output $@ .tmp.owl && mv $@ .tmp.owl $@
43
+ # #######################################
44
+ # -- MAIN RELEASE PRODUCTS --
45
+ # #######################################
59
46
60
- # base file is main cob plus linking axioms
61
- # cob-base.owl: cob.owl $(COB_TO_EXTERNAL)
62
- # $(ROBOT) merge $(patsubst %, -i %, $^) -o $@
47
+ $(ONT ) -edit.owl : $(TMPDIR ) /cob-root.tsv
48
+ $(ROBOT ) template --template $< \
49
+ reason -r HERMIT \
50
+ annotate --ontology-iri $(ONTBASE ) /$@ $(ANNOTATE_ONTOLOGY_VERSION ) \
51
+ --output $@ .tmp.owl && mv $@ .tmp.owl $@
63
52
64
- $(ONT ) -base.owl : $(EDIT_PREPROCESSED ) $(OTHER_SRC )
65
- $(ROBOT_RELEASE_IMPORT_MODE_BASE ) \
66
- $(SHARED_ROBOT_COMMANDS ) \
53
+ # COB "Full"
54
+ $(ONT ) .owl : $(TMPDIR ) /cob-full.tsv
55
+ $(ROBOT ) template --template $< \
56
+ reason -r HERMIT \
57
+ annotate --ontology-iri $(ONTBASE ) /$@ $(ANNOTATE_ONTOLOGY_VERSION ) \
58
+ --output $@ .tmp.owl && mv $@ .tmp.owl $@
59
+
60
+ $(ONT ) -base.owl : $(ONT ) .owl $(TMPDIR ) /cob-base.tsv
61
+ $(ROBOT ) template --input $< --template $(word 2,$^ ) \
67
62
annotate --link-annotation http://purl.org/dc/elements/1.1/type http://purl.obolibrary.org/obo/IAO_8000001 \
68
63
--ontology-iri $(ONTBASE ) /$@ $(ANNOTATE_ONTOLOGY_VERSION ) \
69
64
--output $@ .tmp.owl && mv $@ .tmp.owl $@
70
65
71
- cob-base-reasoned.owl : cob-base.owl
72
- $(ROBOT ) remove --input $< --select imports --trim false \
73
- reason -r HERMIT \
74
- annotate --ontology-iri $(ONTBASE ) /$@ $(ANNOTATE_ONTOLOGY_VERSION ) \
75
- --output $@ .tmp.owl && mv $@ .tmp.owl $@
76
-
77
- cob-examples-reasoned.owl : cob-base.owl $(COB_EXAMPLES )
78
- $(ROBOT ) remove --input $< --select imports --trim false \
79
- merge $(patsubst % , -i % , $^ ) \
80
- reason -r HERMIT \
81
- annotate --ontology-iri $(ONTBASE ) /$@ $(ANNOTATE_ONTOLOGY_VERSION ) \
82
- --output $@ .tmp.owl && mv $@ .tmp.owl $@
83
-
84
- # TSV export (may depend on dev version of robot export)
85
- cob.tsv : cob.owl
86
- $(ROBOT ) export -i $< -c " ID|ID [LABEL]|definition|subClassOf [ID NAMED]|subClassOf [LABEL NAMED]|subClassOf [ID ANON]|subClassOf [LABEL ANON]" -e $@
87
- # $(ROBOT) export -i $< --entity-select NAMED -c "ID|ID [LABEL]|definition|subClassOf [ID]|subClassOf [LABEL]|subClassOf [ID ANON]|subClassOf [LABEL ANON]" -e $@
88
-
89
- # -- BRIDGING AXIOMS TO OBO ROOTS --
90
- #
91
- # the source file is cob-to-external.tsv
92
- #
93
- # OWL is generated from this
94
- #
95
-
96
- $(TMPDIR ) /cob-to-external.sssom.owl : $(COMPONENTSDIR ) /cob-to-external.tsv | $(TMPDIR )
97
- sssom convert $< --output-format owl -o $@
98
-
99
- $(COB_TO_EXTERNAL ) : $(TMPDIR ) /cob-to-external.sssom.owl
100
- $(ROBOT ) merge -i $< \
66
+ $(ONT ) -root.owl : $(TMPDIR ) /cob-root.tsv
67
+ $(ROBOT ) template --template $< \
68
+ reason -r HERMIT \
101
69
annotate --ontology-iri $(ONTBASE ) /$@ $(ANNOTATE_ONTOLOGY_VERSION ) \
102
- convert -f owl -o $@
103
-
104
- $(TMPDIR ) /cob-annotations.ttl : $(COB_TO_EXTERNAL ) $(SPARQLDIR ) /external-links.rq | $(TMPDIR )
105
- $(ROBOT ) query --input $< --query $(word 2,$^ ) $@
106
-
107
- $(COB_ANNOTATIONS ) : $(TMPDIR ) /cob-annotations.ttl
108
- $(ROBOT ) annotate --input $< \
109
- --ontology-iri " http://purl.obolibrary.org/obo/cob/$@ " \
110
- --annotation owl:versionInfo $(TODAY ) \
111
- --output $@
112
-
113
- # This is the custom import: removing all COB related axioms from RO, but otherwise pulling in logical dependencies.
70
+ --output $@ .tmp.owl && mv $@ .tmp.owl $@
114
71
115
- $(IMPORTDIR ) /ro_import.owl : $(MIRRORDIR ) /ro.owl $(IMPORTDIR ) /ro_terms_combined.txt
116
- if [ $( IMP) = true ]; then $( ROBOT) query -i $< --update ../sparql/preprocess-module.ru \
117
- extract -T $(IMPORTDIR ) /ro_terms_combined.txt --copy-ontology-annotations true --force true --individuals exclude --method BOT \
118
- remove --base-iri http://purl.obolibrary.org/obo/COB_ --axioms internal --preserve-structure false --trim false \
119
- query --update ../sparql/inject-subset-declaration.ru --update ../sparql/inject-synonymtype-declaration.ru --update ../sparql/postprocess-module.ru \
120
- $(ANNOTATE_CONVERT_FILE ) ; fi
121
72
122
73
# #######################################
123
74
# -- TESTING --
@@ -151,7 +102,7 @@ cob_test: main_test itest
151
102
# main test: should be run via CI on every PR
152
103
# this tests COB's internal consistency
153
104
.PHONY : main_test
154
- main_test : $(REPORTDIR ) /$(SRC ) -obo-report.tsv cob.owl cob-base-reasoned.owl cob-examples-reasoned .owl
105
+ main_test : $(REPORTDIR ) /$(SRC ) -obo-report.tsv $( RELEASEDIR ) / cob-root .owl
155
106
test : main_test
156
107
157
108
# integration tests: for now, run these on commmand line
0 commit comments