Skip to content

Commit 74dc0e8

Browse files
committed
move launcher to cluster subpackage
1 parent ad5e559 commit 74dc0e8

File tree

8 files changed

+1834
-1827
lines changed

8 files changed

+1834
-1827
lines changed

docs/source/tutorial/process.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ and Windows HPC Server.
165165

166166
In general, these are configured by the :attr:`IPClusterEngines.engine_set_launcher_class`,
167167
and :attr:`IPClusterStart.controller_launcher_class` configurables, which can be the
168-
fully specified object name (e.g. ``'ipyparallel.apps.launcher.LocalControllerLauncher'``),
168+
fully specified object name (e.g. ``'ipyparallel.cluster.launcher.LocalControllerLauncher'``),
169169
but if you are using IPython's builtin launchers, you can specify a launcher by its prefix e.g:
170170

171171
.. sourcecode:: python
@@ -174,7 +174,7 @@ but if you are using IPython's builtin launchers, you can specify a launcher by
174174
# equivalent to
175175
c.IPClusterEngines.engine_launcher_class = 'SSHEngineSetLauncher'
176176
# both of which expand to
177-
c.IPClusterEngines.engine_launcher_class = 'ipyparallel.apps.launcher.SSHEngineSetLauncher'
177+
c.IPClusterEngines.engine_launcher_class = 'ipyparallel.cluster.launcher.SSHEngineSetLauncher'
178178

179179
The shortest form being of particular use on the command line, where all you need to do to
180180
get an IPython cluster running with engines started with MPI is:

ipyparallel/apps/ipclusterapp.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,12 @@ def find_launcher_class(clsname, kind):
113113
Either 'EngineSet' or 'Controller'.
114114
"""
115115
if '.' not in clsname:
116-
# not a module, presume it's the raw name in apps.launcher
116+
# not a module, presume it's the raw name in cluster.launcher
117117
if kind and kind not in clsname:
118118
# doesn't match necessary full class name, assume it's
119119
# just 'PBS' or 'MPI' etc prefix:
120120
clsname = clsname + kind + 'Launcher'
121-
clsname = 'ipyparallel.apps.launcher.' + clsname
121+
clsname = 'ipyparallel.cluster.launcher.' + clsname
122122
klass = import_item(clsname)
123123
return klass
124124

@@ -251,10 +251,9 @@ class IPClusterEngines(BaseParallelApplication):
251251
classes = List()
252252

253253
def _classes_default(self):
254-
from ipyparallel.apps import launcher
254+
from ipyparallel.cluster.launcher import all_launchers
255255

256-
launchers = launcher.all_launchers
257-
eslaunchers = [l for l in launchers if 'EngineSet' in l.__name__]
256+
eslaunchers = [l for l in all_launchers if 'EngineSet' in l.__name__]
258257
return [ProfileDir] + eslaunchers
259258

260259
n = Integer(
@@ -488,9 +487,9 @@ class IPClusterStart(IPClusterEngines):
488487
def _classes_default(
489488
self,
490489
):
491-
from ipyparallel.apps import launcher
490+
from ipyparallel.cluster.launcher import all_launchers
492491

493-
return [ProfileDir] + [IPClusterEngines] + launcher.all_launchers
492+
return [ProfileDir] + [IPClusterEngines] + all_launchers
494493

495494
clean_logs = Bool(
496495
True, config=True, help="whether to cleanup old logs before starting"
@@ -506,7 +505,7 @@ def _classes_default(
506505
controller_location = Unicode(
507506
config=True,
508507
help="""Set the location (hostname or ip) of the controller.
509-
508+
510509
This is used by engines and clients to locate the controller
511510
when the controller listens on all interfaces
512511
""",

0 commit comments

Comments
 (0)