SynBioDex / pySBOL3

Native python implementation of SBOL 3.0 specification
MIT License
37 stars 16 forks source link

Validation fails when parsing SHACL graph #257

Closed jakebeal closed 3 years ago

jakebeal commented 3 years ago

My tests in SBOL-utilities are failing due a failure in the document validation method, while it is attempting to parse the results of running SHACL validation.

This runs successfully with 1.0a9, but is now failing with 1.0b2

Failing build: https://github.com/SynBioDex/SBOL-utilities/runs/2670675901?check_suite_focus=true

Key error excerpt:

>       for shacl_report, in shacl_graph.subjects(rdflib.RDF.type,
                                                  shacl_ns.ValidationReport):
E                                                 ValueError: too many values to unpack (expected 1)

/usr/local/lib/python3.9/site-packages/sbol3/document.py:390: ValueError
tcmitchell commented 3 years ago

This seems to be a test coverage issue. The pySBOL3 unit tests do not execute the method that is having the ValueError. I am suspicious of the for shacl_report, in shacl_graph.subjects because of the trailing comma on after shacl_report. The first step is to create a unit test that executes this line of code. We'll take it from there.

tcmitchell commented 3 years ago

The trailing comma is indeed the issue. That is a holdover from a slightly different design for walking the graph generated by pySHACL. The comma was not eliminated during the redesign, and there were no unit tests executing the code so it went unnoticed.

jakebeal commented 3 years ago

Looks like this is working in my local build as well now with the new release. Now I just need to figure out the validation errors...