Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions ontopy/factpluspluswrapper/owlapi_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ def reason(self, graph):
graph (Graph): An rdflib graph to execute the reasoner on.

"""
with tempfile.NamedTemporaryFile("wt") as tmpdir:
graph.serialize(tmpdir.name, format="xml")
return self._run(tmpdir.name, command="--run-reasoner")
with tempfile.TemporaryDirectory("wt") as tmpdir:
tmpfile = os.path.join(tmpdir, "tmponto.xml")
graph.serialize(tmpfile, format="xml")
return self._run(tmpfile, command="--run-reasoner")

def reason_files(self, *owl_files):
"""Merge the given owl and generate the inferred axioms.
Expand Down
Loading