diff --git a/CHANGELOG.md b/CHANGELOG.md index c4ac735..22fdd33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p ## [Unreleased] +### Fixed + +- Check if max-validation-depth is an integer 1-999 + ## [5.0.0] 2024-06-17 ### Added diff --git a/README.md b/README.md index 9705f4c..29a7341 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ Enable SHACL Advanced Features. Default value: *false*. ### Maximum evaluation depth -The maximum number of SHACL shapes "deep" that the validator can go before reaching an "endpoint" constraint. Default value: 15 +The maximum number of SHACL shapes "deep" that the validator can go before reaching an "endpoint" constraint (1-999). Default value: 15 ## Parameter Input diff --git a/cmem_plugin_pyshacl/plugin_pyshacl.py b/cmem_plugin_pyshacl/plugin_pyshacl.py index afb8578..4ae25cb 100644 --- a/cmem_plugin_pyshacl/plugin_pyshacl.py +++ b/cmem_plugin_pyshacl/plugin_pyshacl.py @@ -617,7 +617,9 @@ def check_parameters( # noqa: C901 PLR0912 if self.inference not in ("none", "rdfs", "owlrl", "both"): raise ValueError("Invalid value for inference parameter") - if not isinstance(self.max_validation_depth, int) and self.max_validation_depth < 1: + if not isinstance( + self.max_validation_depth, int + ) and self.max_validation_depth not in range(1, 1000): raise ValueError("Invalid value for maximum evaluation depth") self.log.info("Parameters OK:")