Skip to content

Forward-port allow-infos flag from pyshacl #75

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

Merged
merged 1 commit into from
Nov 8, 2022
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
11 changes: 11 additions & 0 deletions case_utils/case_validate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,20 @@ def main() -> None:
action="store_true",
help="(As with pyshacl CLI) Abort on first invalid data.",
)
parser.add_argument(
"--allow-info",
"--allow-infos",
dest="allow_infos",
action="store_true",
default=False,
help="(As with pyshacl CLI) Shapes marked with severity of Info will not cause result to be invalid.",
)
parser.add_argument(
"-w",
"--allow-warning",
"--allow-warnings",
action="store_true",
dest="allow_warnings",
help="(As with pyshacl CLI) Shapes marked with severity of Warning or Info will not cause result to be invalid.",
)
parser.add_argument(
Expand Down Expand Up @@ -161,6 +171,7 @@ def main() -> None:
ont_graph=ontology_graph,
inference=args.inference,
abort_on_first=args.abort,
allow_infos=True if args.allow_infos else False,
allow_warnings=True if args.allow_warnings else False,
debug=True if args.debug else False,
do_owl_imports=True if args.imports else False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ all: \
rm -f __$@ _$@
source $(tests_srcdir)/venv/bin/activate \
&& case_validate \
--allow-warnings \
--allow-infos \
--debug \
--format turtle \
--output __$@ \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ all: \
$(top_srcdir)/case_utils/ontology/__init__.py
source $(tests_srcdir)/venv/bin/activate \
&& case_validate \
--allow-warnings \
--allow-infos \
--debug \
--format turtle \
$< \
Expand Down