Lynn Rees avatar Lynn Rees committed 72fe0b4

- commit point

Comments (0)

Files changed (5)

callchain/active_auto/chain.py

 from appspace import appifies
 from twoq.active import AutoResultMixin
 
-from callchain.chain import RootMixin
+from callchain.route import Chains
+from callchain.root import RootMixin
 from callchain.config import Defaults
-from callchain.patterns import Chains
+from callchain.mixins import ChainMixin, PriorityMixin
 from callchain.keys.core import KRootResults, KRootThings
-from callchain.call import ChainMixin, PriorityMixin, internal
+
 
 ###############################################################################
 ## thing chain ################################################################
     logger = 'callchain.services.core.loglet'
 
 
+thingchain = thingchain()
+
+
 @appifies(KRootThings)
 @thingchain
 class callchain(RootMixin, ChainMixin, AutoResultMixin):
     slice = 'callchain.active_auto.chainlet.slicechain'
     truth = 'callchain.active_auto.chainlet.truthchain'
 
+chain = chain()
+
 
 @appifies(KRootResults)
 @chain

callchain/active_auto/chainlet.py

 from twoq.ordering import RandomMixin, OrderMixin, CombineMixin
 from twoq.filtering import FilterMixin, CollectMixin, SetMixin, SliceMixin
 
-from callchain.keys.core import KResult
-from callchain.call import ChainMixin, PriorityMixin
+from callchain.keys.core import KLinked
 from callchain.keys.map import KDelay, KRepeat, KMap
+from callchain.mixins import ChainMixin, PriorityMixin
 from callchain.keys.reduce import KMath, KReduce, KTruth
-from callchain.chain import (
+from callchain.keys.order import KRandom, KOrder, KCombine
+from callchain.branch import (
     BranchMixin, BranchletMixin, ChainletMixin, LinkedMixin)
-from callchain.keys.order import KRandom, KOrder, KCombine
-from callchain.keys.base import KCall, KChain, KConfig, KLinked
 from callchain.keys.filter import KCollect, KSet, KSlice, KFilter
 
 
     '''truthing chainlet'''
 
 
-@appifies(KLinked, KConfig, KCall, KChain, KResult)
+@appifies(KLinked)
 class chainlink(BranchMixin, LinkedMixin, ChainMixin, AutoResultMixin):
 
     '''linked chain'''
 
 
-@appifies(KLinked, KConfig, KCall, KChain, KResult)
+@appifies(KLinked)
 class prioritylink(BranchMixin, LinkedMixin, PriorityMixin, AutoResultMixin):
 
     '''priority linked chain'''

callchain/active_auto/event.py

 
 from callchain.config import Defaults
 from callchain.keys.apps import events
-from callchain.chain import EventRootMixin
-from callchain.call import EventMixin, internal_events
+from callchain.root import EventRootMixin
+from callchain.mixins import EventMixin
 from callchain.keys.core import KThings, KResult
-from callchain.patterns import Chains
+from callchain.route import Chains
 from callchain.keys.base import KEvent, KEventRoot, KEventCall
 
 ###############################################################################

callchain/route.py

 #        self.pattern = pattern
 #        self.required = required
 #        self.defaults = defaults
-#
-#    def __call__(self, that):
-#        # internal appspace manager
-#        that._M = Chains.appspace(
-#            self.pattern,
-#            self.required,
-#            self.defaults,
-#        )
-#        # lock internal appspace global settings
-#        that._M.settings.lock()
-#        # set internal appspace global settings
-#        that._G = that._M.settings.final
-#        return that
+
+    def __call__(self, that):
+        # internal appspace manager
+        that._M = Chains.appspace(
+            self.pattern,
+            self.required,
+            self.defaults,
+        )
+        # lock internal appspace global settings
+        that._M.settings.lock()
+        # set internal appspace global settings
+        that._G = that._M.settings.final
+        return that
     
     def register(self, thing):
         '''
 
 class EventManager(Manager):
     
-    __slots__ = ('pattern', 'required', 'defaults', 'args', 'kw', 'events')
+    __slots__ = ('pattern', 'required', 'defaults', 'events')
 
     def __init__(self, patterns, events=None, required=None, defaults=None):
         '''
     
     '''event manager'''
 
+
 class Paths(Patterns):
 
     '''chain configuration patterns'''
 callchain
-callchain.services
+callchain.keys
+callchain.chainlets
 callchain.lazy_auto
 callchain.lazy_man
 callchain.active_man
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.