-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Output with anonymous focus nodes, could it print whole node? #32
Comments
Hi, there is actually a standard feature in pyshacl which should print the whole anonymous node text in the output. If it's not doing that, it's a bug. Are you able to share some sample code which reproduces this output? |
Hi Again, I think I have reproduced the same (or similar) problem in a new test I'm writing. I think its yet another problem that was introduced when we switched from using Graphs by default to Datasets by default. Stringifying a blank node (anonymous node) that is in rdflib Dataset does not work in the same way as when using an rdflib Graph. Working on a solution. |
Stringification of Focus Node, and Value Node in the results text string now works correctly - This is an old bug, that has been around since the first versions of pySHACL - Manifests when the DataGraph is a different graph than the ShapesGraph - Recent change from using Graphs by default to using Datasets by default helped to expose this bug - Thanks to @jameshowison for reporting the bug Stringification of a blank node now operates on a rdflib.Graph only, rather than a Dataset. - Added mechanism to extract the correct named graph from a dataset when stringifying a blank node. Added a workaround for a json-ld loader bug where the namespace_manager for named graphs within a conjunctive graph is set to the parent conjunctive graph. - This necessary workaround was exposed only after changing the blank node stringification above. (Fixing one bug exposed another bug!)
Hi @jameshowison |
Works perfectly now, shows whole anonymous node. Apologies that I didn't include a specific reprex, will do next time! (ps. and just a docker build --no-cache updated everything pulling the new version from PyPI). |
I'm doing some validation in data with anonymous nodes. The output of validate (e.g., results_text) shows:
That makes it pretty hard to know which node has the issue. Any thoughts on how to identify them. I'm wondering if there could be an option to print either the datafile:line_number (hard, I know) or perhaps the whole anonymous node (ours are small, I know they could be very big, but even a few lines would probably help locate them).
The text was updated successfully, but these errors were encountered: