[Checkins] SVN: Sandbox/adamg/ocql/branches/optimize-with-index/src/ocql/ code cleanups for coverage

Adam Groszer agroszer at gmail.com
Wed Jul 16 12:01:32 EDT 2008


Log message for revision 88412:
  code cleanups for coverage

Changed:
  U   Sandbox/adamg/ocql/branches/optimize-with-index/src/ocql/rewriter/rewriter.py
  U   Sandbox/adamg/ocql/branches/optimize-with-index/src/ocql/testing/database.py
  U   Sandbox/adamg/ocql/branches/optimize-with-index/src/ocql/testing/sample/interfaces.py
  U   Sandbox/adamg/ocql/branches/optimize-with-index/src/ocql/testing/sample/project.py
  U   Sandbox/adamg/ocql/branches/optimize-with-index/src/ocql/testing/utils.py

-=-
Modified: Sandbox/adamg/ocql/branches/optimize-with-index/src/ocql/rewriter/rewriter.py
===================================================================
--- Sandbox/adamg/ocql/branches/optimize-with-index/src/ocql/rewriter/rewriter.py	2008-07-16 15:56:57 UTC (rev 88411)
+++ Sandbox/adamg/ocql/branches/optimize-with-index/src/ocql/rewriter/rewriter.py	2008-07-16 16:01:32 UTC (rev 88412)
@@ -30,5 +30,4 @@
         query = self.context
         alg = query.rewrite(target_algebra)
         head = Head(alg)
-        return head
-    
\ No newline at end of file
+        return head
\ No newline at end of file

Modified: Sandbox/adamg/ocql/branches/optimize-with-index/src/ocql/testing/database.py
===================================================================
--- Sandbox/adamg/ocql/branches/optimize-with-index/src/ocql/testing/database.py	2008-07-16 15:56:57 UTC (rev 88411)
+++ Sandbox/adamg/ocql/branches/optimize-with-index/src/ocql/testing/database.py	2008-07-16 16:01:32 UTC (rev 88412)
@@ -130,9 +130,4 @@
         return x
 
     def get_class(self, name):
-        return self.classes[name]
-
-    #def get_collection_type(self, name):
-    #    klass = self.get_class(name)
-    #    rv = klass.get_collection_type()
-    #    return rv
\ No newline at end of file
+        return self.classes[name]
\ No newline at end of file

Modified: Sandbox/adamg/ocql/branches/optimize-with-index/src/ocql/testing/sample/interfaces.py
===================================================================
--- Sandbox/adamg/ocql/branches/optimize-with-index/src/ocql/testing/sample/interfaces.py	2008-07-16 15:56:57 UTC (rev 88411)
+++ Sandbox/adamg/ocql/branches/optimize-with-index/src/ocql/testing/sample/interfaces.py	2008-07-16 16:01:32 UTC (rev 88412)
@@ -54,13 +54,13 @@
     containers(".IGsoc")
 
 
+#class IProjectRelation(Interface):
+#    mentor = Attribute('assigned mentor for the project')
+#    project = Attribute('mentoring project')
+#
+#
+
 class IOrganizationContainer(IContainer):
     """Organization is also a container for projects, students and mentors"""
 
-    contains(".IProject", ".IStudent", ".IMentor")
-    
-#class IProjectRelation(Interface):
-#    mentor = Attribute('assigned mentor for the project')
-#    project = Attribute('mentoring project')
-#    
-#    
\ No newline at end of file
+    contains(".IProject", ".IStudent", ".IMentor")
\ No newline at end of file

Modified: Sandbox/adamg/ocql/branches/optimize-with-index/src/ocql/testing/sample/project.py
===================================================================
--- Sandbox/adamg/ocql/branches/optimize-with-index/src/ocql/testing/sample/project.py	2008-07-16 15:56:57 UTC (rev 88411)
+++ Sandbox/adamg/ocql/branches/optimize-with-index/src/ocql/testing/sample/project.py	2008-07-16 16:01:32 UTC (rev 88412)
@@ -5,6 +5,13 @@
 
 from ocql.testing.sample.interfaces import IProject
 
+#class ProjectRelation(object):
+#    implements(IProjectRelation)
+#
+#    def __init__(self, mentor, project):
+#        self.mentor = mentor
+#        self.project = project
+
 class Project(persistent.Persistent):
     """A simple implementation of a Project .
 
@@ -31,12 +38,4 @@
     name = u''
 
     def __repr__(self):
-        return "%s <%s>" % (self.__class__.__name__, self.name)
-
-
-#class ProjectRelation(object):
-#    implements(IProjectRelation)
-#    
-#    def __init__(self, mentor, project):
-#        self.mentor = mentor
-#        self.project = project
+        return "%s <%s>" % (self.__class__.__name__, self.name)
\ No newline at end of file

Modified: Sandbox/adamg/ocql/branches/optimize-with-index/src/ocql/testing/utils.py
===================================================================
--- Sandbox/adamg/ocql/branches/optimize-with-index/src/ocql/testing/utils.py	2008-07-16 15:56:57 UTC (rev 88411)
+++ Sandbox/adamg/ocql/branches/optimize-with-index/src/ocql/testing/utils.py	2008-07-16 16:01:32 UTC (rev 88412)
@@ -28,7 +28,7 @@
 from ocql.testing.sample.project import Project
 from ocql.testing.sample.student import Student
 from ocql.testing.sample.organization import Organization
-        
+
 import zc.relation.catalog
 import zc.relation.interfaces
 import zc.relation.queryfactory
@@ -113,7 +113,7 @@
     o1.name = u"Zope.org"
     id = intids.register(o1)
     cat.index_doc(id, o1)
-    
+
 #    cat2 = zc.relation.catalog.Catalog(dumpRelation, loadRelation)
 #    cat2.addValueIndex(IProjectRelation['project'], dumpObj, loadObj, btree=BTrees.family32.OO)
 #    cat2.addValueIndex(IProjectRelation['mentor'], dumpObj, loadObj, btree=BTrees.family32.OO)
@@ -140,12 +140,4 @@
 
     for r in results:
         obj = intids.getObject(r)
-        print obj
-        
-#    rel_mentor = cat.apply({'all_mentors':(1,1)})
-#    
-#    for r in rel_mentor:
-#        obj = intids.getObject(r)     
-#        for p in cat2.findValueTokens('project',query(mentor=obj)):
-#            print p.name
-#    
\ No newline at end of file
+        print obj
\ No newline at end of file



More information about the Checkins mailing list