Skip to content

Commit be2bc78

Browse files
committed
Forward-port allow-infos flag from pyshacl
References: * RDFLib/pySHACL#121 * #70 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
1 parent ee83bfd commit be2bc78

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

case_utils/case_validate/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,20 @@ def main() -> None:
8686
action="store_true",
8787
help="(As with pyshacl CLI) Abort on first invalid data.",
8888
)
89+
parser.add_argument(
90+
"--allow-info",
91+
"--allow-infos",
92+
dest="allow_infos",
93+
action="store_true",
94+
default=False,
95+
help="(As with pyshacl CLI) Shapes marked with severity of Info will not cause result to be invalid.",
96+
)
8997
parser.add_argument(
9098
"-w",
99+
"--allow-warning",
91100
"--allow-warnings",
92101
action="store_true",
102+
dest="allow_warnings",
93103
help="(As with pyshacl CLI) Shapes marked with severity of Warning or Info will not cause result to be invalid.",
94104
)
95105
parser.add_argument(
@@ -161,6 +171,7 @@ def main() -> None:
161171
ont_graph=ontology_graph,
162172
inference=args.inference,
163173
abort_on_first=args.abort,
174+
allow_infos=True if args.allow_infos else False,
164175
allow_warnings=True if args.allow_warnings else False,
165176
debug=True if args.debug else False,
166177
do_owl_imports=True if args.imports else False,

tests/case_utils/case_validate/case_test_examples/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ all: \
4848
rm -f __$@ _$@
4949
source $(tests_srcdir)/venv/bin/activate \
5050
&& case_validate \
51-
--allow-warnings \
51+
--allow-infos \
5252
--debug \
5353
--format turtle \
5454
--output __$@ \

tests/case_utils/case_validate/uco_test_examples/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ all: \
7676
$(top_srcdir)/case_utils/ontology/__init__.py
7777
source $(tests_srcdir)/venv/bin/activate \
7878
&& case_validate \
79-
--allow-warnings \
79+
--allow-infos \
8080
--debug \
8181
--format turtle \
8282
$< \

0 commit comments

Comments
 (0)