RDFLib / pySHACL

A Python validator for SHACL
Apache License 2.0
241 stars 63 forks source link

Shacl does not seem to work on rdflib.Dataset() #208

Closed MiltosD closed 7 months ago

MiltosD commented 9 months ago

Trying to overcome the inoculation issue, I created an rdflib.Dataset() with two graphs, 1. ontologies, 2. input data to be validated. I was expecting that validation would run as stated in W3C.

"A data graph is one of the inputs to the SHACL processor for validation. SHACL processors treat it as a general RDF graph and makes no assumption about its nature. For example, it can be an in-memory graph or a named graph from an RDF dataset or a SPARQL endpoint."

It seems like pyShacl won't work, assuming i'm not doing something wrong...

v0.23.0

ashleysommer commented 8 months ago

Hi @MiltosD Yes, PySHACL does work on rdflib.Dataset. This is a supported feature since v0.11.0 in September 2019. See https://github.com/RDFLib/pySHACL/blob/master/CHANGELOG.md

If you are experiencing a problem when trying to validate the data graphs in a Dataset, please provide more information and a reproducable case so that we can help you further, or chat with us on Discord for help: https://discord.gg/RTbGfJqdKB