Skip to content

Commit

Permalink
Add review for next-major unstable branch
Browse files Browse the repository at this point in the history
A follow-on patch will regenerate Make-managed files.

References:
* ucoProject/UCO#493
* ucoProject/UCO#508

Signed-off-by: Alex Nelson <[email protected]>
  • Loading branch information
ajnelson-nist committed Jan 6, 2023
1 parent b561491 commit c18372a
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@
[submodule "dependencies/CASE-unstable"]
path = dependencies/CASE-unstable
url = https://github.com/casework/CASE-Archive.git
[submodule "dependencies/CASE-unstable-2.0.0"]
path = dependencies/CASE-unstable-2.0.0
url = https://github.com/casework/CASE-Archive.git
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ all: \
|| (git submodule init dependencies/CASE-unstable && git submodule update dependencies/CASE-unstable)
test -r dependencies/CASE-unstable/README.md \
|| (echo "ERROR:Makefile:CASE-unstable submodule README.md file not found, even though CASE-unstable submodule initialized." >&2 ; exit 2)
# 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
# UCO-develop
test -r dependencies/UCO-develop/README.md \
|| (git submodule init dependencies/UCO-develop && git submodule update dependencies/UCO-develop)
Expand Down
4 changes: 2 additions & 2 deletions dependencies/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CASE-develop.ttl
CASE-unstable.ttl
CASE-develop*.ttl
CASE-unstable*.ttl
1 change: 1 addition & 0 deletions dependencies/CASE-unstable-2.0.0
Submodule CASE-unstable-2.0.0 added at 5a97e5
22 changes: 20 additions & 2 deletions dependencies/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,17 @@ case_unstable_ttls := \
$(wildcard UCO-unstable/ontology/*/*.ttl) \
$(wildcard UCO-unstable/ontology/uco/*/*.ttl)

case_unstable_next_major_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)

top_srcdir := $(shell cd .. ; pwd)

all: \
CASE-develop.ttl \
CASE-unstable.ttl
CASE-unstable.ttl \
CASE-unstable-2.0.0.ttl

CASE-develop.ttl: \
$(top_srcdir)/.venv.done.log \
Expand All @@ -51,7 +57,19 @@ CASE-unstable.ttl: \
> _$@
mv _$@ $@

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

clean:
@rm -f \
CASE-develop.ttl \
CASE-unstable.ttl
CASE-unstable.ttl \
CASE-unstable-2.0.0.ttl
33 changes: 31 additions & 2 deletions examples/illustrations/src/illustration-nosrc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ endif
all: \
$(example_name)_validation.ttl \
$(example_name)_validation-develop.ttl \
$(example_name)_validation-unstable.ttl
$(example_name)_validation-unstable.ttl \
$(example_name)_validation-unstable-2.0.0.ttl

.PHONY: \
check-pytest
Expand Down Expand Up @@ -125,11 +126,39 @@ $(example_name)_validation-unstable.ttl: \
rm __$@
mv _$@ $@

$(example_name)_validation-unstable-2.0.0.ttl: \
$(example_name).json \
$(RDF_TOOLKIT_JAR) \
$(drafting_ttl) \
$(top_srcdir)/.venv.done.log \
$(top_srcdir)/dependencies/CASE-unstable-2.0.0.ttl
rm -f __$@
source $(top_srcdir)/venv/bin/activate \
&& case_validate \
--allow-infos \
--built-version none \
--format turtle \
$(drafting_validation_flag) \
--ontology-graph $(top_srcdir)/dependencies/CASE-unstable-2.0.0.ttl \
--output __$@ \
$< \
; rc=$$? ; test 0 -eq $$rc -o 1 -eq $$rc
test -s __$@
java -jar $(RDF_TOOLKIT_JAR) \
--inline-blank-nodes \
--source __$@ \
--source-format turtle \
--target _$@ \
--target-format turtle
rm __$@
mv _$@ $@

check: \
check-pytest \
$(example_name)_validation.ttl \
$(example_name)_validation-develop.ttl \
$(example_name)_validation-unstable.ttl
$(example_name)_validation-unstable.ttl \
$(example_name)_validation-unstable-2.0.0.ttl

# Run pytest tests only if any are written.
# (Pytest exits in an error state if called with no tests found.)
Expand Down

0 comments on commit c18372a

Please sign in to comment.