The SBOLFactory provides a mechanism for automatically generating an interactive, object-oriented API from a declarative data model specification encoded in OWL.
There is an inconsistency in how different versions of rdflib handle namespace prefixes that cause the prov ontology to be given a the default1 prefix instead of prov. This causes an issue for UML factory rendering class qnames correctly, and problems for testing.
import rdflib
def check_namespaces(graph):
prefixes = [p for p, ns in graph.namespaces()]
if 'default1' in prefixes:
print(prefixes)
return False
return True
# This fails with rdflib 6.0.2 but passess with 6.1.1
g=rdflib.Graph(base='http://sbols.org/v3#')
g.parse('sbol_factory/rdf/prov-o.owl')
assert check_namespaces(g) is True
g.parse('sbol_factory/rdf/sbolowl3.rdf')
assert check_namespaces(g) is True
# This fails with rdflib 6.1.1 but passes with 6.0.2
g=rdflib.Graph(base='http://sbols.org/v3#')
g.parse('sbol_factory/rdf/sbolowl3.rdf')
assert check_namespaces(g) is True
g.parse('sbol_factory/rdf/prov-o.owl')
assert check_namespaces(g) is True
There is an inconsistency in how different versions of rdflib handle namespace prefixes that cause the prov ontology to be given a the
default1
prefix instead ofprov
. This causes an issue for UML factory rendering class qnames correctly, and problems for testing.This may be related to https://stackoverflow.com/questions/65818401/namespace-binding-in-rdflib
Here is a minimal case