RDFLib / pySHACL

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

Issue 190 Resolution #191

Closed dandunbar23 closed 12 months ago

dandunbar23 commented 12 months ago

This PR related to Issue #190. It adds test_190.py to the test suite with two tests - one uses the data graph mentioned in the Issue and verifies that the results graph shows two failures. The second test fixes the data graph and ensures that the SHACL shape runs clean.

Instead of simply deleting the dedup_set guard, I replaced it with a check on the violations list. In my mind, this accomplished the same goal of not returning duplicates. It's unclear to me if that removes the need for the dedup_set variable completely. It's referenced earlier in the for loop, so I left it in.

dandunbar23 commented 12 months ago

I should also note that all of that pytest tests passed in my local environment although there appeared to be a problem with the lint check that appeared both before and after my changes. This may have been a problem with my local environment, but it seems like it was related to the typed-ast package, which is no longer maintained.

ashleysommer commented 12 months ago

This looks great, it is the same change I was going to make. Thanks.