Skip to content

Commit c620335

Browse files
committed
fix: node names should reflect workflow heirarchy
1 parent 62f2300 commit c620335

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

nipype/pipeline/engine.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454

5555
def _write_inputs(node):
5656
lines = []
57+
nodename = node.fullname.replace('.', '_')
5758
for key, _ in node.inputs.items():
5859
val = getattr(node.inputs, key)
5960
if isdefined(val):
@@ -70,7 +71,7 @@ def _write_inputs(node):
7071
' %s_1(' % funcname)
7172
funcname = '%s_1' % funcname
7273
lines.append('from nipype.utils.misc import getsource')
73-
lines.append("%s.inputs.%s = getsource(%s)" % (node.name,
74+
lines.append("%s.inputs.%s = getsource(%s)" % (nodename,
7475
key,
7576
funcname))
7677
else:
@@ -82,7 +83,7 @@ def format_node(node, format='python'):
8283
"""Format a node in a given output syntax
8384
"""
8485
lines = []
85-
name = node.name
86+
name = node.fullname.replace('.', '_')
8687
if format == 'python':
8788
klass = node._interface
8889
importline = 'from %s import %s' % (klass.__module__,

0 commit comments

Comments
 (0)