A simple implementation of the OWL2 RL Profile on top of RDFLib: it expands the graph with all possible triples that OWL RL defines. It can be used together with RDFLib to expand an RDFLib Graph object, or as a stand alone service with its own serialization.
Hey all! I am trying to package OWL-RL for the Fedora OS and am struggling through one of the test cases that is failing (even in a virtual environment).
The test case is: test_cls_maxqc1 from test/test_classes.py. Below is the error log for the same.
def test_cls_maxqc1():
"""
Test cls-maxqc1 rule for OWL 2 RL.
If::
T(?x, owl:maxQualifiedCardinality, "0"^^xsd:nonNegativeInteger)
T(?x, owl:onProperty, ?p)
T(?x, owl:onClass, ?c)
T(?u, rdf:type, ?x)
T(?u, ?p, ?y)
T(?y, rdf:type, ?c)
then::
false
"""
g = Graph()
x = T.x
p = T.p
c = T.C
u = T.u
y = T.y
g.add((x, OWL.maxQualifiedCardinality, Literal(0)))
g.add((x, OWL.onProperty, p))
g.add((x, OWL.onClass, c))
g.add((u, p, y))
g.add((y, RDF.type, c))
owlrl.DeductiveClosure(owlrl.OWLRL_Semantics).expand(g)
> result = next(g.objects(predicate=DAML.error))
E StopIteration
test/test_classes.py:123: StopIteration
Now, from what I know, the variable g should be a generator object but it is apparently empty/exhausted. I am pretty sure that it should not be like that but am unable to figure out the root problem here.
I will be happy to help if needed. :D
My Python version is 3.9.1 and below are the versions of the installed deps.
Hey all! I am trying to package OWL-RL for the Fedora OS and am struggling through one of the test cases that is failing (even in a virtual environment).
The test case is:
test_cls_maxqc1
fromtest/test_classes.py
. Below is the error log for the same.Now, from what I know, the variable
g
should be a generator object but it is apparently empty/exhausted. I am pretty sure that it should not be like that but am unable to figure out the root problem here.I will be happy to help if needed. :D
My Python version is
3.9.1
and below are the versions of the installed deps.