Skip to content

Commit 7353c54

Browse files
committed
case_validate: Default to None rather than "none"
Defaulting to the string `"none"` has a functional consequence in downstream pySHACL operations, as encoded at the time of this writing (pySHACL version 0.23.0). `inference` in the `pyshacl.validate(...)` arguments is propagated down two code paths that both impact the validation operation, but that use different default values. The `--metashacl` (SHACL-SHACL validation graph for reviewing shape syntax)- aligned code path defaults to `rdfs` inference, and the `Validator` class defaults to the string `"none"`. Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
1 parent e51dc87 commit 7353c54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

case_utils/case_validate/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,12 @@ def main() -> None:
136136
action="store_true",
137137
help="(As with pyshacl CLI) Allow import of sub-graphs defined in statements with owl:imports.",
138138
)
139+
# NOTE: The "ontology graph" in the --inference help is the mix of the SHACL shapes graph and OWL ontology (or RDFS schema) graph.
139140
parser.add_argument(
140141
"-i",
141142
"--inference",
142143
choices=("none", "rdfs", "owlrl", "both"),
143-
default="none",
144-
help='(As with pyshacl CLI) Choose a type of inferencing to run against the Data Graph before validating. Default is "none".',
144+
help='(As with pyshacl CLI) Choose a type of inferencing to run against the Data Graph before validating. The default behavior if this flag is not provided is to behave as "none", if not using the --metashacl flag. The default behavior when using the --metashacl flag will apply "rdfs" inferencing to the ontology graph, but the data graph will still have no inferencing applied. If the --inference flag is provided, it will apply to both the ontology graph, and the data graph.',
145145
)
146146
parser.add_argument(
147147
"-m",

0 commit comments

Comments
 (0)