Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
moving itername and _id from Node to EngineBase
  • Loading branch information
djarecka committed Aug 2, 2018
commit 431be357d36bbf752d6d59731f9b698b40919328
9 changes: 9 additions & 0 deletions nipype/pipeline/engine/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def __init__(self, name=None, base_dir=None):
self.base_dir = base_dir
self.config = deepcopy(config._sections)
self.name = name
self._id = self.name # for compatibility with node expansion using iterables

@property
def name(self):
Expand All @@ -66,6 +67,14 @@ def inputs(self):
def outputs(self):
raise NotImplementedError

@property
def itername(self):
"""Name for expanded iterable"""
itername = self._id
if self._hierarchy:
itername = '%s.%s' % (self._hierarchy, self._id)
return itername

def clone(self, name):
"""Clone an EngineBase object

Expand Down
9 changes: 0 additions & 9 deletions nipype/pipeline/engine/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ def __init__(self,
self._got_inputs = False
self._originputs = None
self._output_dir = None
self._id = self.name # for compatibility with node expansion using iterables

self.iterables = iterables
self.synchronize = synchronize
Expand Down Expand Up @@ -249,14 +248,6 @@ def n_procs(self, value):
if hasattr(self._interface.inputs, 'num_threads'):
self._interface.inputs.num_threads = self._n_procs

@property
def itername(self):
"""Name for expanded iterable"""
itername = self._id
if self._hierarchy:
itername = '%s.%s' % (self._hierarchy, self._id)
return itername

def output_dir(self):
"""Return the location of the output directory for the node"""
# Output dir is cached
Expand Down