Skip to content

Commit 2f762c2

Browse files
committed
ENH: Allow client args as IPython plugin_args
1 parent 47587b9 commit 2f762c2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

nipype/pipeline/plugins/ipython.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ def __init__(self, plugin_args=None):
4949
if IPython_not_loaded:
5050
raise ImportError('ipyparallel could not be imported')
5151
super(IPythonPlugin, self).__init__(plugin_args=plugin_args)
52+
valid_args = ('url_file', 'profile', 'cluster_id', 'context', 'debug',
53+
'timeout', 'config', 'username', 'sshserver', 'sshkey',
54+
'password', 'paramiko')
55+
self.client_args = {arg: plugin_args[arg]
56+
for arg in valid_args if arg in plugin_args}
5257
self.iparallel = None
5358
self.taskclient = None
5459
self.taskmap = {}
@@ -67,7 +72,7 @@ def run(self, graph, config, updatehash=False):
6772
raise ImportError("Ipython kernel not found. Parallel execution "
6873
"will be unavailable")
6974
try:
70-
self.taskclient = self.iparallel.Client()
75+
self.taskclient = self.iparallel.Client(**self.client_args)
7176
except Exception as e:
7277
if isinstance(e, TimeoutError):
7378
raise Exception("No IPython clients found.")

0 commit comments

Comments
 (0)