Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults vararg kwarg body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad Str Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body If CompareIs Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list FunctionDef arguments args defaults vararg body Expr Str ImportFrom alias Assign NameStore Call NameLoad For NameStore NameLoad body If CompareIn NameLoad NameLoad body Continue TryExcept body Exec BinOpMod Str NameLoad NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args defaults vararg body Expr Str Assign NameStore ListLoad For NameStore NameLoad body If Call NameLoad NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse Raise Call NameLoad BinOpMod Str Call NameLoad NameLoad Return Call NameLoad NameLoad NameLoad decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults ListLoad NameLoad NameLoad NameLoad body If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str ListLoad Assign NameStore ListLoad If Call NameLoad NameLoad TupleLoad NameLoad NameLoad body Assign NameStore ListLoad NameLoad For NameStore NameLoad body If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Raise Call NameLoad BinOpMod Str Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad If UnaryOpNot BoolOpOr NameLoad NameLoad body Raise Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareEq Call NameLoad NameLoad Num body Return NameLoad Assign NameStore Call NameLoad If AttributeLoad NameLoad attr body Assign NameStore NameLoad If BoolOpAnd CompareIsNot NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr NameLoad orelse Return UnaryOpNot Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareEq Call NameLoad NameLoad Num body Return NameLoad Assign NameStore Call NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Assign NameStore NameLoad If BoolOpAnd CompareIsNot NameLoad NameLoad UnaryOpNot AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Return UnaryOpNot Call AttributeLoad NameLoad attr NameLoad orelse Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad keyword Call NameLoad NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list decorator_list Assign NameStore ListLoad Str Str Str Str
N/A N/A Dependency utilities

Authors:

* Min RK
 types ModuleType IPython.parallel.client.asyncresult AsyncResult IPython.parallel.error UnmetDependency IPython.parallel.util interactive depend N/A object N/A N/A Dependency decorator, for use with tasks.
    
    `@depend` lets you define a function for engine dependencies
    just like you use `apply` for tasks.
    
    
    Examples
    --------
    ::
    
        @depend(df, a,b, c=5)
        def f(m,n,p)
        
        view.apply(f, 1,2,3)
    
    will call df(a,b,c=5) on the engine, and if it returns False or
    raises an UnmetDependency error, then the task will not be run
    and another engine will be tried.
     __init__ N/A N/A self f N/A args kwargs N/A N/A N/A self f f N/A N/A self args args N/A N/A self kwargs kwargs N/A __call__ N/A N/A self f N/A N/A N/A N/A dependent f N/A self f N/A self args N/A self kwargs N/A N/A dependent N/A object N/A N/A A function that depends on another function.
    This is an object to prevent the closure used
    in traditional decorators, which are not picklable.
     __init__ N/A N/A self f df N/A dargs dkwargs N/A N/A N/A self f f N/A N/A self __name__ N/A getattr f __name__ f N/A N/A self df df N/A N/A self dargs dargs N/A N/A self dkwargs dkwargs N/A __call__ N/A N/A self N/A args kwargs N/A N/A N/A N/A N/A self df N/A self dargs N/A self dkwargs False N/A N/A N/A UnmetDependency N/A N/A N/A self f args kwargs N/A N/A _require N/A N/A N/A names N/A N/A Helper for @require decorator. IPython.parallel.error UnmetDependency N/A user_ns N/A globals N/A name names N/A N/A N/A name user_ns N/A N/A N/A N/A N/A N/A import %s name user_ns N/A N/A N/A ImportError N/A N/A N/A UnmetDependency name N/A True N/A interactive require N/A N/A N/A mods N/A N/A Simple decorator for requiring names to be importable.
    
    Examples
    --------
    
    In [1]: @require('numpy')
       ...: def norm(a):
       ...:     import numpy
       ...:     return numpy.linalg.norm(a,2)
     N/A names N/A N/A mod mods N/A N/A N/A isinstance mod ModuleType N/A N/A mod N/A mod __name__ N/A N/A isinstance mod str N/A N/A N/A N/A names append mod N/A N/A N/A TypeError N/A names must be modules or module names, not %s N/A type mod N/A N/A depend _require names N/A Dependency N/A set N/A N/A An object for representing a set of msg_id dependencies.
    
    Subclassed from set().
    
    Parameters
    ----------
    dependencies: list/set of msg_ids or AsyncResult objects or output of Dependency.as_dict()
        The msg_ids to depend on
    all : bool [default True]
        Whether the dependency should be considered met when *all* depending tasks have completed
        or only when *any* have been completed.
    success : bool [default True]
        Whether to consider successes as fulfilling dependencies.
    failure : bool [default False]
        Whether to consider failures as fulfilling dependencies.
    
    If `all=success=True` and `failure=False`, then the task will fail with an ImpossibleDependency
        as soon as the first depended-upon task fails.
     N/A all True N/A success True N/A failure True __init__ N/A N/A self dependencies all success failure N/A N/A True True False N/A N/A N/A isinstance dependencies dict N/A N/A all N/A N/A dependencies get all True N/A success N/A N/A dependencies get success success N/A failure N/A N/A dependencies get failure failure N/A dependencies N/A N/A dependencies get dependencies N/A N/A ids N/A N/A N/A isinstance dependencies N/A str AsyncResult N/A N/A dependencies N/A dependencies N/A d dependencies N/A N/A N/A isinstance d str N/A N/A N/A N/A ids append d N/A N/A N/A isinstance d AsyncResult N/A N/A N/A N/A ids extend N/A d msg_ids N/A N/A N/A TypeError N/A invalid dependency type: %r N/A type d N/A N/A N/A set __init__ self ids N/A N/A self all all N/A N/A N/A success failure N/A N/A N/A ValueError Must depend on at least one of successes or failures! N/A N/A self success success N/A N/A self failure failure N/A check N/A N/A self completed failed N/A None N/A N/A check whether our dependencies have been met. N/A N/A N/A len self 0 N/A N/A True N/A against N/A set N/A N/A self success N/A N/A against completed N/A N/A N/A failed None N/A self failure N/A N/A against N/A N/A against union failed N/A N/A self all N/A N/A N/A N/A self issubset against N/A N/A N/A N/A N/A self isdisjoint against N/A unreachable N/A N/A self completed failed N/A None N/A N/A return whether this dependency has become impossible. N/A N/A N/A len self 0 N/A N/A False N/A against N/A set N/A N/A N/A self success N/A N/A against completed N/A N/A N/A failed None N/A N/A self failure N/A N/A against N/A N/A against union failed N/A N/A self all N/A N/A N/A N/A N/A self isdisjoint against N/A N/A N/A N/A self issubset against N/A as_dict N/A N/A self N/A N/A N/A Represent this dependency as a dict. For json compatibility. N/A N/A dict dependencies N/A list self all N/A self all success N/A self success failure N/A self failure N/A N/A N/A __all__ N/A depend require dependent Dependency