Skip to content

Commit

Permalink
Import prov-constraints review from case-prov testing
Browse files Browse the repository at this point in the history
This is part of retiring CASE-Examples review from the `case-prov`
repository.

A follow-on patch will regenerate Make-managed files.

References:
* casework/CASE-Implementation-PROV-O#89

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
  • Loading branch information
ajnelson-nist committed Sep 19, 2023
1 parent 6b7b7ac commit 0663847
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@
path = dependencies/casework.github.io
url = https://github.com/casework/casework.github.io.git
branch = master
[submodule "dependencies/prov-check"]
path = dependencies/prov-check
url = https://github.com/ajnelson-nist/prov-check.git
branch = adjust_reporting
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ all: \
|| (git submodule init dependencies/casework.github.io && git submodule update dependencies/casework.github.io)
@test -r dependencies/casework.github.io/README.md \
|| (echo "ERROR:Makefile:casework.github.io submodule README.md file not found, even though casework.gitub.io submodule initialized." >&2 ; exit 2)
# prov-check
test -r dependencies/prov-check/README.md \
|| (git submodule update --init dependencies/prov-check)
@test -r dependencies/prov-check/README.md \
|| (echo "ERROR:Makefile:prov-check submodule README.md file not found, even though prov-check submodule initialized." >&2 ; exit 2)
touch $@

.venv.done.log: \
Expand Down
1 change: 1 addition & 0 deletions dependencies/prov-check
Submodule prov-check added at c4126b
1 change: 1 addition & 0 deletions tests/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.check_README.md
kb-entailment.ttl
kb-prov-time.ttl
ontologies.txt
ontology_relationship_literals.tsv
ontology_vocabulary.txt
33 changes: 31 additions & 2 deletions tests/postvisit.mk
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ used_concepts_dependencies := $(foreach exdir,$(exdirs),$(exdir)
used_kindOfRelationships_dependencies := $(foreach exdir,$(exdirs),$(exdir)/used_kindOfRelationships.tsv)

all: \
kb.ttl \
prov-constraints.log \
undefined_concepts.txt \
undefined_kindOfRelationships.tsv \
used_concepts.txt \
used_kindOfRelationships.tsv

check: \
kb.ttl \
prov-constraints.log \
undefined_concepts.txt \
undefined_kindOfRelationships.tsv \
used_concepts.txt \
Expand All @@ -61,6 +61,24 @@ clean:
used_concepts.txt \
used_kindOfRelationships.tsv

kb-prov-time.ttl: \
kb.ttl
rm -f __$@ _$@
export CASE_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
&& source $(top_srcdir)/venv/bin/activate \
&& case_prov_rdf \
--use-deterministic-uuids \
__$@ \
$<
java -jar $(rdf_toolkit_jar) \
--inline-blank-nodes \
--source __$@ \
--source-format turtle \
--target _$@ \
--target-format turtle
rm __$@
mv _$@ $@

kb.ttl: \
$(top_srcdir)/dependencies/CASE-Corpora/catalog/kb-all.ttl \
$(top_srcdir)/dependencies/imports-transitive.ttl \
Expand Down Expand Up @@ -94,6 +112,17 @@ kb.ttl: \
rm __$@
mv _$@ $@

prov-constraints.log: \
$(top_srcdir)/dependencies/prov-check/provcheck/provconstraints.py \
kb-prov-time.ttl
source $(top_srcdir)/venv/bin/activate \
&& python3 $(top_srcdir)/dependencies/prov-check/provcheck/provconstraints.py \
--debug \
kb-prov-time.ttl \
> _$@ \
2>&1
mv _$@ $@

undefined_concepts.txt: \
$(undefined_concepts_dependencies)
cat $^ \
Expand Down

0 comments on commit 0663847

Please sign in to comment.