Skip to content

Commit ea00e08

Browse files
authored
Merge pull request #147 from casework/existence_intervals_shapes_review
Use CDO external-ontology shapes to check usage in instance data
2 parents 982166a + 8e82419 commit ea00e08

File tree

7 files changed

+96
-0
lines changed

7 files changed

+96
-0
lines changed

.gitmodules

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,15 @@
1414
path = dependencies/CASE-unstable-2.0.0
1515
url = https://github.com/casework/CASE-Archive.git
1616
branch = unstable-2.0.0
17+
[submodule "dependencies/CDO-Shapes-BFO"]
18+
path = dependencies/CDO-Shapes-BFO
19+
url = https://github.com/Cyber-Domain-Ontology/CDO-Shapes-BFO.git
20+
branch = main
21+
[submodule "dependencies/CDO-Shapes-Time"]
22+
path = dependencies/CDO-Shapes-Time
23+
url = https://github.com/Cyber-Domain-Ontology/CDO-Shapes-Time.git
24+
branch = main
25+
[submodule "dependencies/CDO-Shapes-gufo"]
26+
path = dependencies/CDO-Shapes-gufo
27+
url = https://github.com/Cyber-Domain-Ontology/CDO-Shapes-gufo.git
28+
branch = main

Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,21 @@ all: \
6161
$(MAKE) \
6262
--directory dependencies/CASE-unstable-2.0.0 \
6363
.git_submodule_init.done.log
64+
# CDO-Shapes-BFO
65+
test -r dependencies/CDO-Shapes-BFO/README.md \
66+
|| git submodule update --init dependencies/CDO-Shapes-BFO
67+
test -r dependencies/CDO-Shapes-BFO/README.md \
68+
|| (echo "ERROR:Makefile:CDO-Shapes-BFO submodule README.md file not found, even though CDO-Shapes-BFO submodule initialized." >&2 ; exit 2)
69+
# CDO-Shapes-Time
70+
test -r dependencies/CDO-Shapes-Time/README.md \
71+
|| git submodule update --init dependencies/CDO-Shapes-Time
72+
test -r dependencies/CDO-Shapes-Time/README.md \
73+
|| (echo "ERROR:Makefile:CDO-Shapes-Time submodule README.md file not found, even though CDO-Shapes-Time submodule initialized." >&2 ; exit 2)
74+
# CDO-Shapes-gufo
75+
test -r dependencies/CDO-Shapes-gufo/README.md \
76+
|| git submodule update --init dependencies/CDO-Shapes-gufo
77+
test -r dependencies/CDO-Shapes-gufo/README.md \
78+
|| (echo "ERROR:Makefile:CDO-Shapes-gufo submodule README.md file not found, even though CDO-Shapes-gufo submodule initialized." >&2 ; exit 2)
6479
# Retrieve rdf-toolkit.jar.
6580
$(MAKE) \
6681
--directory dependencies/CASE-develop \

dependencies/CDO-Shapes-BFO

Submodule CDO-Shapes-BFO added at b25016e

dependencies/CDO-Shapes-Time

Submodule CDO-Shapes-Time added at 6a5a0b6

dependencies/CDO-Shapes-gufo

Submodule CDO-Shapes-gufo added at 9a41df1
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/usr/bin/make -f
2+
3+
# Portions of this file contributed by NIST are governed by the
4+
# following statement:
5+
#
6+
# This software was developed at the National Institute of Standards
7+
# and Technology by employees of the Federal Government in the course
8+
# of their official duties. Pursuant to Title 17 Section 105 of the
9+
# United States Code, this software is not subject to copyright
10+
# protection within the United States. NIST assumes no responsibility
11+
# whatsoever for its use by other parties, and makes no guarantees,
12+
# expressed or implied, about its quality, reliability, or any other
13+
# characteristic.
14+
#
15+
# We would appreciate acknowledgement if the software is used.
16+
17+
SHELL := /bin/bash
18+
19+
top_srcdir := $(shell cd ../../.. ; pwd)
20+
21+
bfo_ttl := $(top_srcdir)/dependencies/CDO-Shapes-BFO/dependencies/BFO.ttl
22+
sh_bfo_ttl := $(top_srcdir)/dependencies/CDO-Shapes-BFO/shapes/sh-bfo.ttl
23+
24+
gufo_ttl := $(top_srcdir)/dependencies/CDO-Shapes-gufo/dependencies/gufo.ttl
25+
sh_gufo_ttl := $(top_srcdir)/dependencies/CDO-Shapes-gufo/shapes/sh-gufo.ttl
26+
27+
time_ttl := $(top_srcdir)/dependencies/CDO-Shapes-Time/dependencies/time.ttl
28+
sh_time_ttl := $(top_srcdir)/dependencies/CDO-Shapes-Time/shapes/sh-time.ttl
29+
30+
all:
31+
32+
.cdo-shapes.done.log: \
33+
$(bfo_ttl) \
34+
$(gufo_ttl) \
35+
$(sh_bfo_ttl) \
36+
$(sh_gufo_ttl) \
37+
$(sh_time_ttl) \
38+
$(time_ttl) \
39+
$(top_srcdir)/.venv.done.log \
40+
existence_intervals.json
41+
source $(top_srcdir)/venv/bin/activate \
42+
&& case_validate \
43+
--ontology-graph $(bfo_ttl) \
44+
--ontology-graph $(gufo_ttl) \
45+
--ontology-graph $(sh_bfo_ttl) \
46+
--ontology-graph $(sh_gufo_ttl) \
47+
--ontology-graph $(sh_time_ttl) \
48+
--ontology-graph $(time_ttl) \
49+
existence_intervals.json
50+
touch $@
51+
52+
check: \
53+
.cdo-shapes.done.log
54+
55+
clean:

examples/illustrations/src/illustration-nosrc.mk

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ all: \
8585
test ! -r figures/Makefile \
8686
|| $(MAKE) \
8787
--directory figures
88+
test ! -r postvisit.mk \
89+
|| $(MAKE) \
90+
--file postvisit.mk
8891

8992
.PHONY: \
9093
check-pytest
@@ -335,6 +338,10 @@ check: \
335338
$(example_name)_validation-develop-2.0.0.ttl \
336339
$(example_name)_validation-unstable.ttl \
337340
$(example_name)_validation-unstable-2.0.0.ttl
341+
test ! -r postvisit.mk \
342+
|| $(MAKE) \
343+
--file postvisit.mk \
344+
check
338345

339346
# Run pytest tests only if any are written.
340347
# (Pytest exits in an error state if called with no tests found.)
@@ -348,6 +355,10 @@ check-pytest: \
348355
)
349356

350357
clean:
358+
@test ! -r postvisit.mk \
359+
|| $(MAKE) \
360+
--file postvisit.mk \
361+
clean
351362
@rm -f \
352363
.drafting.ttl.*.log \
353364
figures/*.dot \

0 commit comments

Comments
 (0)