Skip to content

Commit f4dc25a

Browse files
committed
2 parents 83e6eb3 + a9ef35f commit f4dc25a

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

pydra/engine/core.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,32 +1235,27 @@ def _collect_outputs(self):
12351235
)
12361236
return attr.evolve(output, **output_wf)
12371237

1238-
def create_dotfile(self, type="simple", export=None, name=None):
1238+
def create_dotfile(self, type="simple", export=None, name=None, output_dir=None):
12391239
"""creating a graph - dotfile and optionally exporting to other formats"""
1240+
outdir = output_dir if output_dir is not None else self.cache_dir
12401241
if not name:
12411242
name = f"graph_{self.name}"
12421243
if type == "simple":
12431244
for task in self.graph.nodes:
12441245
self.create_connections(task)
1245-
dotfile = self.graph.create_dotfile_simple(
1246-
outdir=self.output_dir, name=name
1247-
)
1246+
dotfile = self.graph.create_dotfile_simple(outdir=outdir, name=name)
12481247
elif type == "nested":
12491248
for task in self.graph.nodes:
12501249
self.create_connections(task)
1251-
dotfile = self.graph.create_dotfile_nested(
1252-
outdir=self.output_dir, name=name
1253-
)
1250+
dotfile = self.graph.create_dotfile_nested(outdir=outdir, name=name)
12541251
elif type == "detailed":
12551252
# create connections with detailed=True
12561253
for task in self.graph.nodes:
12571254
self.create_connections(task, detailed=True)
12581255
# adding wf outputs
12591256
for (wf_out, lf) in self._connections:
12601257
self.graph.add_edges_description((self.name, wf_out, lf.name, lf.field))
1261-
dotfile = self.graph.create_dotfile_detailed(
1262-
outdir=self.output_dir, name=name
1263-
)
1258+
dotfile = self.graph.create_dotfile_detailed(outdir=outdir, name=name)
12641259
else:
12651260
raise Exception(
12661261
f"type of the graph can be simple, detailed or nested, "

0 commit comments

Comments
 (0)