gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject cvs commit: gump/python/gump/guru stats.py
Date Fri, 25 Jun 2004 23:08:53 GMT
ajack       2004/06/25 16:08:53

  Modified:    python/gump/model Tag: CleanUp project.py depend.py
                        module.py workspace.py profile.py propagation.py
                        object.py
               python/gump/performance Tag: CleanUp xdocs.py
               python/gump/utils Tag: CleanUp domutils.py
               python/gump/notify Tag: CleanUp notification.py
               python/gump/core Tag: CleanUp gumprun.py
               python/gump/shared Tag: CleanUp comparator.py
               python/gump/document/xdocs Tag: CleanUp xdoc.py
                        documenter.py
               python/gump/guru Tag: CleanUp stats.py
  Added:       python/gump/performance Tag: CleanUp gurus.py
  Log:
  Watch, Snip Snip, Watch, Snip Snip...
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.85.2.12 +10 -18    gump/python/gump/model/project.py
  
  Index: project.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/project.py,v
  retrieving revision 1.85.2.11
  retrieving revision 1.85.2.12
  diff -u -r1.85.2.11 -r1.85.2.12
  --- project.py	25 Jun 2004 16:40:37 -0000	1.85.2.11
  +++ project.py	25 Jun 2004 23:08:52 -0000	1.85.2.12
  @@ -217,27 +217,14 @@
       def getLastModified(self):
           return self.getModule().getStats().getLastModified()  
           
  -    def determineAffected(self):
  -        if self.affectedProjects: return len(self.affectedProjects)
  -        self.gatherAffected()        
  +    def countAffectedProjects(self):
           return len(self.affectedProjects)
           
  -    def determineAffectedProjects(self):
  -        if self.affectedProjects: return self.affectedProjects
  -        self.gatherAffected()        
  +    def getAffectedProjects(self):
           return self.affectedProjects
           
  -    def gatherAffected(self):
  -        # Look through all dependees
  -        for project in self.getFullDependeeProjectList():
  -            # Something caused that some grief
  -            # The something was this project
  -            cause=project.getCause()
  -            if cause and cause == self:
  -                if not project in self.affectedProjects:
  -                    self.affectedProjects.append(project)
  -    
  -        # Sort whatever we got
  +    def addAffected(self,project):
  +        self.affectedProjects.append(project)
           self.affectedProjects.sort()
           
       def propagateErrorStateChange(self,state,reason,cause,message):
  @@ -278,6 +265,8 @@
           
       # provide elements when not defined in xml
       def complete(self,workspace): 
  +        log.info('Complete ' + `self`)
  +        
           if self.isComplete(): return
   
           if not self.inModule():
  @@ -460,7 +449,9 @@
               # Complete dependencies so properties can reference the,
               # completed metadata within a dependent project
               for dependency in self.getDirectDependencies():
  -                dependency.getProject().complete(workspace)
  +                depProject=dependency.getProject()
  +                if not depProject.isComplete():
  +                    depProject.complete(workspace)
   
               self.buildDependenciesMap(workspace)                        
           
  @@ -510,6 +501,7 @@
           
           # Done, don't redo
           self.setComplete(True)
  +        log.info('Complete ' + `self`)
   
       def importDependencies(self,workspace):        
           badDepends=[]
  
  
  
  1.27.2.5  +39 -36    gump/python/gump/model/depend.py
  
  Index: depend.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/depend.py,v
  retrieving revision 1.27.2.4
  retrieving revision 1.27.2.5
  diff -u -r1.27.2.4 -r1.27.2.5
  --- depend.py	14 Jun 2004 21:31:46 -0000	1.27.2.4
  +++ depend.py	25 Jun 2004 23:08:52 -0000	1.27.2.5
  @@ -105,6 +105,9 @@
           
           self.owner=None
           self.project=None
  +        
  +    def __hash__(self):
  +        return hash(self.owner) + hash(self.project)
       
       # :TODO: if same ids, but different order/spacing, it ought match..
       def __eq__(self,other):
  @@ -318,24 +321,26 @@
       def getFullDependencies(self):
           if self.fullDependencies: return self.fullDependencies.getDepends()
           
  -        #
           # Build (once) upon demand
  -        #
  -        self.fullDependencies=DependSet()
  -        for depend in self.directDependencies.getDepends():
  -            if not self.fullDependencies.containsDepend(depend):
  +        self.fullDependencies=DependSet()       
  +        self.resolveDependencies(self.getDirectDependencies())
  +        
  +        return self.fullDependencies.getDepends()
  +        
  +    def resolveDependencies(self,dependList):
                   
  -                dependProject=depend.getProject()
  -                if not self.fullDependencies.containsProject(dependProject):
  -                    # Get Sub Dependencies
  -                    for subdepend in dependProject.getFullDependencies():
  -                        if not self.fullDependencies.containsDepend(subdepend):   
  -                            self.fullDependencies.addDepend(subdepend)
  -                                            
  +        for depend in dependList:
  +            # Have we travelled here before?
  +            dependProject=depend.getProject()
  +            if not self.fullDependencies.containsProject(dependProject):
  +                    
  +                # Add it now, so we don't cover this again
                   self.fullDependencies.addDepend(depend)
  -            
  -        return self.fullDependencies.getDepends()
                   
  +                self.resolveDependencies(dependProject.getDirectDependencies())
  +            else:
  +                self.fullDependencies.addDepend(depend)    
  +                                            
       def getDependencyCount(self):
           return self.directDependencies.getUniqueProjectDependCount()
           
  @@ -347,7 +352,6 @@
           self.getFullDependencies()
           return self.fullDependencies.getUniqueProjectDependList()        
           
  -
       #
       # Depth
       #
  @@ -361,7 +365,6 @@
           self.depth=maxDepth
           return self.depth
        
  -     
       #
       # Total Depth
       #
  @@ -406,25 +409,25 @@
       def getFullDependees(self):
           if self.fullDependees: return self.fullDependees.getDepends()
           
  -        #
           # Build (once) upon demand
  -        #
  -        self.fullDependees=DependSet(1)
  +        self.fullDependees=DependSet(True)
  +        self.resolveDependees(self.getDirectDependees())             
  +        return self.fullDependees.getDepends()
           
  -        for depend in self.directDependees.getDepends():
  -            if not self.fullDependees.containsDepend(depend):  
  +    def resolveDependees(self,dependList):
                   
  -                dependProject=depend.getOwnerProject()
  -                if not self.fullDependees.containsProject(dependProject):
  -                    # Get Sub Dependees
  -                    for subdepend in dependProject.getFullDependees():
  -                        if not self.fullDependees.containsDepend(subdepend):    
  -                            self.fullDependees.addDepend(subdepend)
  -                                              
  +        for depend in dependList:
  +            # Have we travelled here before?
  +            dependProject=depend.getOwnerProject()
  +            if not self.fullDependees.containsProject(dependProject):
  +                    
  +                # Add it now, so we don't cover this again
                   self.fullDependees.addDepend(depend)
  -            
  -        return self.fullDependees.getDepends()
  -        
  +                
  +                self.resolveDependees(dependProject.getDirectDependees())
  +            else:
  +                self.fullDependees.addDepend(depend)   
  +                
       def getDependeeCount(self):
           return self.directDependees.getUniqueProjectDependCount()
                   
  @@ -440,7 +443,7 @@
           
           #
           # Provide backwards links  [Note: ant|maven might have added some
  -        # dependencies, so this is done here * not just with the direct
  +        # dependencies, so this is done here & not just with the direct
           # xml depend/option elements]
           #
           for dependency in self.getDirectDependencies():
  @@ -460,23 +463,23 @@
       def hasDirectDependencyOn(self,project):
           """ Does this project exist as a dependency """    
           for dependency in self.getDirectDependencies():
  -            if dependency.getProject()==project: return 1
  +            if dependency.getProject()==project: return True
       
       # determine if this project is a prereq of any project on the todo sequence
       def hasDependencyOn(self,project):
           """ Does this project exist as any dependency """        
           for dependency in self.getFullDependencies():
  -            if dependency.getProject()==project: return 1
  +            if dependency.getProject()==project: return True
       
       def hasDirectDependee(self,project):
           """ Does this project exist as a direct dependee """    
           for dependee in self.getDirectDependees():
  -            if dependee.getOwnerProject()==project: return 1
  +            if dependee.getOwnerProject()==project: return True
               
       def hasDependee(self,project):
           """ Does this project exist as any dependee """
           for dependee in self.getFullDependees():
  -            if dependee.getOwnerProject()==project: return 1
  +            if dependee.getOwnerProject()==project: return True
                           
       def dump(self, indent=0, output=sys.stdout):
           self.directDependencies.dump(indent+1,output)
  
  
  
  1.45.2.8  +5 -19     gump/python/gump/model/module.py
  
  Index: module.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/module.py,v
  retrieving revision 1.45.2.7
  retrieving revision 1.45.2.8
  diff -u -r1.45.2.7 -r1.45.2.8
  --- module.py	24 Jun 2004 20:15:55 -0000	1.45.2.7
  +++ module.py	25 Jun 2004 23:08:52 -0000	1.45.2.8
  @@ -198,6 +198,8 @@
           
       def resolve(self):
           
  +        log.info('Resolve ' + `self`)
  +        
           owner=self.getOwner()
           
           for pdom in self.getDomChildIterator('project'):
  @@ -221,10 +223,13 @@
                   else:
                       project=Project(name,pdom,self)
                       self.addProject(project)
  +        log.info('Resolved ' + `self`)
                   
       # provide default elements when not defined in xml
       def complete(self,workspace):
         
  +        log.info('Complete ' + `self`)
  +        
           if self.isComplete(): return
   
           # :TODO: hacky   
  @@ -517,25 +522,6 @@
           
           return summary
              
  -    def determineAffected(self):
  -        
  -        if self.affected: return self.affected
  -        
  -        # Look through all dependees
  -        for project in self.getFullDependees():
  -            cause=project.getCause()
  -            #
  -            # Something caused this some grief
  -            #
  -            if cause:
  -                #
  -                # The something was this module or one of its projects
  -                #
  -                if cause == self or cause in self.getProjects():
  -                    self.affected += 1            
  -        
  -        return self.affected    
  -          
       def getObjectForTag(self,tag,dom,name=None):
           object=None
         
  
  
  
  1.51.2.8  +10 -3     gump/python/gump/model/workspace.py
  
  Index: workspace.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/workspace.py,v
  retrieving revision 1.51.2.7
  retrieving revision 1.51.2.8
  diff -u -r1.51.2.7 -r1.51.2.8
  --- workspace.py	24 Jun 2004 20:15:55 -0000	1.51.2.7
  +++ workspace.py	25 Jun 2004 23:08:52 -0000	1.51.2.8
  @@ -217,6 +217,8 @@
       def complete(self):        
           if self.isComplete(): return
           
  +        log.info('Complete ' + `self`)
  +                
           # Set defaults...        
           self.basedir=''
           self.bannerImnage=default.bannerimage
  @@ -308,7 +310,8 @@
                   log.error('Project not in module. ' + project.getName())
               
               # Complete the project
  -            project.complete(self)   
  +            if not project.isComplete():
  +                project.complete(self)   
                                                                
           # Complete the properies
           self.completeProperties()
  @@ -326,7 +329,7 @@
           # Copy over any XML errors/warnings
           # :TODO:#1: transferAnnotations(self.xml, self)  
               
  -        self.setComplete(1)
  +        self.setComplete(True)
   
      
       def setDatedDirectories(self,date=None):
  @@ -506,6 +509,8 @@
           
       def resolve(self):
           
  +        log.info('Resolve ' + `self`)
  +        
           for pdom in self.getDomChildIterator('project'):
               if hasDomAttribute(pdom,'name'):
                   name=getDomAttributeValue(pdom,'name')
  @@ -515,7 +520,9 @@
                       project.splice(pdom)
                   else:
                       project=Project(name,pdom,self)
  -                    self.addProject(project)        
  +                    self.addProject(project)   
  +        
  +        log.info('Resolved ' + `self`)     
   
   class WorkspaceStatistics(Statistics):
       """Statistics Holder"""
  
  
  
  1.5.2.3   +2 -0      gump/python/gump/model/profile.py
  
  Index: profile.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/profile.py,v
  retrieving revision 1.5.2.2
  retrieving revision 1.5.2.3
  diff -u -r1.5.2.2 -r1.5.2.3
  --- profile.py	11 Jun 2004 17:09:50 -0000	1.5.2.2
  +++ profile.py	25 Jun 2004 23:08:52 -0000	1.5.2.3
  @@ -39,6 +39,8 @@
   
       def resolve(self):
           
  +        log.info('Resolve ' + `self`)
  +        
           owner=self.getOwner()
           
           for pdom in self.getDomChildIterator('project'):
  
  
  
  1.3.4.2   +5 -1      gump/python/gump/model/propagation.py
  
  Index: propagation.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/propagation.py,v
  retrieving revision 1.3.4.1
  retrieving revision 1.3.4.2
  diff -u -r1.3.4.1 -r1.3.4.2
  --- propagation.py	21 Jun 2004 15:53:30 -0000	1.3.4.1
  +++ propagation.py	25 Jun 2004 23:08:52 -0000	1.3.4.2
  @@ -82,7 +82,11 @@
           return self.cause
           
       def addCause(self,cause):
  -        if not self.cause: self.cause=cause
  +        if not self.cause: 
  +            self.cause=cause
  +            from gump.model.project import Project
  +            if isinstance(cause,Project):
  +                cause.addAffected(self)
           self.causes.append(cause)
           
       def getCauses(self):
  
  
  
  1.24.2.8  +8 -1      gump/python/gump/model/object.py
  
  Index: object.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/object.py,v
  retrieving revision 1.24.2.7
  retrieving revision 1.24.2.8
  diff -u -r1.24.2.7 -r1.24.2.8
  --- object.py	25 Jun 2004 16:40:37 -0000	1.24.2.7
  +++ object.py	25 Jun 2004 23:08:52 -0000	1.24.2.8
  @@ -226,6 +226,7 @@
           self.spliced=spliced
           
       def splice(self,dom): 
  +        log.info('Splice ' + `self`)
           spliceDom(self.element,dom)
           self.setSpliced(True) 
                               	
  @@ -243,11 +244,15 @@
       def __init__(self,name,dom,owner=None):
                   
       	ModelObject.__init__(self,dom,owner)
  +        
  +        
       	
       	# Named
       	self.name=name
       	if not name:
       	    raise RuntimeError, self.__class__.__name__ + ' needs a name.'
  +            
  +        self.hash=0
         
       #
       # Same if same type, and same name
  @@ -259,7 +264,9 @@
           return cmp(self.name,other.name)
           
       def __hash__(self):
  -        return hash(self.name)
  +        if self.hash: return self.hash
  +        self.hash=hash(self.name)
  +        return self.hash
           
       def __repr__(self):
           return str(self)
  
  
  
  No                   revision
  No                   revision
  1.1.2.2   +32 -14    gump/python/gump/performance/Attic/xdocs.py
  
  Index: xdocs.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/performance/Attic/xdocs.py,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- xdocs.py	20 Jun 2004 19:36:54 -0000	1.1.2.1
  +++ xdocs.py	25 Jun 2004 23:08:52 -0000	1.1.2.2
  @@ -15,12 +15,7 @@
   # limitations under the License.
   
   """    
  -    Checks that the Gump definitions are ok.
  -    
  -    The workspace is loaded into memory, rudimentary
  -    checks occur, and the output tree is documented
  -    (e.g. via forrest).
  -    
  +    Does lots of xdoc stuff (for performance tuning) 
   """
   
   import os.path
  @@ -30,10 +25,11 @@
   from gump.core.gumpinit import gumpinit
   from gump.test import getWorkedTestRun
   from gump.document.xdocs.documenter import XDocDocumenter
  +from gump.core.commandLine import handleArgv
  +from gump.core.gumprun import GumpRun
  +from gump.loader.loader import WorkspaceLoader
   
  -def document(runs=1):
  -
  -    run=getWorkedTestRun()
  +def document(run,runs=1):
       
       test='test'
       if not os.path.exists(test): os.mkdir(test)
  @@ -53,7 +49,29 @@
   def xrun():
       gumpinit()
     
  -    document(100) 
  +    if len(sys.argv) > 1:
  +        # Process command line
  +        (args,options) = handleArgv(sys.argv)
  +        ws=args[0]
  +        ps=args[1]    
  +        
  +        # get parsed workspace definition
  +        workspace=WorkspaceLoader(options.isCache()).load(ws)    
  +        
  +        # Load statistics for this workspace
  +        from gump.stats.statsdb import StatisticsDB
  +        db=StatisticsDB('test','test.db')  
  +        db.loadStatistics(workspace)
  +        
  +        from gump.document.xdocs.resolver import XDocResolver
  +        options.setResolver(XDocResolver('./test/bogus','http://bogus.org/'))
  +        
  +        # The Run Details...
  +        run=GumpRun(workspace,ps,options) 
  +    else:
  +        run=getWorkedTestRun()    
  +        
  +    document(run,100) 
       
       # bye!
       sys.exit(0)
  @@ -61,8 +79,8 @@
   # static void main()
   if __name__=='__main__':
   
  -    print 'Profiling....'
  -    import profile
  -    profile.run('xrun()', 'iprof')
  -    # xrun()
  +    #print 'Profiling....'
  +    #import profile
  +    #profile.run('xrun()', 'iprof')
  +    xrun()
        
  
  
  
  No                   revision
  
  Index: xdocs.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/performance/Attic/xdocs.py,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- xdocs.py	20 Jun 2004 19:36:54 -0000	1.1.2.1
  +++ xdocs.py	25 Jun 2004 23:08:52 -0000	1.1.2.2
  @@ -15,12 +15,7 @@
   # limitations under the License.
   
   """    
  -    Checks that the Gump definitions are ok.
  -    
  -    The workspace is loaded into memory, rudimentary
  -    checks occur, and the output tree is documented
  -    (e.g. via forrest).
  -    
  +    Does lots of xdoc stuff (for performance tuning) 
   """
   
   import os.path
  @@ -30,10 +25,11 @@
   from gump.core.gumpinit import gumpinit
   from gump.test import getWorkedTestRun
   from gump.document.xdocs.documenter import XDocDocumenter
  +from gump.core.commandLine import handleArgv
  +from gump.core.gumprun import GumpRun
  +from gump.loader.loader import WorkspaceLoader
   
  -def document(runs=1):
  -
  -    run=getWorkedTestRun()
  +def document(run,runs=1):
       
       test='test'
       if not os.path.exists(test): os.mkdir(test)
  @@ -53,7 +49,29 @@
   def xrun():
       gumpinit()
     
  -    document(100) 
  +    if len(sys.argv) > 1:
  +        # Process command line
  +        (args,options) = handleArgv(sys.argv)
  +        ws=args[0]
  +        ps=args[1]    
  +        
  +        # get parsed workspace definition
  +        workspace=WorkspaceLoader(options.isCache()).load(ws)    
  +        
  +        # Load statistics for this workspace
  +        from gump.stats.statsdb import StatisticsDB
  +        db=StatisticsDB('test','test.db')  
  +        db.loadStatistics(workspace)
  +        
  +        from gump.document.xdocs.resolver import XDocResolver
  +        options.setResolver(XDocResolver('./test/bogus','http://bogus.org/'))
  +        
  +        # The Run Details...
  +        run=GumpRun(workspace,ps,options) 
  +    else:
  +        run=getWorkedTestRun()    
  +        
  +    document(run,100) 
       
       # bye!
       sys.exit(0)
  @@ -61,8 +79,8 @@
   # static void main()
   if __name__=='__main__':
   
  -    print 'Profiling....'
  -    import profile
  -    profile.run('xrun()', 'iprof')
  -    # xrun()
  +    #print 'Profiling....'
  +    #import profile
  +    #profile.run('xrun()', 'iprof')
  +    xrun()
        
  
  
  
  No                   revision
  
  Index: xdocs.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/performance/Attic/xdocs.py,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- xdocs.py	20 Jun 2004 19:36:54 -0000	1.1.2.1
  +++ xdocs.py	25 Jun 2004 23:08:52 -0000	1.1.2.2
  @@ -15,12 +15,7 @@
   # limitations under the License.
   
   """    
  -    Checks that the Gump definitions are ok.
  -    
  -    The workspace is loaded into memory, rudimentary
  -    checks occur, and the output tree is documented
  -    (e.g. via forrest).
  -    
  +    Does lots of xdoc stuff (for performance tuning) 
   """
   
   import os.path
  @@ -30,10 +25,11 @@
   from gump.core.gumpinit import gumpinit
   from gump.test import getWorkedTestRun
   from gump.document.xdocs.documenter import XDocDocumenter
  +from gump.core.commandLine import handleArgv
  +from gump.core.gumprun import GumpRun
  +from gump.loader.loader import WorkspaceLoader
   
  -def document(runs=1):
  -
  -    run=getWorkedTestRun()
  +def document(run,runs=1):
       
       test='test'
       if not os.path.exists(test): os.mkdir(test)
  @@ -53,7 +49,29 @@
   def xrun():
       gumpinit()
     
  -    document(100) 
  +    if len(sys.argv) > 1:
  +        # Process command line
  +        (args,options) = handleArgv(sys.argv)
  +        ws=args[0]
  +        ps=args[1]    
  +        
  +        # get parsed workspace definition
  +        workspace=WorkspaceLoader(options.isCache()).load(ws)    
  +        
  +        # Load statistics for this workspace
  +        from gump.stats.statsdb import StatisticsDB
  +        db=StatisticsDB('test','test.db')  
  +        db.loadStatistics(workspace)
  +        
  +        from gump.document.xdocs.resolver import XDocResolver
  +        options.setResolver(XDocResolver('./test/bogus','http://bogus.org/'))
  +        
  +        # The Run Details...
  +        run=GumpRun(workspace,ps,options) 
  +    else:
  +        run=getWorkedTestRun()    
  +        
  +    document(run,100) 
       
       # bye!
       sys.exit(0)
  @@ -61,8 +79,8 @@
   # static void main()
   if __name__=='__main__':
   
  -    print 'Profiling....'
  -    import profile
  -    profile.run('xrun()', 'iprof')
  -    # xrun()
  +    #print 'Profiling....'
  +    #import profile
  +    #profile.run('xrun()', 'iprof')
  +    xrun()
        
  
  
  
  1.1.2.1   +80 -0     gump/python/gump/performance/Attic/gurus.py
  
  
  
  
  No                   revision
  No                   revision
  1.1.2.5   +3 -2      gump/python/gump/utils/Attic/domutils.py
  
  Index: domutils.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/utils/Attic/domutils.py,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- domutils.py	25 Jun 2004 16:40:37 -0000	1.1.2.4
  +++ domutils.py	25 Jun 2004 23:08:52 -0000	1.1.2.5
  @@ -204,8 +204,9 @@
       # (i.e. deep clone and copy into target) 
       if sourceElement.hasChildNodes():
           for childNode in sourceElement.childNodes:  
  -            clonedNode=childNode.cloneNode(True)
  -            targetElement.appendChild(clonedNode)
  +            #clonedNode=childNode.cloneNode(True)
  +            #targetElement.appendChild(clonedNode)
  +            targetElement.appendChild(childNode)
       
       
   #    
  
  
  
  No                   revision
  No                   revision
  1.1.2.3   +6 -6      gump/python/gump/notify/notification.py
  
  Index: notification.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/notify/notification.py,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- notification.py	14 Jun 2004 21:31:46 -0000	1.1.2.2
  +++ notification.py	25 Jun 2004 23:08:52 -0000	1.1.2.3
  @@ -94,8 +94,8 @@
           name=self.entity.getName()
           type=self.entity.__class__.__name__
           affected=0        
  -        if not isinstance(self.entity,Workspace):
  -            affected=self.entity.determineAffected()
  +        if isinstance(self.entity,Project):
  +            affected=self.entity.countAffectedProjects()
           duration=self.entity.getStats().sequenceInState        
                       
           stream.write(type + ' ' + name)
  @@ -120,10 +120,10 @@
           
           stream.write("\n")
           
  -        # Show thos affected
  -        if isinstance(self.entity,Project) and affected:
  -            affectedProjects=self.entity.determineAffectedProjects()
  -            if 1 or ((duration and duration > 3) and affectedProjects):
  +        # Show those affected
  +        if affected:
  +            affectedProjects=self.entity.getAffectedProjects()
  +            if True or ((duration and duration > 3) and affectedProjects):
                   # Show those negatively affected
                   stream.write('The following are affected:\n')
               
  
  
  
  No                   revision
  No                   revision
  1.9.2.10  +0 -2      gump/python/gump/core/gumprun.py
  
  Index: gumprun.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/core/gumprun.py,v
  retrieving revision 1.9.2.9
  retrieving revision 1.9.2.10
  diff -u -r1.9.2.9 -r1.9.2.10
  --- gumprun.py	21 Jun 2004 04:06:09 -0000	1.9.2.9
  +++ gumprun.py	25 Jun 2004 23:08:52 -0000	1.9.2.10
  @@ -303,8 +303,6 @@
                           sequence.append(todoProject)
                           projectIndex += 1
                           todoProject.setPosition(projectIndex)
  -   
  -                        log.debug('Identify ' + todoProject.getName() + ' at position #'
+ `todoProject.getPosition()`)     
                       #else:
                       #    log.debug('Duplicate Result ['+todoProject.getName()+']')    
                       foundSome=1
  
  
  
  No                   revision
  No                   revision
  1.4.2.1   +3 -3      gump/python/gump/shared/comparator.py
  
  Index: comparator.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/shared/comparator.py,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- comparator.py	21 May 2004 23:15:10 -0000	1.4
  +++ comparator.py	25 Jun 2004 23:08:52 -0000	1.4.2.1
  @@ -131,8 +131,8 @@
       return c                         
                               
   def compareProjectsByAffected(project1,project2):
  -    aff1=project1.determineAffected()
  -    aff2=project2.determineAffected()
  +    aff1=project1.countAffectedProjects()
  +    aff2=project2.countAffectedProjects()
       c= int(round(aff2 - aff1,0))                  
       if not c: c=cmp(project1,project2)
       return c                         
  
  
  
  No                   revision
  No                   revision
  1.2.2.12  +0 -2      gump/python/gump/document/xdocs/xdoc.py
  
  Index: xdoc.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/document/xdocs/xdoc.py,v
  retrieving revision 1.2.2.11
  retrieving revision 1.2.2.12
  diff -u -r1.2.2.11 -r1.2.2.12
  --- xdoc.py	23 Jun 2004 21:38:42 -0000	1.2.2.11
  +++ xdoc.py	25 Jun 2004 23:08:52 -0000	1.2.2.12
  @@ -66,8 +66,6 @@
                   
       def createSubContext(self,transient=False):
           if not transient:
  -            # sub = XDocContext(self.stream,self.pretty,self.depth+1)
  -            # Allow sharing
               sub = self
           else:              
               sub = XDocContext(None,self.pretty,self.depth+1)
  
  
  
  1.9.2.21  +3 -8      gump/python/gump/document/xdocs/documenter.py
  
  Index: documenter.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/document/xdocs/documenter.py,v
  retrieving revision 1.9.2.20
  retrieving revision 1.9.2.21
  diff -u -r1.9.2.20 -r1.9.2.21
  --- documenter.py	23 Jun 2004 21:38:42 -0000	1.9.2.20
  +++ documenter.py	25 Jun 2004 23:08:52 -0000	1.9.2.21
  @@ -962,7 +962,7 @@
               # Determine the number of projects this module (or its projects)
               # cause not to be run.
               #
  -            affected=project.determineAffected()
  +            affected=project.countAffectedProjects()
               
               totalAffected += affected
               
  @@ -1055,9 +1055,8 @@
           
           modulesSection=document.createSection('Modules with TODOs')               
           modulesSection.createParagraph("""These are the modules that need 'fixing', or
contained projects that need fixing.
  -This page helps Gumpmeisters (and others) locate the main areas to focus attention. 
  -The count of affected indicates relative importance of fixing this module.""")        
  -        modulesTable=modulesSection.createTable(['Name','Affected','Duration\nin state','Module
State',	\
  +This page helps Gumpmeisters (and others) locate the main areas to focus attention.""")
       
  +        modulesTable=modulesSection.createTable(['Name','Duration\nin state','Module State',
\
                                       'Project State(s)','Elapsed'])
           
           mcount=0
  @@ -1082,18 +1081,14 @@
                       stats=project.getStats()        
                       if stats.sequenceInState > seq: seq = stats.sequenceInState
       
  -            #
               # Determine the number of projects this module (or its projects)
               # cause not to be run.
  -            #
  -            affected=module.determineAffected()
               
               # Display
               moduleRow=modulesTable.createRow()
               moduleRow.createComment(module.getName())     
               self.insertLink(module,self.workspace,moduleRow.createData())
               
  -            moduleRow.createData(affected)
               moduleRow.createData(seq)
                           
               self.insertStateIcon(module,self.workspace,moduleRow.createData())
  
  
  
  No                   revision
  No                   revision
  1.2.2.1   +15 -1     gump/python/gump/guru/stats.py
  
  Index: stats.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/guru/stats.py,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- stats.py	21 May 2004 23:15:08 -0000	1.2
  +++ stats.py	25 Jun 2004 23:08:53 -0000	1.2.2.1
  @@ -72,22 +72,36 @@
           # One for the whole workspace
           self.wguru=WorkspaceStatisticsGuru(workspace)      
           
  -        # All Modules          
  +        # All Modules            
  +        log.debug('compareModulesByElapsed')
           self.modulesByElapsed=createOrderedList(workspace.getModules(),compareModulesByElapsed)
  +        log.debug('compareModulesByProjectCount')
           self.modulesByProjectCount=createOrderedList(workspace.getModules(),compareModulesByProjectCount)
  +        log.debug('compareModulesByDependencyCount')
           self.modulesByTotalDependencies=createOrderedList(workspace.getModules(),compareModulesByDependencyCount)
  +        log.debug('compareModulesByDependeeCount')
           self.modulesByTotalDependees=createOrderedList(workspace.getModules(),compareModulesByDependeeCount)
  +        log.debug('compareModulesByFOGFactor')
           self.modulesByFOGFactor=createOrderedList(workspace.getModules(),compareModulesByFOGFactor)
  +        log.debug('compareModulesByLastModified')
           self.modulesByLastModified=createOrderedList(workspace.getModules(),compareModulesByLastModified)
           
           
           # All Projects                
  +        log.debug('compareProjectsByElapsed')
           self.projectsByElapsed=createOrderedList(workspace.getProjects(),compareProjectsByElapsed)
  +        log.debug('compareProjectsByDependencyCount')
           self.projectsByTotalDependencies=createOrderedList(workspace.getProjects(),compareProjectsByDependencyCount)
  +        log.debug('compareProjectsByDependeeCount')
           self.projectsByTotalDependees=createOrderedList(workspace.getProjects(),compareProjectsByDependeeCount)
  +        log.debug('compareProjectsByFOGFactor')
           self.projectsByFOGFactor=createOrderedList(workspace.getProjects(),compareProjectsByFOGFactor)
  +        log.debug('compareProjectsByLastModified')
           self.projectsByLastModified=createOrderedList(workspace.getProjects(),compareProjectsByLastModified)
  +        log.debug('compareProjectsBySequenceInState')
           self.projectsBySequenceInState=createOrderedList(workspace.getProjects(),compareProjectsBySequenceInState)
  +        log.debug('compareProjectsByDependencyDepth')
           self.projectsByDependencyDepth=createOrderedList(workspace.getProjects(),compareProjectsByDependencyDepth)
  +        log.debug('compareProjectsByTotalDependencyDepth')
           self.projectsByTotalDependencyDepth=createOrderedList(workspace.getProjects(),compareProjectsByTotalDependencyDepth)
           
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Mime
View raw message