Skip to content

Commit b9f5480

Browse files
committed
organize IPython.parallel into subpackages
1 parent e950e62 commit b9f5480

59 files changed

Lines changed: 261 additions & 625 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

IPython/config/default/ipcluster_config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@
2323
# - PBSControllerLauncher
2424
# - SGEControllerLauncher
2525
# - WindowsHPCControllerLauncher
26-
# c.Global.controller_launcher = 'IPython.parallel.launcher.LocalControllerLauncher'
27-
# c.Global.controller_launcher = 'IPython.parallel.launcher.PBSControllerLauncher'
26+
# c.Global.controller_launcher = 'IPython.parallel.apps.launcher.LocalControllerLauncher'
27+
# c.Global.controller_launcher = 'IPython.parallel.apps.launcher.PBSControllerLauncher'
2828

2929
# Options are:
3030
# - LocalEngineSetLauncher
3131
# - MPIExecEngineSetLauncher
3232
# - PBSEngineSetLauncher
3333
# - SGEEngineSetLauncher
3434
# - WindowsHPCEngineSetLauncher
35-
# c.Global.engine_launcher = 'IPython.parallel.launcher.LocalEngineSetLauncher'
35+
# c.Global.engine_launcher = 'IPython.parallel.apps.launcher.LocalEngineSetLauncher'
3636

3737
#-----------------------------------------------------------------------------
3838
# Global configuration

IPython/config/default/ipcontroller_config.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
# Which class to use for the db backend. Currently supported are DictDB (the
9090
# default), and MongoDB. Uncomment this line to enable MongoDB, which will
9191
# slow-down the Hub's responsiveness, but also reduce its memory footprint.
92-
# c.HubFactory.db_class = 'IPython.parallel.mongodb.MongoDB'
92+
# c.HubFactory.db_class = 'IPython.parallel.controller.mongodb.MongoDB'
9393

9494
# The heartbeat ping frequency. This is the frequency (in ms) at which the
9595
# Hub pings engines for heartbeats. This determines how quickly the Hub
@@ -144,11 +144,11 @@
144144

145145
# ----- in-memory configuration --------
146146
# this line restores the default behavior: in-memory storage of all results.
147-
# c.HubFactory.db_class = 'IPython.parallel.dictdb.DictDB'
147+
# c.HubFactory.db_class = 'IPython.parallel.controller.dictdb.DictDB'
148148

149149
# ----- sqlite configuration --------
150150
# use this line to activate sqlite:
151-
# c.HubFactory.db_class = 'IPython.parallel.sqlitedb.SQLiteDB'
151+
# c.HubFactory.db_class = 'IPython.parallel.controller.sqlitedb.SQLiteDB'
152152

153153
# You can specify the name of the db-file. By default, this will be located
154154
# in the active cluster_dir, e.g. ~/.ipython/clusterz_default/tasks.db
@@ -165,7 +165,7 @@
165165

166166
# ----- mongodb configuration --------
167167
# use this line to activate mongodb:
168-
# c.HubFactory.db_class = 'IPython.parallel.mongodb.MongoDB'
168+
# c.HubFactory.db_class = 'IPython.parallel.controller.mongodb.MongoDB'
169169

170170
# You can specify the args and kwargs pymongo will use when creating the Connection.
171171
# For more information on what these options might be, see pymongo documentation.

IPython/external/ssh/tunnel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
except ImportError:
3535
pexpect = None
3636

37-
from IPython.parallel.entry_point import select_random_ports
37+
from IPython.parallel.util import select_random_ports
3838

3939
#-----------------------------------------------------------------------------
4040
# Code

IPython/parallel/__init__.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@
1212

1313
import zmq
1414

15-
if zmq.__version__ < '2.1.3':
16-
raise ImportError("IPython.parallel requires pyzmq/0MQ >= 2.1.3, you appear to have %s"%zmq.__version__)
15+
if zmq.__version__ < '2.1.4':
16+
raise ImportError("IPython.parallel requires pyzmq/0MQ >= 2.1.4, you appear to have %s"%zmq.__version__)
1717

18-
from .asyncresult import *
19-
from .client import Client
20-
from .dependency import *
21-
from .remotefunction import *
22-
from .view import *
2318
from IPython.utils.pickleutil import Reference
2419

20+
from .client.asyncresult import *
21+
from .client.client import Client
22+
from .client.remotefunction import *
23+
from .client.view import *
24+
from .controller.dependency import *
25+
2526

IPython/parallel/apps/__init__.py

Whitespace-only changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
from IPython.external.argparse import ArgumentParser, SUPPRESS
2828
from IPython.utils.importstring import import_item
29-
from IPython.parallel.clusterdir import (
29+
from .clusterdir import (
3030
ApplicationWithClusterDir, ClusterDirConfigLoader,
3131
ClusterDirError, PIDFileError
3232
)
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,17 @@
3030
from zmq.utils import jsonapi as json
3131

3232
from IPython.config.loader import Config
33+
3334
from IPython.parallel import factory
34-
from IPython.parallel.controller import ControllerFactory
35-
from IPython.parallel.clusterdir import (
35+
from .clusterdir import (
3636
ApplicationWithClusterDir,
3737
ClusterDirConfigLoader
3838
)
3939
from IPython.parallel.util import disambiguate_ip_address, split_url
4040
# from IPython.kernel.fcutil import FCServiceFactory, FURLError
4141
from IPython.utils.traitlets import Instance, Unicode
4242

43+
from IPython.parallel.controller.controller import ControllerFactory
4344

4445

4546
#-----------------------------------------------------------------------------
@@ -117,11 +118,11 @@ def _add_arguments(self):
117118
## Hub Config:
118119
paa('--mongodb',
119120
dest='HubFactory.db_class', action='store_const',
120-
const='IPython.parallel.mongodb.MongoDB',
121+
const='IPython.parallel.controller.mongodb.MongoDB',
121122
help='Use MongoDB for task storage [default: in-memory]')
122123
paa('--sqlite',
123124
dest='HubFactory.db_class', action='store_const',
124-
const='IPython.parallel.sqlitedb.SQLiteDB',
125+
const='IPython.parallel.controller.sqlitedb.SQLiteDB',
125126
help='Use SQLite3 for DB task storage [default: in-memory]')
126127
paa('--hb',
127128
type=int, dest='HubFactory.hb', nargs=2,
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,17 @@
2222
import zmq
2323
from zmq.eventloop import ioloop
2424

25-
from IPython.parallel.clusterdir import (
25+
from .clusterdir import (
2626
ApplicationWithClusterDir,
2727
ClusterDirConfigLoader
2828
)
2929
from IPython.zmq.log import EnginePUBHandler
3030

3131
from IPython.parallel import factory
32-
from IPython.parallel.engine import EngineFactory
33-
from IPython.parallel.streamkernel import Kernel
32+
from IPython.parallel.engine.engine import EngineFactory
33+
from IPython.parallel.engine.streamkernel import Kernel
3434
from IPython.parallel.util import disambiguate_url
35+
3536
from IPython.utils.importstring import import_item
3637

3738

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
import zmq
2222

23-
from IPython.parallel.clusterdir import (
23+
from .clusterdir import (
2424
ApplicationWithClusterDir,
2525
ClusterDirConfigLoader
2626
)

0 commit comments

Comments
 (0)