Skip to content

Commit 11b57db

Browse files
committed
Add kb compilation
This patch adds a compilation of all kb graphs as a non-persisted artifact. The benefit of this graph is, so far, finding duplicated-node errors. This patch ports the workflow update from CASE-Examples PR 132. This patch is part of realizing CASE-Examples-QC PR 54. No effects were observed on Make-managed files. References: * ajnelson-nist/CASE-Examples-QC#54 * casework/CASE-Examples#132 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
1 parent 6f1a425 commit 11b57db

File tree

3 files changed

+74
-0
lines changed

3 files changed

+74
-0
lines changed

examples/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
*.diff
2+
all-drafting.ttl
23
generated-*
34
query-*.html
45
query-*.md
6+
kb.ttl

examples/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ all-%: \
3030

3131
check: \
3232
$(check_targets)
33+
$(MAKE) \
34+
--file postvisit.mk \
35+
check
3336

3437
check-%: \
3538
%/Makefile
@@ -39,6 +42,9 @@ check-%: \
3942

4043
clean: \
4144
$(clean_targets)
45+
@$(MAKE) \
46+
--file postvisit.mk \
47+
clean
4248

4349
clean-%: \
4450
%/Makefile

examples/postvisit.mk

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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+
RDF_TOOLKIT_JAR := $(top_srcdir)/dependencies/CASE-develop/dependencies/UCO/lib/rdf-toolkit.jar
22+
23+
# Set up descending into each directory that has a Makefile.
24+
illustration_dirs := $(shell ls */Makefile | xargs dirname)
25+
26+
all_drafting_ttl := $(wildcard */drafting.ttl)
27+
28+
all_jsonld := $(foreach illustration_dir,$(illustration_dirs),$(illustration_dir)/$(illustration_dir).json)
29+
30+
all: \
31+
kb.ttl
32+
33+
all-drafting.ttl: \
34+
$(all_drafting_ttl)
35+
source $(top_srcdir)/venv/bin/activate \
36+
&& rdfpipe \
37+
--output-format turtle \
38+
$^ \
39+
> _$@
40+
mv _$@ $@
41+
42+
check: \
43+
kb.ttl
44+
45+
clean:
46+
@rm -f \
47+
_all-drafting.ttl \
48+
_kb.ttl \
49+
all-drafting.ttl \
50+
kb.ttl
51+
52+
kb.ttl: \
53+
$(all_jsonld) \
54+
all-drafting.ttl
55+
source $(top_srcdir)/venv/bin/activate \
56+
&& rdfpipe \
57+
--output-format turtle \
58+
$(all_jsonld) \
59+
> _$@
60+
source $(top_srcdir)/venv/bin/activate \
61+
&& case_validate \
62+
--allow-infos \
63+
--metashacl \
64+
--ontology-graph all-drafting.ttl \
65+
_$@
66+
mv _$@ $@

0 commit comments

Comments
 (0)