SynBioDex / pySBOL2

A pure Python implementation of the SBOL standard.
Apache License 2.0
20 stars 6 forks source link

Debug messages yield TypeErrors #408

Open tcmitchell opened 2 years ago

tcmitchell commented 2 years ago

Several unit tests failed with the following stack trace during the overnight builds. Why these unit tests went down this path is still a mystery. But they did, which means if a user sets VERBOSE to True they would see the same exception.

Either change these debug prints to handle the booleans, or remove them. And if they're going to get updated, consider changing them to logging statements instead of prints.

Traceback (most recent call last):
  File "/home/runner/work/pySBOL2/pySBOL2/test/test_identified.py", line 110, in test_name
    cd = d.componentDefinitions['http://examples.org/ComponentDefinition/AmeR/1']
  File "/home/runner/work/pySBOL2/pySBOL2/sbol2/property.py", line 641, in __getitem__
    return self.get_uri(rdflib.URIRef(id))
  File "/home/runner/work/pySBOL2/pySBOL2/sbol2/property.py", line 669, in get_uri
    print('SBOL compliant URIs are set to ' +
TypeError: can only concatenate str (not "bool") to str
tcmitchell commented 2 years ago

The build jobs succeeded when rerun so it remains a mystery how VERBOSE was set to True to trigger the exception in this issue. There were other exceptions relating to online services that were not available, so that might have triggered it.

If the online services (validator, SynBioHub) are down regularly for overnight builds we might want to change the build schedule to a different time. We could work with the owners of those services to understand what their maintenance schedule is to understand what time windows should be avoided.