Skip to content

Commit ae075d1

Browse files
committed
poetry -> uv, fix dependencies for ontoenv
1 parent 6c12073 commit ae075d1

File tree

5 files changed

+17286
-12149
lines changed

5 files changed

+17286
-12149
lines changed

brickschema/graph.py

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,7 @@ def validate(
127127
allow_warnings=True,
128128
)
129129
elif engine == "topquadrant":
130-
# check if 'java' is in the path
131-
import shutil
132-
133-
if shutil.which("java") is None:
134-
raise Exception(
135-
"TopQuadrant SHACL validation requires Java to be installed and in the PATH"
136-
)
137-
from brickschema.topquadrant_shacl import validate
138-
130+
from brick_tq_shacl.pyshacl import validate
139131
if shape_graphs is not None and isinstance(shape_graphs, list):
140132
for sg in shape_graphs:
141133
shapes += sg
@@ -263,21 +255,12 @@ def expand(
263255
return
264256
elif profile == "shacl":
265257
if backend == "topquadrant":
266-
# check if 'java' is in the path
267-
import shutil
268-
269-
if shutil.which("java") is None:
270-
raise Exception(
271-
"TopQuadrant SHACL validation requires Java to be installed and in the PATH"
272-
)
273-
from brickschema.topquadrant_shacl import infer
274-
258+
from brick_tq_shacl.pyshacl import infer
275259
# 'res' is a de-skolemized graph. We want to replace the contents
276260
# of this graph with the de-skolemized version because topquadrant requires
277261
# that skolemization is applied to the input graph in order to preserve
278262
# identity of inferred subject/objects
279263
res = infer(self, og or rdflib.Graph())
280-
self.remove((None, None, None))
281264
self += res
282265
return self
283266
valid, _, report = pyshacl.validate(

0 commit comments

Comments
 (0)