Commits

Lynn Rees  committed b5c0df4

- tweak naming

  • Participants
  • Parent commits 4b3172d

Comments (0)

Files changed (6)

File graphalchemy/generics/elements.py

 defer = getattr(octopus.decorators, 'defer')
 
 
-class Generic(ElementMixin, octopus.things.manager):
+class Generic(ElementMixin, octopus.things.lifecycle):
 
     '''generic graph model'''
 

File graphalchemy/graphs.py

 factory = getattr(octopus.decorators, 'factory')
 
 
-class Session(octopus.locals.thing):
+class Session(octopus.locals.protocol):
 
     '''graph session'''
 
             self.commit()
 
 
-class Graph(octopus.globals.thing):
+class Graph(octopus.globals.protocol):
 
     '''graph interface'''
 

File graphalchemy/mixins/elements.py

 
     @classmethod
     def _n(cls):
-        '''generate node wrapper'''
+        '''node wrapper'''
         return cls._g.nodes.wrap(cls)
 
     def _refresh(self):

File graphalchemy/models/elements.py

 direct = getattr(octopus.decorators, 'direct')
 
 
-class Node(NodeMixin, ElementMixin, octopus.things.thing):
+class Node(NodeMixin, ElementMixin, octopus.things.protocol):
 
     '''node model'''
 

File graphalchemy/tests/test_models.py

     graph.register(Pro)
     graph.register(Con)
     graph.register(Idea)
-    graph.on('abort', cleanup)
+    graph.pipe('anyway', cleanup)
     with graph.session as Session:
+        Session.join(Question, Idea, Pro, Con, Tag)
         Session.nodes.w.create_index('roots')
         question = Question.referrer(user=1)
         Session.add(question)

File graphalchemy/writers.py

         if model is None:
             model = self._finder(model)
         C = model.C
-        data.update(
-            _created=self.now(), _model=C.name, _uuid=self.Q.uuid())
+        data.update(_created=self.now(), _model=C.name, _uuid=self.Q.uuid())
         # number of versions to maintain
         if C.versioned:
             data['_versions'] = 0