Skip to content

Commit 01718b3

Browse files
committed
use cache_dir instead of output_dir
1 parent 726d242 commit 01718b3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pydra/engine/core.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,21 +1189,22 @@ def _collect_outputs(self):
11891189
)
11901190
return attr.evolve(output, **output_wf)
11911191

1192-
def create_dotfile(self, type="simple", export=None, name=None):
1192+
def create_dotfile(self, type="simple", export=None, name=None, output_dir = None):
11931193
"""creating a graph - dotfile and optionally exporting to other formats"""
1194+
outdir = output_dir if output_dir is not None else self.cache_dir
11941195
if not name:
11951196
name = f"graph_{self.name}"
11961197
if type == "simple":
11971198
for task in self.graph.nodes:
11981199
self.create_connections(task)
11991200
dotfile = self.graph.create_dotfile_simple(
1200-
outdir=self.output_dir, name=name
1201+
outdir=outdir, name=name
12011202
)
12021203
elif type == "nested":
12031204
for task in self.graph.nodes:
12041205
self.create_connections(task)
12051206
dotfile = self.graph.create_dotfile_nested(
1206-
outdir=self.output_dir, name=name
1207+
outdir=outdir, name=name
12071208
)
12081209
elif type == "detailed":
12091210
# create connections with detailed=True
@@ -1213,7 +1214,7 @@ def create_dotfile(self, type="simple", export=None, name=None):
12131214
for (wf_out, lf) in self._connections:
12141215
self.graph.add_edges_description((self.name, wf_out, lf.name, lf.field))
12151216
dotfile = self.graph.create_dotfile_detailed(
1216-
outdir=self.output_dir, name=name
1217+
outdir=outdir, name=name
12171218
)
12181219
else:
12191220
raise Exception(

0 commit comments

Comments
 (0)