Commits

Lynn Rees  committed f4fddbb

- cleanup

  • Participants
  • Parent commits 79088d0
  • Branches pu

Comments (0)

Files changed (24)

File callchain/key/queue.py

-# -*- coding: utf-8 -*-
-'''callchain queue keys'''
-
-from appspace.keys import Attribute, AppspaceKey
-
-
-class KThings(AppspaceKey):
-
-    '''queuing key'''
-
-    incoming = Attribute('incoming queue')
-    outgoing = Attribute('outgoing queue')
-    balanced = Attribute('if incoming and outgoing things are balanced')
-
-    def __len__():  # @NoSelf
-        '''number of incoming things'''
-
-    def outcount():  # @NoSelf
-        '''number of outgoing things'''
-
-    ###########################################################################
-    ## queue clearance ########################################################
-    ###########################################################################
-
-    def clear():  # @NoSelf
-        '''clear every thing'''
-
-    def inclear():  # @NoSelf
-        '''clear incoming things'''
-
-    def outclear():  # @NoSelf
-        '''clear outgoing things'''
-
-    ###########################################################################
-    ## context rotation #######################################################
-    ###########################################################################
-
-    def ctx1(**kw):  # @NoSelf
-        '''swap to one-armed context'''
-
-    def ctx2(**kw):  # @NoSelf
-        '''swap to two-armed context'''
-
-    def ctx3(**kw):  # @NoSelf
-        '''swap to three-armed context'''
-
-    def ctx4(**kw):  # @NoSelf
-        '''swap to four-armed context'''
-
-    def autoctx(**kw):  # @NoSelf
-        '''swap to auto-synchronizing context'''
-
-    def ro():  # @NoSelf
-        '''swap to read-only context'''
-
-    def swap(**kw):  # @NoSelf
-        '''swap contexts'''
-
-    def reswap(self):  # @NoSelfs
-        '''swap to current preferred context'''
-
-    def unswap():  # @NoSelf
-        '''swap to default context'''
-
-    def rw():  # @NoSelf
-        '''swap to default context'''
-
-    ###########################################################################
-    ## current callable management ############################################
-    ###########################################################################
-
-    def args(*args, **kw):  # @NoSelf
-        '''arguments for current callable'''
-
-    def detap():  # @NoSelf
-        '''clear current callable'''
-
-    def wrap(call):  # @NoSelf
-        '''
-        build current callable from factory
-
-        @param call: a callable
-        '''
-
-    def unwrap():  # @NoSelf
-        '''clear factory'''
-
-    ###########################################################################
-    ## things rotation ########################################################
-    ###########################################################################
-
-    def outshift():  # @NoSelf
-        '''shift incoming things to outgoing things'''
-
-    def outsync():  # @NoSelf
-        '''
-        shift incoming things to outgoing things, clearing outgoing things
-        '''
-
-    def reup():  # @NoSelf
-        '''put incoming things in incoming things as one incoming thing'''
-
-    def shift():  # @NoSelf
-        '''shift outgoing things to incoming things'''
-
-    def sync():  # @NoSelf
-        '''
-        shift outgoing things to incoming things, clearing incoming things
-        '''
-
-    ###########################################################################
-    ## things appending #######################################################
-    ###########################################################################
-
-    def append(thing):  # @NoSelf
-        '''
-        append `thing` to right side of incoming things
-
-        @param thing: some thing
-        '''
-
-    def appendleft(thing):  # @NoSelf
-        '''
-        append `thing` to left side of incoming things
-
-        @param thing: some thing
-        '''
-
-    ###########################################################################
-    ## things extension #######################################################
-    ###########################################################################
-
-    def extend(things):  # @NoSelf
-        '''
-        extend right side of incoming things with `things`
-
-        @param thing: some things
-        '''
-
-    def extendleft(things):  # @NoSelf
-        '''
-        extend left side of incoming things with `things`
-
-        @param thing: some things
-        '''
-
-    def outextend(things):  # @NoSelf
-        '''
-        extend right side of outgoing things with `things`
-
-        @param thing: some things
-        '''
-
-    ###########################################################################
-    ## iteration runners ######################################################
-    ###########################################################################
-
-    def __iter__():  # @NoSelf
-        '''yield outgoing things, clearing outgoing things as it iterates'''
-
-    def breakcount(call, length, exception=StopIteration):  # @NoSelf
-        '''
-        rotate through iterator until it reaches its original length
-
-        @param iterable: an iterable to exhaust
-        '''
-
-
-class KResult(KThings):
-
-    def end():  # @NoSelf
-        '''return outgoing things then clear out everything'''
-
-    def peek():  # @NoSelf
-        '''results from read-only context'''
-
-    def results():  # @NoSelf
-        '''yield outgoing things, clearing outgoing things as it iterates'''
-
-    def value():  # @NoSelf
-        '''return outgoing things and clear outgoing things'''

File callchain/linked/active.py

+# -*- coding: utf-8 -*-
+'''active auto-balancing linked chains'''
+
+from appspace import key
+from knife.active import OutMixin
+from callchain.linked.keys import KLinked, KEventLinked
+from callchain.linked.core import EventLinked, PriorityLinked, ChainLinked
+
+
+@key(KLinked)
+class chainlink(ChainLinked, OutMixin):
+
+    '''linked chain'''
+
+
+@key(KLinked)
+class prioritylink(PriorityLinked, OutMixin):
+
+    '''priority linked chain'''
+
+
+@key(KEventLinked)
+class eventlink(EventLinked, OutMixin):
+
+    '''lite linked event chain'''

File callchain/linked/activeauto.py

-# -*- coding: utf-8 -*-
-'''active auto-balancing linked chains'''
-
-from appspace import key
-from knife.active import OutMixin
-from callchain.linked.keys import KLinked, KEventLinked
-from callchain.linked.core import EventLinked, PriorityLinked, ChainLinked
-
-
-@key(KLinked)
-class chainlink(ChainLinked, OutMixin):
-
-    '''linked chain'''
-
-
-@key(KLinked)
-class prioritylink(PriorityLinked, OutMixin):
-
-    '''priority linked chain'''
-
-
-@key(KEventLinked)
-class eventlink(EventLinked, OutMixin):
-
-    '''lite linked event chain'''

File callchain/linked/keys.py

 '''callchain contrib keys'''
 
 from callchain.key.base import KConfig
-from callchain.key.queue import KResult
 from callchain.key.mixin import KCall, KChain, KBranch, KEventCall, KEvent
 
 
-class KLinked(KBranch, KConfig, KCall, KChain, KResult):
+class KLinked(KBranch, KConfig, KCall, KChain):
 
     '''linked chain with results key'''
 
         '''close out linked chain and switch to root chain'''
 
 
-class KEventLinked(KBranch, KConfig, KEventCall, KEvent, KResult):
+class KEventLinked(KBranch, KConfig, KEventCall, KEvent):
 
     '''linked event chain with results key'''

File callchain/linked/lazy.py

+# -*- coding: utf-8 -*-
+'''lazy auto-balancing linked chains'''
+
+from appspace import key
+from knife.active import OutMixin
+from callchain.linked.keys import KLinked, KEventLinked
+from callchain.linked.core import EventLinked, PriorityLinked, ChainLinked
+
+
+@key(KLinked)
+class chainlink(ChainLinked, OutMixin):
+
+    '''linked chain'''
+
+
+@key(KLinked)
+class prioritylink(PriorityLinked, OutMixin):
+
+    '''priority linked chain'''
+
+
+@key(KEventLinked)
+class eventlink(EventLinked, OutMixin):
+
+    '''lite linked event chain'''

File callchain/linked/lazyauto.py

-# -*- coding: utf-8 -*-
-'''lazy auto-balancing linked chains'''
-
-from appspace import key
-from knife.active import OutMixin
-from callchain.linked.keys import KLinked, KEventLinked
-from callchain.linked.core import EventLinked, PriorityLinked, ChainLinked
-
-
-@key(KLinked)
-class chainlink(ChainLinked, OutMixin):
-
-    '''linked chain'''
-
-
-@key(KLinked)
-class prioritylink(PriorityLinked, OutMixin):
-
-    '''priority linked chain'''
-
-
-@key(KEventLinked)
-class eventlink(EventLinked, OutMixin):
-
-    '''lite linked event chain'''

File callchain/queue/active/__init__.py

+# -*- coding: utf-8 -*-
+'''active auto-balancing chains'''

File callchain/queue/active/chainlet.py

+# -*- coding: utf-8 -*-
+'''active auto-balancing chainlets'''
+
+from appspace import key
+from knife.active import OutMixin
+from knife.mixins import (
+    ReduceMixin, OrderMixin, RepeatMixin, MapMixin, MathMixin, FilterMixin,
+    CmpMixin, SliceMixin)
+
+from callchain.queue import keys
+from callchain.chainlet.base import Chainlet
+
+
+class chainlet(Chainlet, OutMixin):
+
+    '''chainlet'''
+
+
+@key(keys.KRepeat)
+class repeatlet(Chainlet, OutMixin, CmpMixin):
+
+    '''comparing chainlet'''
+
+
+@key(keys.KRepeat)
+class cmplet(Chainlet, OutMixin, RepeatMixin):
+
+    '''repeat chainlet'''
+
+
+@key(keys.KMap)
+class maplet(Chainlet, OutMixin, MapMixin):
+
+    '''mapping chainlet'''
+
+
+@key(keys.KSlice)
+class slicelet(Chainlet, OutMixin, SliceMixin):
+
+    '''slicing chainlet'''
+
+
+@key(keys.KFilter)
+class filterlet(Chainlet, OutMixin, FilterMixin):
+
+    '''filtering chainlet'''
+
+
+@key(keys.KOrder)
+class orderlet(Chainlet, OutMixin, OrderMixin):
+
+    '''ordering chainlet'''
+
+
+@key(keys.KMath)
+class mathlet(Chainlet, OutMixin, MathMixin):
+
+    '''mathing chainlet'''
+
+
+@key(keys.KReduce)
+class reducelet(Chainlet, OutMixin, ReduceMixin):
+
+    '''reducing chainlet'''

File callchain/queue/active/eventlet.py

+# -*- coding: utf-8 -*-
+'''active auto-balancing eventlets'''
+
+from appspace import key
+from knife.active import OutMixin
+from knife.mixins import (
+    RepeatMixin, MapMixin, CmpMixin, SliceMixin, FilterMixin, OrderMixin,
+    MathMixin, ReduceMixin)
+
+from callchain.queue import keys
+from callchain.chainlet.base import Eventlet
+
+
+class eventlet(Eventlet, OutMixin):
+
+    '''eventlet'''
+
+
+@key(keys.KDelay)
+class delaylet(Eventlet, OutMixin, CmpMixin):
+
+    '''delayed mapping eventlet'''
+
+
+@key(keys.KRepeat)
+class repeatlet(Eventlet, OutMixin, RepeatMixin):
+
+    '''repeat eventlet'''
+
+
+@key(keys.KMap)
+class maplet(Eventlet, OutMixin, MapMixin):
+
+    '''mapping eventlet'''
+
+
+@key(keys.KSlice)
+class slicelet(Eventlet, OutMixin, SliceMixin):
+
+    '''slicing eventlet'''
+
+
+@key(keys.KFilter)
+class filterlet(Eventlet, OutMixin, FilterMixin):
+
+    '''filtering eventlet'''
+
+
+@key(keys.KOrder)
+class orderlet(Eventlet, OutMixin, OrderMixin):
+
+    '''ordering eventlet'''
+
+
+@key(keys.KMath)
+class mathlet(Eventlet, OutMixin, MathMixin):
+
+    '''mathing eventlet'''
+
+
+@key(keys.KReduce)
+class reducelet(Eventlet, OutMixin, ReduceMixin):
+
+    '''reducing eventlet'''

File callchain/queue/activeauto/__init__.py

-# -*- coding: utf-8 -*-
-'''active auto-balancing chains'''

File callchain/queue/activeauto/chainlet.py

-# -*- coding: utf-8 -*-
-'''active auto-balancing chainlets'''
-
-from appspace import key
-from knife.active import OutMixin
-from knife.mixins import (
-    ReduceMixin, OrderMixin, RepeatMixin, MapMixin, MathMixin, FilterMixin,
-    CmpMixin, SliceMixin)
-
-from callchain.queue import keys
-from callchain.chainlet.base import Chainlet
-
-
-class chainlet(Chainlet, OutMixin):
-
-    '''chainlet'''
-
-
-@key(keys.KRepeat)
-class repeatlet(Chainlet, OutMixin, CmpMixin):
-
-    '''comparing chainlet'''
-
-
-@key(keys.KRepeat)
-class cmplet(Chainlet, OutMixin, RepeatMixin):
-
-    '''repeat chainlet'''
-
-
-@key(keys.KMap)
-class maplet(Chainlet, OutMixin, MapMixin):
-
-    '''mapping chainlet'''
-
-
-@key(keys.KSlice)
-class slicelet(Chainlet, OutMixin, SliceMixin):
-
-    '''slicing chainlet'''
-
-
-@key(keys.KFilter)
-class filterlet(Chainlet, OutMixin, FilterMixin):
-
-    '''filtering chainlet'''
-
-
-@key(keys.KOrder)
-class orderlet(Chainlet, OutMixin, OrderMixin):
-
-    '''ordering chainlet'''
-
-
-@key(keys.KMath)
-class mathlet(Chainlet, OutMixin, MathMixin):
-
-    '''mathing chainlet'''
-
-
-@key(keys.KReduce)
-class reducelet(Chainlet, OutMixin, ReduceMixin):
-
-    '''reducing chainlet'''

File callchain/queue/activeauto/eventlet.py

-# -*- coding: utf-8 -*-
-'''active auto-balancing eventlets'''
-
-from appspace import key
-from knife.active import OutMixin
-from knife.mixins import (
-    RepeatMixin, MapMixin, CmpMixin, SliceMixin, FilterMixin, OrderMixin,
-    MathMixin, ReduceMixin)
-
-from callchain.queue import keys
-from callchain.chainlet.base import Eventlet
-
-
-class eventlet(Eventlet, OutMixin):
-
-    '''eventlet'''
-
-
-@key(keys.KDelay)
-class delaylet(Eventlet, OutMixin, CmpMixin):
-
-    '''delayed mapping eventlet'''
-
-
-@key(keys.KRepeat)
-class repeatlet(Eventlet, OutMixin, RepeatMixin):
-
-    '''repeat eventlet'''
-
-
-@key(keys.KMap)
-class maplet(Eventlet, OutMixin, MapMixin):
-
-    '''mapping eventlet'''
-
-
-@key(keys.KSlice)
-class slicelet(Eventlet, OutMixin, SliceMixin):
-
-    '''slicing eventlet'''
-
-
-@key(keys.KFilter)
-class filterlet(Eventlet, OutMixin, FilterMixin):
-
-    '''filtering eventlet'''
-
-
-@key(keys.KOrder)
-class orderlet(Eventlet, OutMixin, OrderMixin):
-
-    '''ordering eventlet'''
-
-
-@key(keys.KMath)
-class mathlet(Eventlet, OutMixin, MathMixin):
-
-    '''mathing eventlet'''
-
-
-@key(keys.KReduce)
-class reducelet(Eventlet, OutMixin, ReduceMixin):
-
-    '''reducing eventlet'''

File callchain/queue/keys.py

-# -*- coding: utf-8 -*-
-'''queuing chainlet keys'''
-
-from callchain.chainlet.keys import KChainlet
-
-
-class KMath(KChainlet):
-
-    '''math key'''
-
-    def average():  # @NoSelf
-        '''average of all incoming things'''
-
-    def fsum():  # @NoSelf
-        '''add incoming things together'''
-
-    def max():  # @NoSelf
-        '''
-        find maximum thing in incoming things, optionally using current
-        call as key function
-        '''
-
-    def median():  # @NoSelf
-        '''median of all incoming things'''
-
-    def min():  # @NoSelf
-        '''find minimum thing in incoming things using call as key function'''
-
-    def minmax():  # @NoSelf
-        '''minimum and maximum things among all incoming things'''
-
-    def mode():  # @NoSelf
-        '''mode of all incoming things'''
-
-    def statrange():  # @NoSelf
-        '''statistical range of all incoming things'''
-
-    def sum(start=0):  # @NoSelf
-        '''
-        add all incoming things together
-
-        @param start: starting number (default: 0)
-        '''
-
-
-class KTruth(KChainlet):
-
-    '''truth key'''
-
-    def all():  # @NoSelf
-        '''if `all` incoming things are `True`'''
-
-    def any():  # @NoSelf
-        '''if `any` incoming things are `True`'''
-
-    def contains(thing):  # @NoSelf
-        '''
-        if `thing` is in incoming things
-
-        @param thing: some thing
-        '''
-
-    def uncommon():  # @NoSelf
-        '''least common incoming thing'''
-
-    def frequency():  # @NoSelf
-        '''frequency of each incoming thing'''
-
-    def quantify():  # @NoSelf
-        '''how many times call is `True` for incoming things'''
-
-
-class KReduce(KChainlet):
-
-    '''reduce key'''
-
-    def merge():  # @NoSelf
-        '''flatten nested but ordered incoming things'''
-
-    def flatten():  # @NoSelf
-        '''flatten deeply nested incoming things'''
-
-    def pairwise():  # @NoSelf
-        '''every two incoming things as a tuple'''
-
-    def reduce(initial=None):  # @NoSelf
-        '''
-        reduce incoming things to one thing using call (from left side of
-        incoming things)
-
-        @param initial: initial thing (default: None)
-        '''
-
-    def reduce_right(initial=None):  # @NoSelf
-        '''
-        reduce incoming things to one thing from right side of incoming things
-        using call
-
-        @param initial: initial thing (default: None)
-        '''
-
-    def roundrobin():  # @NoSelf
-        '''interleave incoming things into one thing'''
-
-    def zip():  # @NoSelf
-        '''
-        smash incoming things into one single thing, pairing things by iterable
-        position
-        '''
-
-
-class KRandom(KChainlet):
-
-    '''random key'''
-
-    def choice():  # @NoSelf
-        '''random choice of/from incoming things'''
-
-    def sample(n):  # @NoSelf
-        '''
-        random sampling drawn from `n` incoming things
-
-        @param n: number of incoming things
-        '''
-
-    def shuffle():  # @NoSelf
-        '''randomly order incoming things'''
-
-
-class KOrder(KChainlet):
-
-    '''ordering key'''
-
-    def group():  # @NoSelf
-        '''
-        group incoming things, optionally using current call for key function
-        '''
-
-    def grouper(n, fill=None):  # @NoSelf
-        '''
-        split incoming things into sequences of length `n`, using `fill` thing
-        to pad incomplete sequences
-
-        @param n: number of things
-        @param fill: fill thing (default: None)
-        '''
-
-    def reverse():  # @NoSelf
-        '''reverse order of incoming things'''
-
-    def sort():  # @NoSelf
-        '''
-        sort incoming things, optionally using current call as key function
-        '''
-
-    def product(n=1):  # @NoSelf
-        '''
-        nested for each loops repeated `n` times
-
-        @param n: number of repetitions (default: 1)
-        '''
-
-
-class KDelay(KChainlet):
-
-    '''delayed map key'''
-
-    def delay_each(wait):  # @NoSelf
-        '''
-        invoke call with passed arguments, keywords in incoming things after
-        delay `wait`
-
-        @param wait: time in seconds
-        '''
-
-    def delay_invoke(name, wait):  # @NoSelf
-        '''
-        invoke method `name` on each incoming thing with passed arguments,
-        keywords after delay `wait` but return incoming thing instead if method
-        returns `None`
-
-        @param name: name of method
-        @param wait: time in seconds
-        '''
-
-    def delay_map(wait):  # @NoSelf
-        '''
-        invoke call on each incoming thing after delay `wait`
-
-        @param wait: time in seconds
-        '''
-
-
-class KRepeat(KChainlet):
-
-    '''repetition key'''
-
-    def copy():  # @NoSelf
-        '''copy each incoming thing'''
-
-    def range(start, stop=0, step=1):  # @NoSelf
-        '''
-        put sequence of numbers in incoming things
-
-        @param start: number to start with
-        @param stop: number to stop with (default: 0)
-        @param step: number of steps to advance per iteration (default: 1)
-        '''
-
-    def repeat(n):  # @NoSelf
-        '''
-        repeat incoming things `n` times
-
-        @param n: number of times to repeat
-        '''
-
-    def times(n=None):  # @NoSelf
-        '''
-        repeat call with incoming things `n` times
-
-        @param n: repeat call n times on incoming things (default: None)
-        '''
-
-
-class KMap(KChainlet):
-
-    '''mapping key'''
-
-    def map():  # @NoSelf
-        '''invoke call on each incoming thing'''
-
-    def invoke(name):  # @NoSelf
-        '''
-        invoke method `name` on each incoming thing with passed arguments,
-        keywords but return incoming thing instead if method returns `None`
-
-        @param name: name of method
-        '''
-
-    def each():  # @NoSelf
-        '''invoke call with passed arguments, keywords in incoming things'''
-
-    def starmap():  # @NoSelf
-        '''invoke call on each sequence of incoming things'''
-
-    def items():  # @NoSelf
-        '''invoke call on each mapping to get key, value pairs'''
-
-
-class KCollect(KChainlet):
-
-    '''collection key'''
-
-    def deepmembers():  # @NoSelf
-        '''collect object members from incoming things and their bases'''
-
-    def members():  # @NoSelf
-        '''collect object members from incoming things'''
-
-    def pick(*names):  # @NoSelf
-        '''collect object attributes from incoming things by their `*names`'''
-
-    def pluck(*keys):  # @NoSelf
-        '''collect object items from incoming things by item `*keys`'''
-
-
-class KSet(KChainlet):
-
-    '''set uniqueness key'''
-
-    def difference():  # @NoSelf
-        '''difference between incoming things'''
-
-    def symmetric_difference():  # @NoSelf
-        '''symmetric difference between incoming things'''
-
-    def disjointed():  # @NoSelf
-        '''disjoint between incoming things'''
-
-    def intersection():  # @NoSelf
-        '''intersection between incoming things'''
-
-    def subset():  # @NoSelf
-        '''incoming things that are subsets of incoming things'''
-
-    def superset():  # @NoSelf
-        '''incoming things that are supersets of incoming things'''
-
-    def union():  # @NoSelf
-        '''union between incoming things'''
-
-    def unique():  # @NoSelf
-        '''
-        list unique incoming things, preserving order and remember all incoming
-        things ever seen
-        '''
-
-
-class KSlice(KChainlet):
-
-    '''slicing key'''
-
-    def first():  # @NoSelf
-        '''first incoming thing'''
-
-    def last():  # @NoSelf
-        '''last incoming thing'''
-
-    def nth(n, default=None):  # @NoSelf
-        '''
-        `nth` incoming thing or default thing
-
-        @param n: number of things
-        @param default: default thing (default: None)
-        '''
-
-    def initial():  # @NoSelf
-        '''all incoming things except the last thing'''
-
-    def rest():  # @NoSelf
-        '''all incoming things except the first thing'''
-
-    def snatch(n):  # @NoSelf
-        '''
-        last `n` things of incoming things
-
-        @param n: number of things
-        '''
-
-    def take(n):  # @NoSelfs
-        '''
-        first `n` things of incoming things
-
-        @param n: number of things
-        '''
-
-
-class KFilter(KChainlet):
-
-    '''filter key'''
-
-    def compact():  # @NoSelf
-        '''strip "untrue" things from incoming things'''
-
-    def filter():  # @NoSelf
-        '''incoming things for which call is `True`'''
-
-    def find():  # @NoSelf
-        '''first incoming thing for which call is `True`'''
-
-    def partition():  # @NoSelf
-        '''
-        split incoming things into `True` and `False` things based on results
-        of call
-        '''
-
-    def reject():  # @NoSelf
-        '''incoming things for which call is `False`'''
-
-    def without(*things):  # @NoSelf
-        '''strip things from incoming things'''

File callchain/queue/lazy/__init__.py

+# -*- coding: utf-8 -*-
+'''lazy auto-balancing chains'''

File callchain/queue/lazy/chainlet.py

+# -*- coding: utf-8 -*-
+'''lazy auto-balanced chainlets'''
+
+from appspace import key
+from knife.lazy import OutMixin
+
+from callchain.queue import keys
+from callchain.chainlet.base import Chainlet
+from knife.mixins import (
+    RepeatMixin, MapMixin, CmpMixin, SliceMixin, FilterMixin, OrderMixin,
+    MathMixin, ReduceMixin)
+
+
+class chainlet(Chainlet, OutMixin):
+
+    '''chainlet'''
+
+
+@key(keys.KRepeat)
+class repeatlet(Chainlet, OutMixin, RepeatMixin):
+
+    '''repeat chainlet'''
+
+
+@key(keys.KMap)
+class maplet(Chainlet, OutMixin, MapMixin):
+
+    '''mapping chainlet'''
+
+
+@key(keys.KCollect)
+class cmplet(Chainlet, OutMixin, CmpMixin):
+
+    '''collecting chainlet'''
+
+
+@key(keys.KSlice)
+class slicelet(Chainlet, OutMixin, SliceMixin):
+
+    '''slicing chainlet'''
+
+
+@key(keys.KFilter)
+class filterlet(Chainlet, OutMixin, FilterMixin):
+
+    '''filtering chainlet'''
+
+
+@key(keys.KOrder)
+class orderlet(Chainlet, OutMixin, OrderMixin):
+
+    '''ordering chainlet'''
+
+
+@key(keys.KMath)
+class mathlet(Chainlet, OutMixin, MathMixin):
+
+    '''mathing chainlet'''
+
+
+@key(keys.KReduce)
+class reducelet(Chainlet, OutMixin, ReduceMixin):
+
+    '''reducing chainlet'''

File callchain/queue/lazy/eventlet.py

+# -*- coding: utf-8 -*-
+'''lazy auto-balancing eventlets'''
+
+from appspace import key
+from knife.lazy import OutMixin
+from knife.mixins import (
+    RepeatMixin, MapMixin, CmpMixin, SliceMixin, FilterMixin, OrderMixin,
+    MathMixin, ReduceMixin)
+
+from callchain.queue import keys
+from callchain.chainlet.base import Eventlet
+
+
+class eventlet(Eventlet, OutMixin):
+
+    '''eventlet'''
+
+
+@key(keys.KDelay)
+class cmplet(Eventlet, OutMixin, CmpMixin):
+
+    '''delayed mapping eventlet'''
+
+
+@key(keys.KRepeat)
+class repeatlet(Eventlet, OutMixin, RepeatMixin):
+
+    '''repeat eventlet'''
+
+
+@key(keys.KMap)
+class maplet(Eventlet, OutMixin, MapMixin):
+
+    '''mapping eventlet'''
+
+
+@key(keys.KSlice)
+class slicelet(Eventlet, OutMixin, SliceMixin):
+
+    '''slicing eventlet'''
+
+
+@key(keys.KFilter)
+class filterlet(Eventlet, OutMixin, FilterMixin):
+
+    '''filtering eventlet'''
+
+
+@key(keys.KOrder)
+class orderlet(Eventlet, OutMixin, OrderMixin):
+
+    '''ordering eventlet'''
+
+
+@key(keys.KMath)
+class mathlet(Eventlet, OutMixin, MathMixin):
+
+    '''mathing eventlet'''
+
+
+@key(keys.KReduce)
+class reducelet(Eventlet, OutMixin, ReduceMixin):
+
+    '''reducing eventlet'''

File callchain/queue/lazyauto/__init__.py

-# -*- coding: utf-8 -*-
-'''lazy auto-balancing chains'''

File callchain/queue/lazyauto/chainlet.py

-# -*- coding: utf-8 -*-
-'''lazy auto-balanced chainlets'''
-
-from appspace import key
-from knife.lazy import OutMixin
-
-from callchain.queue import keys
-from callchain.chainlet.base import Chainlet
-from knife.mixins import (
-    RepeatMixin, MapMixin, CmpMixin, SliceMixin, FilterMixin, OrderMixin,
-    MathMixin, ReduceMixin)
-
-
-class chainlet(Chainlet, OutMixin):
-
-    '''chainlet'''
-
-
-@key(keys.KRepeat)
-class repeatlet(Chainlet, OutMixin, RepeatMixin):
-
-    '''repeat chainlet'''
-
-
-@key(keys.KMap)
-class maplet(Chainlet, OutMixin, MapMixin):
-
-    '''mapping chainlet'''
-
-
-@key(keys.KCollect)
-class cmplet(Chainlet, OutMixin, CmpMixin):
-
-    '''collecting chainlet'''
-
-
-@key(keys.KSlice)
-class slicelet(Chainlet, OutMixin, SliceMixin):
-
-    '''slicing chainlet'''
-
-
-@key(keys.KFilter)
-class filterlet(Chainlet, OutMixin, FilterMixin):
-
-    '''filtering chainlet'''
-
-
-@key(keys.KOrder)
-class orderlet(Chainlet, OutMixin, OrderMixin):
-
-    '''ordering chainlet'''
-
-
-@key(keys.KMath)
-class mathlet(Chainlet, OutMixin, MathMixin):
-
-    '''mathing chainlet'''
-
-
-@key(keys.KReduce)
-class reducelet(Chainlet, OutMixin, ReduceMixin):
-
-    '''reducing chainlet'''

File callchain/queue/lazyauto/eventlet.py

-# -*- coding: utf-8 -*-
-'''lazy auto-balancing eventlets'''
-
-from appspace import key
-from knife.lazy import OutMixin
-from knife.mixins import (
-    RepeatMixin, MapMixin, CmpMixin, SliceMixin, FilterMixin, OrderMixin,
-    MathMixin, ReduceMixin)
-
-from callchain.queue import keys
-from callchain.chainlet.base import Eventlet
-
-
-class eventlet(Eventlet, OutMixin):
-
-    '''eventlet'''
-
-
-@key(keys.KDelay)
-class cmplet(Eventlet, OutMixin, CmpMixin):
-
-    '''delayed mapping eventlet'''
-
-
-@key(keys.KRepeat)
-class repeatlet(Eventlet, OutMixin, RepeatMixin):
-
-    '''repeat eventlet'''
-
-
-@key(keys.KMap)
-class maplet(Eventlet, OutMixin, MapMixin):
-
-    '''mapping eventlet'''
-
-
-@key(keys.KSlice)
-class slicelet(Eventlet, OutMixin, SliceMixin):
-
-    '''slicing eventlet'''
-
-
-@key(keys.KFilter)
-class filterlet(Eventlet, OutMixin, FilterMixin):
-
-    '''filtering eventlet'''
-
-
-@key(keys.KOrder)
-class orderlet(Eventlet, OutMixin, OrderMixin):
-
-    '''ordering eventlet'''
-
-
-@key(keys.KMath)
-class mathlet(Eventlet, OutMixin, MathMixin):
-
-    '''mathing eventlet'''
-
-
-@key(keys.KReduce)
-class reducelet(Eventlet, OutMixin, ReduceMixin):
-
-    '''reducing eventlet'''

File callchain/root/active.py

+# -*- coding: utf-8 -*-
+'''active auto-balancing root chains'''
+
+from appspace import key
+from knife.active import OutMixin
+
+from callchain.route import Chains, Events
+from callchain.mixin import ChainMixin, PriorityMixin, EventMixin
+
+from callchain.root.settings import Defaults
+from callchain.root.keys import KRoot, KEventRoot
+from callchain.root.core import RootMixin, EventRootMixin
+from callchain.root.apps import thingchain, thingevent, chain, events
+
+thingchain = Chains(thingchain).defaults(Defaults)
+thingevent = Events(thingevent).events(events).defaults(Defaults)
+
+
+@key(KRoot)
+@thingchain
+class callchain(RootMixin, ChainMixin, OutMixin):
+
+    '''active queued auto-balancing lite call chain'''
+
+
+@key(KRoot)
+@thingchain
+class prioritychain(RootMixin, PriorityMixin, OutMixin):
+
+    '''active priority queued auto-balancing lite call chain'''
+
+
+@key(KEventRoot)
+@thingevent
+class eventchain(EventRootMixin, EventMixin, OutMixin):
+
+    '''active queued auto-balancing lite event chain'''
+
+
+class chainqueue(chain):
+    prefix = 'callchain.chainlet.activeauto.chainlet'
+
+
+class eventqueue(chain):
+    prefix = 'callchain.chainlet.activeauto.eventlet'
+    chain = 'callchain.chainlet.activeauto.chainlet.chainlink'
+
+
+chain = Chains(chainqueue).defaults(Defaults)
+event = Events(eventqueue).events(events).defaults(Defaults)
+
+
+@key(KRoot)
+@chain
+class chainq(RootMixin, ChainMixin, OutMixin):
+
+    '''active queued auto-balancing call chain'''
+
+
+@key(KRoot)
+@chain
+class priorityq(RootMixin, PriorityMixin, OutMixin):
+
+    '''active priority queued auto-balancing lite call chain'''
+
+
+@key(KEventRoot)
+@event
+class eventq(EventRootMixin, EventMixin, OutMixin):
+
+    '''active priority queued auto-balancing lite call chain'''

File callchain/root/activeauto.py

-# -*- coding: utf-8 -*-
-'''active auto-balancing root chains'''
-
-from appspace import key
-from knife.active import OutMixin
-
-from callchain.route import Chains, Events
-from callchain.mixin import ChainMixin, PriorityMixin, EventMixin
-
-from callchain.root.settings import Defaults
-from callchain.root.keys import KRoot, KEventRoot
-from callchain.root.core import RootMixin, EventRootMixin
-from callchain.root.apps import thingchain, thingevent, chain, events
-
-thingchain = Chains(thingchain).defaults(Defaults)
-thingevent = Events(thingevent).events(events).defaults(Defaults)
-
-
-@key(KRoot)
-@thingchain
-class callchain(RootMixin, ChainMixin, OutMixin):
-
-    '''active queued auto-balancing lite call chain'''
-
-
-@key(KRoot)
-@thingchain
-class prioritychain(RootMixin, PriorityMixin, OutMixin):
-
-    '''active priority queued auto-balancing lite call chain'''
-
-
-@key(KEventRoot)
-@thingevent
-class eventchain(EventRootMixin, EventMixin, OutMixin):
-
-    '''active queued auto-balancing lite event chain'''
-
-
-class chainqueue(chain):
-    prefix = 'callchain.chainlet.activeauto.chainlet'
-
-
-class eventqueue(chain):
-    prefix = 'callchain.chainlet.activeauto.eventlet'
-    chain = 'callchain.chainlet.activeauto.chainlet.chainlink'
-
-
-chain = Chains(chainqueue).defaults(Defaults)
-event = Events(eventqueue).events(events).defaults(Defaults)
-
-
-@key(KRoot)
-@chain
-class chainq(RootMixin, ChainMixin, OutMixin):
-
-    '''active queued auto-balancing call chain'''
-
-
-@key(KRoot)
-@chain
-class priorityq(RootMixin, PriorityMixin, OutMixin):
-
-    '''active priority queued auto-balancing lite call chain'''
-
-
-@key(KEventRoot)
-@event
-class eventq(EventRootMixin, EventMixin, OutMixin):
-
-    '''active priority queued auto-balancing lite call chain'''

File callchain/root/keys.py

 '''callchain contrib keys'''
 
 from callchain.key.base import KConfig
-from callchain.key.queue import KResult
 from callchain.key.mixin import KCall, KChain, KEvent, KEventCall
 
 
-class KRoot(KConfig, KChain, KCall, KResult):
+class KRoot(KConfig, KChain, KCall):
 
     '''root chain key'''
 
         '''
 
 
-class KEventRoot(KConfig, KEventCall, KEvent, KResult):
+class KEventRoot(KConfig, KEventCall, KEvent):
 
     '''root event chain key'''

File callchain/root/lazy.py

+# -*- coding: utf-8 -*-
+'''lazy auto-balancing root chains'''
+
+from appspace import key
+from knife.lazy import OutMixin
+
+from callchain.route import Chains, Events
+from callchain.mixin import ChainMixin, PriorityMixin, EventMixin
+
+from callchain.root.settings import Defaults
+from callchain.root.keys import KRoot, KEventRoot
+from callchain.root.core import RootMixin, EventRootMixin
+from callchain.root.apps import thingchain, thingevent, chain, events
+
+thingchain = Chains(thingchain).defaults(Defaults)
+thingevent = Events(thingevent).events(events).defaults(Defaults)
+
+
+@key(KRoot)
+@thingchain
+class callchain(RootMixin, ChainMixin, OutMixin):
+
+    '''lazy queued auto-balancing lite call chain'''
+
+
+@key(KRoot)
+@thingchain
+class prioritychain(RootMixin, PriorityMixin, OutMixin):
+
+    '''lazy priority queued auto-balancing lite call chain'''
+
+
+@key(KEventRoot)
+@thingevent
+class eventchain(EventRootMixin, EventMixin, OutMixin):
+
+    '''lazy queued auto-balancing lite event chain'''
+
+
+class chainqueue(chain):
+    prefix = 'callchain.chainlet.lazyauto.chainlet'
+
+
+class eventqueue(chain):
+    prefix = 'callchain.chainlet.lazyauto.eventlet'
+    chain = 'callchain.chainlet.lazyauto.chainlet.chainlink'
+
+
+chain = Chains(chainqueue).defaults(Defaults)
+event = Events(eventqueue).events(events).defaults(Defaults)
+
+
+@key(KRoot)
+@chain
+class chainq(RootMixin, ChainMixin, OutMixin):
+
+    '''lazy queued auto-balancing call chain'''
+
+
+@key(KRoot)
+@chain
+class priorityq(RootMixin, PriorityMixin, OutMixin):
+
+    '''lazy priority queued auto-balancing lite call chain'''
+
+
+@key(KEventRoot)
+@event
+class eventq(EventRootMixin, EventMixin, OutMixin):
+
+    '''lazy priority queued auto-balancing lite call chain'''

File callchain/root/lazyauto.py

-# -*- coding: utf-8 -*-
-'''lazy auto-balancing root chains'''
-
-from appspace import key
-from knife.lazy import OutMixin
-
-from callchain.route import Chains, Events
-from callchain.mixin import ChainMixin, PriorityMixin, EventMixin
-
-from callchain.root.settings import Defaults
-from callchain.root.keys import KRoot, KEventRoot
-from callchain.root.core import RootMixin, EventRootMixin
-from callchain.root.apps import thingchain, thingevent, chain, events
-
-thingchain = Chains(thingchain).defaults(Defaults)
-thingevent = Events(thingevent).events(events).defaults(Defaults)
-
-
-@key(KRoot)
-@thingchain
-class callchain(RootMixin, ChainMixin, OutMixin):
-
-    '''lazy queued auto-balancing lite call chain'''
-
-
-@key(KRoot)
-@thingchain
-class prioritychain(RootMixin, PriorityMixin, OutMixin):
-
-    '''lazy priority queued auto-balancing lite call chain'''
-
-
-@key(KEventRoot)
-@thingevent
-class eventchain(EventRootMixin, EventMixin, OutMixin):
-
-    '''lazy queued auto-balancing lite event chain'''
-
-
-class chainqueue(chain):
-    prefix = 'callchain.chainlet.lazyauto.chainlet'
-
-
-class eventqueue(chain):
-    prefix = 'callchain.chainlet.lazyauto.eventlet'
-    chain = 'callchain.chainlet.lazyauto.chainlet.chainlink'
-
-
-chain = Chains(chainqueue).defaults(Defaults)
-event = Events(eventqueue).events(events).defaults(Defaults)
-
-
-@key(KRoot)
-@chain
-class chainq(RootMixin, ChainMixin, OutMixin):
-
-    '''lazy queued auto-balancing call chain'''
-
-
-@key(KRoot)
-@chain
-class priorityq(RootMixin, PriorityMixin, OutMixin):
-
-    '''lazy priority queued auto-balancing lite call chain'''
-
-
-@key(KEventRoot)
-@event
-class eventq(EventRootMixin, EventMixin, OutMixin):
-
-    '''lazy priority queued auto-balancing lite call chain'''