Commits

Lynn Rees committed 73d895e

- tweaks

Comments (0)

Files changed (8)

graphalchemy/apps.py

 # -*- coding: utf-8 -*-
-'''appconf'''
+'''graphalchemy appconf'''
 
 from spine import Pathways
 from appspace import Branch, Namespace
 
     class include(Branch):
         backends = 'graphalchemy.backends.apps'
-        managers = 'graphalchemy.managers.apps'
+        direct = 'graphalchemy.direct.apps'
         models = 'graphalchemy.models.apps'
 
     class session(Namespace):

graphalchemy/graphs.py

 from graphalchemy.core import octopus, extend
 
 __all__ = ['Graph']
-
 # settings
 conf = octopus.G
 

graphalchemy/mixins/collectors.py

 __all__ = ('LinksMixin', 'NodesMixin')
 
 
-class _CollectorsMixin(octopus.context.thing):
+class _CollectorsMixin(octopus.context.Thing):
 
     '''element collections collector'''
 

graphalchemy/mixins/workers.py

 
 import nanotime
 
-from graphalchemy.core import octopus, defer
+from graphalchemy.core import defer
 
 __all__ = ('WriterMixin', 'ReaderMixin')
 
         return self.r.properties(element)
 
 
-class WriterMixin(octopus.event.Worker):
+class WriterMixin(object):
 
     '''graph writer base'''
 

graphalchemy/models/workers.py

 db = conf.key.db
 
 
-class Nodes(WriterMixin, octopus.workflow.worker):
+class Nodes(WriterMixin, octopus.workflow.Worker):
 
     '''graph node worker'''
 

graphalchemy/models/writers.py

 db = conf.key.db
 
 
-class Nodes(WriterMixin, octopus.workflow.worker):
+class Nodes(WriterMixin, octopus.workflow.Worker):
 
     '''graph node writer'''
 

graphalchemy/settings.py

 
     class manager:
         graph = 'manager.graph'
-        link = 'manager.manager.link'
-        node = 'manager.manager.node'
+
+    class direct:
 
         class collection:
-            link = 'manager.collection.link'
-            node = 'manager.collection.node'
+            link = 'direct.collection.link'
+            node = 'direct.collection.node'
 
         class collector:
-            link = 'manager.collector.link'
-            node = 'manager.collector.node'
+            link = 'direct.collector.link'
+            node = 'direct.collector.node'
 
         class element:
-            link = 'manager.element.link'
-            node = 'manager.element.node'
-
-        class reader:
-            link = 'manager.reader.link'
-            node = 'manager.reader.node'
+            link = 'direct.element.link'
+            node = 'direct.element.node'
 
         class writer:
-            link = 'manager.writer.link'
-            node = 'manager.writer.node'
+            link = 'direct.worker.link'
+            node = 'direct.worker.node'
 
     class model:
 
             link = 'model.writer.link'
             node = 'model.writer.node'
 
+        class worker:
+            link = 'direct.worker.link'
+            node = 'direct.worker.node'
+
     class backends:
 
         class neo4jem:

graphalchemy/tests/test_db.py

         except OSError:
             pass
     graph.pipe('anyway', cleanup)
-    with graph.session as session:
-        gn = session.nodes.direct
+    with graph.session as Session:
+        gn = Session.nodes.direct
         gn.index('roots')
         gn.index('questions')
         gn.index('question_text', fts=True)
         gn.index('cons')
         gn.index('con_text', fts=True)
         gn.index('tags')
-        root = session.nodes.root()
+        root = Session.nodes.root()
         question = gn.create(text='question reference node')
         question.index_under('roots', 'reference', 'question')
         question.link('QUESTION_REFERENCE_FOR', root)