Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test catalog against CASE 2.0.0 branches #61

Merged
merged 2 commits into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,18 @@
path = dependencies/CASE-develop
url = https://github.com/casework/CASE.git
branch = develop
[submodule "dependencies/CASE-develop-2.0.0"]
path = dependencies/CASE-develop-2.0.0
url = https://github.com/casework/CASE.git
branch = develop-2.0.0
[submodule "dependencies/CASE-unstable"]
path = dependencies/CASE-unstable
url = https://github.com/casework/CASE-Archive.git
branch = unstable
[submodule "dependencies/CASE-unstable-2.0.0"]
path = dependencies/CASE-unstable-2.0.0
url = https://github.com/casework/CASE-Archive.git
branch = unstable-2.0.0
[submodule "dependencies/cito"]
path = dependencies/cito
url = https://github.com/SPAROntologies/cito.git
Expand Down
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ all: \
$(MAKE) \
--directory dependencies/CASE-develop \
.git_submodule_init.done.log
# CASE-develop-2.0.0
test -r dependencies/CASE-develop-2.0.0/README.md \
|| git submodule update \
--init \
dependencies/CASE-develop-2.0.0
$(MAKE) \
--directory dependencies/CASE-develop-2.0.0 \
.git_submodule_init.done.log
# CASE-unstable
test -r dependencies/CASE-unstable/README.md \
|| git submodule update \
Expand All @@ -64,6 +72,14 @@ all: \
$(MAKE) \
--directory dependencies/CASE-unstable \
.git_submodule_init.done.log
# CASE-unstable-2.0.0
test -r dependencies/CASE-unstable-2.0.0/README.md \
|| git submodule update \
--init \
dependencies/CASE-unstable-2.0.0
$(MAKE) \
--directory dependencies/CASE-unstable-2.0.0 \
.git_submodule_init.done.log
# cito
test -r dependencies/cito/README.md \
|| git submodule update \
Expand Down
11 changes: 11 additions & 0 deletions catalog/kb-all_validation-develop-2.0.0.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

[]
a sh:ValidationReport ;
sh:conforms "true"^^xsd:boolean ;
.

11 changes: 11 additions & 0 deletions catalog/kb-all_validation-unstable-2.0.0.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

[]
a sh:ValidationReport ;
sh:conforms "true"^^xsd:boolean ;
.

56 changes: 55 additions & 1 deletion catalog/postvisit.mk
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ kb_all_dependencies := \
all: \
README.md \
kb-all_validation-develop.ttl \
kb-all_validation-unstable.ttl
kb-all_validation-develop-2.0.0.ttl \
kb-all_validation-unstable.ttl \
kb-all_validation-unstable-2.0.0.ttl

README.md: \
README.md.in \
Expand Down Expand Up @@ -135,6 +137,32 @@ kb-all_validation-develop.ttl: \
rm __$@
mv _$@ $@

kb-all_validation-develop-2.0.0.ttl: \
$(top_srcdir)/dependencies/CASE-develop-2.0.0.ttl \
kb-all.ttl
rm -f __$@ _$@
source $(top_srcdir)/venv/bin/activate \
&& case_validate \
--allow-infos \
--built-version none \
--format turtle \
--inference rdfs \
--ontology-graph $(top_srcdir)/dependencies/CASE-develop-2.0.0.ttl \
--ontology-graph $(top_srcdir)/dependencies/dependencies.ttl \
--ontology-graph $(top_srcdir)/ontology/case-corpora.ttl \
--ontology-graph $(top_srcdir)/shapes/local.ttl \
--ontology-graph $(top_srcdir)/shapes/shapes.ttl \
--output __$@ \
kb-all.ttl
java -jar $(rdf_toolkit_jar) \
--inline-blank-nodes \
--source-format turtle \
--source __$@ \
--target-format turtle \
--target _$@
rm __$@
mv _$@ $@

kb-all_validation-unstable.ttl: \
$(top_srcdir)/dependencies/CASE-unstable.ttl \
kb-all.ttl
Expand All @@ -161,6 +189,32 @@ kb-all_validation-unstable.ttl: \
rm __$@
mv _$@ $@

kb-all_validation-unstable-2.0.0.ttl: \
$(top_srcdir)/dependencies/CASE-unstable-2.0.0.ttl \
kb-all.ttl
rm -f __$@ _$@
source $(top_srcdir)/venv/bin/activate \
&& case_validate \
--allow-infos \
--built-version none \
--format turtle \
--inference rdfs \
--ontology-graph $(top_srcdir)/dependencies/CASE-unstable-2.0.0.ttl \
--ontology-graph $(top_srcdir)/dependencies/dependencies.ttl \
--ontology-graph $(top_srcdir)/ontology/case-corpora.ttl \
--ontology-graph $(top_srcdir)/shapes/local.ttl \
--ontology-graph $(top_srcdir)/shapes/shapes.ttl \
--output __$@ \
kb-all.ttl
java -jar $(rdf_toolkit_jar) \
--inline-blank-nodes \
--source-format turtle \
--source __$@ \
--target-format turtle \
--target _$@
rm __$@
mv _$@ $@

kb-datasets.ttl: \
$(kb_datasets_dependencies) \
$(rdf_toolkit_jar) \
Expand Down
2 changes: 2 additions & 0 deletions dependencies/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
CASE-develop.ttl
CASE-develop-2.0.0.ttl
CASE-unstable.ttl
CASE-unstable-2.0.0.ttl
1 change: 1 addition & 0 deletions dependencies/CASE-develop-2.0.0
Submodule CASE-develop-2.0.0 added at 8c58d6
1 change: 1 addition & 0 deletions dependencies/CASE-unstable-2.0.0
Submodule CASE-unstable-2.0.0 added at cb9899
35 changes: 35 additions & 0 deletions dependencies/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,21 @@ case_develop_ttls := \
$(wildcard CASE-develop/dependencies/UCO/ontology/*/*.ttl) \
$(wildcard CASE-develop/dependencies/UCO/ontology/uco/*/*.ttl)

case_develop_2_0_0_ttls := \
$(wildcard CASE-develop-2.0.0/ontology/*/*.ttl) \
$(wildcard CASE-develop-2.0.0/dependencies/UCO/ontology/*/*.ttl) \
$(wildcard CASE-develop-2.0.0/dependencies/UCO/ontology/uco/*/*.ttl)

case_unstable_ttls := \
$(wildcard CASE-unstable/ontology/*/*.ttl) \
$(wildcard CASE-unstable/dependencies/UCO/ontology/*/*.ttl) \
$(wildcard CASE-unstable/dependencies/UCO/ontology/uco/*/*.ttl)

case_unstable_2_0_0_ttls := \
$(wildcard CASE-unstable-2.0.0/ontology/*/*.ttl) \
$(wildcard CASE-unstable-2.0.0/dependencies/UCO/ontology/*/*.ttl) \
$(wildcard CASE-unstable-2.0.0/dependencies/UCO/ontology/uco/*/*.ttl)

dependent_ontology_files := \
cito.ttl \
cpannotationschema.ttl \
Expand All @@ -53,7 +63,9 @@ rdf_toolkit_jar := $(top_srcdir)/dependencies/CASE/dependencies/UCO/lib/rdf-tool

all: \
CASE-develop.ttl \
CASE-develop-2.0.0.ttl \
CASE-unstable.ttl \
CASE-unstable-2.0.0.ttl \
catalog-v001.xml \
dcat-us.jsonld

Expand All @@ -68,16 +80,39 @@ CASE-develop.ttl: \
> _$@
mv _$@ $@

CASE-develop-2.0.0.ttl: \
$(top_srcdir)/.venv.done.log \
$(case_develop_2_0_0_ttls)
rm -f _$@
source $(top_srcdir)/venv/bin/activate \
&& rdfpipe \
--output-format turtle \
$(case_develop_2_0_0_ttls) \
> _$@
mv _$@ $@

CASE-unstable.ttl: \
$(top_srcdir)/.venv.done.log \
$(case_unstable_ttls)
rm -f _$@
source $(top_srcdir)/venv/bin/activate \
&& rdfpipe \
--output-format turtle \
$(case_unstable_ttls) \
> _$@
mv _$@ $@

CASE-unstable-2.0.0.ttl: \
$(top_srcdir)/.venv.done.log \
$(case_unstable_2_0_0_ttls)
rm -f _$@
source $(top_srcdir)/venv/bin/activate \
&& rdfpipe \
--output-format turtle \
$(case_unstable_2_0_0_ttls) \
> _$@
mv _$@ $@

catalog-v001.xml: \
$(case_srcdir)/ontology/master/catalog-v001.xml \
$(top_srcdir)/.venv.done.log \
Expand Down
Loading