Skip to content

Commit 617540d

Browse files
committed
brk: still updating export
1 parent 03502f4 commit 617540d

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

nipype/pipeline/engine.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -486,14 +486,19 @@ def export(self, prefix="output", format="python"):
486486
if format not in formats:
487487
raise ValueError('format must be one of: %s' % '|'.join(formats))
488488
flatgraph = self._create_flat_graph()
489+
nodes = nx.topological_sort(flatgraph)
489490

490491
if format == "python":
491492
with open('%s.py', 'wt') as fp:
492-
# write nodes
493-
for node in nx.topological_sort(flatgraph):
494-
nodestr = node.format(format=python)
493+
nodenames = []
494+
for idx, node in enumerate(nodes):
495+
# write nodes
496+
nodestr, nodename = node.format(format=python)
495497
fp.writelines(nodestr)
496-
# write connections
498+
# write connections
499+
for prevnode in flatgraph.predecessors(node):
500+
# write connection
501+
pass
497502

498503
def run(self, plugin=None, plugin_args=None, updatehash=False):
499504
""" Execute the workflow

0 commit comments

Comments
 (0)