Skip to content

Commit

Permalink
fix: allow shacl warnings (#17)
Browse files Browse the repository at this point in the history
* fix: allowed warnings

* fix: added allow_warnings default value

* style: ruff checks
  • Loading branch information
farouktelicent authored Aug 6, 2024
1 parent 2eba8d5 commit 6233ea3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions shacltool/owl2shacl.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,16 @@ def create_shacl(ontology: str | Path | Graph) -> tuple[Graph, Graph]:
return ont_graph, sh_graph


def rdf_validate(data_file: str | Graph, ont_graph: str | Graph, sh_graph: str | Graph) -> tuple[bool, Graph, str]:
def rdf_validate(data_file: str | Graph, ont_graph: str | Graph, sh_graph: str | Graph,
allow_warnings: bool = False) -> tuple[bool, Graph, str]:
# run shacl validation
conforms, results_graph, results_text = validate(data_file,
shacl_graph=sh_graph,
ont_graph=ont_graph,
inference='none',
abort_on_first=False,
allow_infos=False,
allow_warnings=False,
allow_warnings=allow_warnings,
meta_shacl=False,
advanced=True,
js=False,
Expand Down

0 comments on commit 6233ea3

Please sign in to comment.