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

Separate drafting-ontology validation from example validation #137

Merged
merged 1 commit into from
Dec 22, 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
1 change: 1 addition & 0 deletions examples/illustrations/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.drafting.ttl.validates*.log
all-drafting.ttl
generated-*.md
generated-*.sed
Expand Down
95 changes: 89 additions & 6 deletions examples/illustrations/src/illustration-nosrc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,19 @@ example_name := $(shell basename $$PWD)
# Use a drafting.ttl file in the validation and dependency list, if it is present.
drafting_ttl := $(wildcard drafting.ttl)
ifeq ($(drafting_ttl),)
drafting_dependency :=
drafting_dependency_develop :=
drafting_dependency_develop_2_0_0 :=
drafting_dependency_unstable :=
drafting_dependency_unstable_2_0_0 :=
drafting_validation_flag :=
else
drafting_validation_flag := --ontology-graph $(wildcard drafting.ttl) --review-tbox
drafting_dependency := .drafting.ttl.validates.log
drafting_dependency_develop := .drafting.ttl.validates-develop.log
drafting_dependency_develop_2_0_0 := .drafting.ttl.validates-develop-2.0.0.log
drafting_dependency_unstable := .drafting.ttl.validates-unstable.log
drafting_dependency_unstable_2_0_0 := .drafting.ttl.validates-unstable-2.0.0.log
drafting_validation_flag := --ontology-graph $(drafting_ttl)
endif

RENDER_PROV ?=
Expand Down Expand Up @@ -114,7 +124,7 @@ $(example_name)-prov.ttl: \
$(example_name)_validation.ttl: \
$(example_name).json \
$(RDF_TOOLKIT_JAR) \
$(drafting_ttl) \
$(drafting_dependency) \
$(top_srcdir)/.venv.done.log
rm -f __$@
source $(top_srcdir)/venv/bin/activate \
Expand All @@ -138,7 +148,7 @@ $(example_name)_validation.ttl: \
$(example_name)_validation-develop.ttl: \
$(example_name).json \
$(RDF_TOOLKIT_JAR) \
$(drafting_ttl) \
$(drafting_dependency_develop) \
$(top_srcdir)/.venv.done.log \
$(top_srcdir)/dependencies/CASE-develop.ttl
rm -f __$@
Expand All @@ -165,7 +175,7 @@ $(example_name)_validation-develop.ttl: \
$(example_name)_validation-develop-2.0.0.ttl: \
$(example_name).json \
$(RDF_TOOLKIT_JAR) \
$(drafting_ttl) \
$(drafting_dependency_develop_2_0_0) \
$(top_srcdir)/.venv.done.log \
$(top_srcdir)/dependencies/CASE-develop-2.0.0.ttl
rm -f __$@
Expand All @@ -192,7 +202,7 @@ $(example_name)_validation-develop-2.0.0.ttl: \
$(example_name)_validation-unstable.ttl: \
$(example_name).json \
$(RDF_TOOLKIT_JAR) \
$(drafting_ttl) \
$(drafting_dependency_unstable) \
$(top_srcdir)/.venv.done.log \
$(top_srcdir)/dependencies/CASE-unstable.ttl
rm -f __$@
Expand All @@ -219,7 +229,7 @@ $(example_name)_validation-unstable.ttl: \
$(example_name)_validation-unstable-2.0.0.ttl: \
$(example_name).json \
$(RDF_TOOLKIT_JAR) \
$(drafting_ttl) \
$(drafting_dependency_unstable_2_0_0) \
$(top_srcdir)/.venv.done.log \
$(top_srcdir)/dependencies/CASE-unstable-2.0.0.ttl
rm -f __$@
Expand All @@ -243,6 +253,78 @@ $(example_name)_validation-unstable-2.0.0.ttl: \
rm __$@
mv _$@ $@

.drafting.ttl.validates.log: \
$(drafting_ttl) \
$(top_srcdir)/.venv.done.log
source $(top_srcdir)/venv/bin/activate \
&& case_validate \
--allow-infos \
--metashacl \
--ontology-graph $(drafting_ttl) \
--review-tbox \
$(drafting_ttl)
touch $@

.drafting.ttl.validates-develop.log: \
$(drafting_ttl) \
$(top_srcdir)/.venv.done.log \
$(top_srcdir)/dependencies/CASE-develop.ttl
source $(top_srcdir)/venv/bin/activate \
&& case_validate \
--allow-infos \
--built-version none \
--metashacl \
--ontology-graph $(drafting_ttl) \
--ontology-graph $(top_srcdir)/dependencies/CASE-develop.ttl \
--review-tbox \
$(drafting_ttl)
touch $@

.drafting.ttl.validates-develop-2.0.0.log: \
$(drafting_ttl) \
$(top_srcdir)/.venv.done.log \
$(top_srcdir)/dependencies/CASE-develop-2.0.0.ttl
source $(top_srcdir)/venv/bin/activate \
&& case_validate \
--allow-infos \
--built-version none \
--metashacl \
--ontology-graph $(drafting_ttl) \
--ontology-graph $(top_srcdir)/dependencies/CASE-develop-2.0.0.ttl \
--review-tbox \
$(drafting_ttl)
touch $@

.drafting.ttl.validates-unstable.log: \
$(drafting_ttl) \
$(top_srcdir)/.venv.done.log \
$(top_srcdir)/dependencies/CASE-unstable.ttl
source $(top_srcdir)/venv/bin/activate \
&& case_validate \
--allow-infos \
--built-version none \
--metashacl \
--ontology-graph $(drafting_ttl) \
--ontology-graph $(top_srcdir)/dependencies/CASE-unstable.ttl \
--review-tbox \
$(drafting_ttl)
touch $@

.drafting.ttl.validates-unstable-2.0.0.log: \
$(drafting_ttl) \
$(top_srcdir)/.venv.done.log \
$(top_srcdir)/dependencies/CASE-unstable-2.0.0.ttl
source $(top_srcdir)/venv/bin/activate \
&& case_validate \
--allow-infos \
--built-version none \
--metashacl \
--ontology-graph $(drafting_ttl) \
--ontology-graph $(top_srcdir)/dependencies/CASE-unstable-2.0.0.ttl \
--review-tbox \
$(drafting_ttl)
touch $@

check: \
check-pytest \
$(example_name)_validation.ttl \
Expand All @@ -264,6 +346,7 @@ check-pytest: \

clean:
@rm -f \
.drafting.ttl.*.log \
figures/*.dot \
figures/*.svg \
$(example_name)_validation*.ttl
Expand Down
Loading