Closed AJAY31797 closed 9 months ago
Hi @AJAY31797
It seems like you are looking for the validation results amongst the Debug log messages. You will not find the conformance reports and validation result in those debug logs.
The conformance result (boolean True/False) is in the variable conforms
and the result text is in the variable results_text
.
Try this:
from pyshacl import validate
r = validate(data_graph = Datagraph, shacl_graph = Shapegraph, data_graph_format="turtle", shacl_graph_format="turtle", inference = "rdfs", debug = True, abort_on_error = False, meta_shacl = False, serialize_report_graph = "ttl")
conforms, results_graph, results_text = r
print("Conforms: ", str(conforms))
print("Results:\n", results_text)
Note, these basic usage instructions are in the README file, and this kind of question should be asked on the Discord SHACL Discussion forum, not on the issue tracker.
Thanks @ashleysommer. I am still not able to see the correct results. Basically, for every constraint, my query results in Conforms:True. Seems like some mistake with my query. Anyways, thanks for your support and suggestion of the Discord SHACL discussion forum.
Hi,
I am trying to develop a shape for validating the distance constraint between two walls. The data graph is coming from a converted ifc file and the shape I have developed by myself, taking help from (https://github.com/RDFLib/pySHACL/blob/master/examples/advanced.py). Here is my data graph (in a simplified form, I have removed irrelevant data for clarity):
The shape I have written is as follows:
I am using the following code for performing validation:
However, the validation result does not show me whether the constraints are satisfied or not. Here is the validation result which I am getting:
As seen above, the result does not mention anything about whether the constraints are satisfied or not. Is it something related to some error in the shape? I checked it based on the example, and it looks correct to me. Or is it because of some other issue in compiling the code? Thanks in advance for any help.
Best Regards, Ajay