##// END OF EJS Templates
Important changes to simplify traitlets....
Important changes to simplify traitlets. Some aspect of traitlets were a bit too magical for us. Thus, we have simplified certain things to make it more straitforward: * Default values are always validated, but now, this is done when the HasTraitlets.__new__ is called. We used to do this the first time __get__ was called. * The klass argument of Type and Instance traitlets must be a class. Unlike enthought.traits, we are no longer accepting class names as str or instances. * The args and kw arguments to Instance.__init__ are now handled in better manner, but that is quite different from enthought.traits. * More tests of edge cases.

File last commit:

r2073:86e3ac62
r2182:4cfda302
Show More
kernel_config.py
62 lines | 1.6 KiB | text/x-python | PythonLexer
from os.path import join
pjoin = join
from IPython.utils.genutils import get_ipython_dir, get_security_dir
security_dir = get_security_dir()
ENGINE_LOGFILE = ''
ENGINE_FURL_FILE = 'ipcontroller-engine.furl'
MPI_CONFIG_MPI4PY = """from mpi4py import MPI as mpi
mpi.size = mpi.COMM_WORLD.Get_size()
mpi.rank = mpi.COMM_WORLD.Get_rank()
"""
MPI_CONFIG_PYTRILINOS = """from PyTrilinos import Epetra
class SimpleStruct:
pass
mpi = SimpleStruct()
mpi.rank = 0
mpi.size = 0
"""
MPI_DEFAULT = ''
CONTROLLER_LOGFILE = ''
CONTROLLER_IMPORT_STATEMENT = ''
CONTROLLER_REUSE_FURLS = False
ENGINE_TUB_IP = ''
ENGINE_TUB_PORT = 0
ENGINE_TUB_LOCATION = ''
ENGINE_TUB_SECURE = True
ENGINE_TUB_CERT_FILE = 'ipcontroller-engine.pem'
ENGINE_FC_INTERFACE = 'IPython.kernel.enginefc.IFCControllerBase'
ENGINE_FURL_FILE = 'ipcontroller-engine.furl'
CONTROLLER_INTERFACES = dict(
TASK = dict(
CONTROLLER_INTERFACE = 'IPython.kernel.task.ITaskController',
FC_INTERFACE = 'IPython.kernel.taskfc.IFCTaskController',
FURL_FILE = pjoin(security_dir, 'ipcontroller-tc.furl')
),
MULTIENGINE = dict(
CONTROLLER_INTERFACE = 'IPython.kernel.multiengine.IMultiEngine',
FC_INTERFACE = 'IPython.kernel.multienginefc.IFCSynchronousMultiEngine',
FURL_FILE = pjoin(security_dir, 'ipcontroller-mec.furl')
)
)
CLIENT_TUB_IP = ''
CLIENT_TUB_PORT = 0
CLIENT_TUB_LOCATION = ''
CLIENT_TUB_SECURE = True
CLIENT_TUB_CERT_FILE = 'ipcontroller-client.pem'
CLIENT_INTERFACES = dict(
TASK = dict(FURL_FILE = 'ipcontroller-tc.furl'),
MULTIENGINE = dict(FURLFILE='ipcontroller-mec.furl')
)