RDFLib / pySHACL

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

Use SHACL graph to help find focus nodes for targetClass #149

Closed gtfierro closed 2 years ago

gtfierro commented 2 years ago

Addresses #148 as a start. Probably not the ideal fix for 2 reasons:

  1. doesn't use the ontology graph (though weird things seem to happen when ontology graph and shape graph are provided...inference doesn't happen at all! Not sure why that happens but I think this is out of scope for #148)
  2. the fix feels hacky and wasteful -- we create a temporary graph that is the union of the shape graph and the data graph inside shape.focus_nodes. Is there a better way?

However, I wanted to create the fix to demonstrate what the fix may look like