ajack       2004/04/03 09:32:18

  Modified:    python/gump/model project.py stats.py module.py
               python/gump/document forrest.py
               python/gump/test resolving.py
  Log:
  Be explicit that FOG is 'historical odds of success' and also

  show it in dependency tables.
  
  Revision  Changes    Path
  1.72      +3 -0      gump/python/gump/model/project.py
  
  Index: project.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/project.py,v
  retrieving revision 1.71
  retrieving revision 1.72
  diff -u -r1.71 -r1.72
  --- project.py        2 Apr 2004 16:48:07 -0000       1.71
  +++ project.py        3 Apr 2004 17:32:18 -0000       1.72
  @@ -264,6 +264,9 @@
       def getFOGFactor(self):
           return self.getStats().getFOGFactor()
           
  +    def getHistoricalOddsOfSuccess(self):
  +        return self.getStats().getHistoricalOddsOfSuccess()
  +        
       # Only modules get updated.
       def getLastUpdated(self):
           return self.getModule().getStats().getLastUpdated()  
  
  
  
  1.17      +9 -0      gump/python/gump/model/stats.py
  
  Index: stats.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/stats.py,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- stats.py  2 Apr 2004 16:48:07 -0000       1.16
  +++ stats.py  3 Apr 2004 17:32:18 -0000       1.17
  @@ -53,7 +53,16 @@
       # FOG is (at pressent) effectively the
       # 'odds of success' (based off historical results).
       #
  +    # We ought find a way to factor in durations and
  +    # age into this
  +    #
       def getFOGFactor(self):
  +        return self.getHistoricalOddsOfSuccess()        
  +        
  +    #           
  +    # 'odds of success' (based off historical results).
  +    #
  +    def getHistoricalOddsOfSuccess(self):
           good=self.successes
           bad=(self.failures+self.prereqs)
           total=(good+bad) or 1
  
  
  
  1.40      +14 -1     gump/python/gump/model/module.py
  
  Index: module.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/module.py,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- module.py 16 Mar 2004 19:50:14 -0000      1.39
  +++ module.py 3 Apr 2004 17:32:18 -0000       1.40
  @@ -413,7 +413,20 @@
           if not fogFactors:
               fogFactors=1 # 0/1 is better than 0/0
               
  -        return fogFactor/fogFactors
  +        return float(fogFactor)/float(fogFactors)
  +        
  +    def getHistoricalOddsOfSuccess(self):
  +        historicalOdds=0
  +        historicalOddses=0
  +        for project in self.getProjects():
  +                projectHistoricalOddsOfSuccess = 
project.getHistoricalOddsOfSuccess()
  +                historicalOdds += projectHistoricalOddsOfSuccess
  +                historicalOddses += 1
  +                
  +        if not historicalOddses:
  +            historicalOddses=1 # 0/1 is better than 0/0
  +            
  +        return float(historicalOdds)/float(historicalOddses)
           
       def getLastUpdated(self):
           return self.getStats().getLastUpdated()                
  
  
  
  1.127     +7 -4      gump/python/gump/document/forrest.py
  
  Index: forrest.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/document/forrest.py,v
  retrieving revision 1.126
  retrieving revision 1.127
  diff -u -r1.126 -r1.127
  --- forrest.py        3 Apr 2004 02:36:35 -0000       1.126
  +++ forrest.py        3 Apr 2004 17:32:18 -0000       1.127
  @@ -1557,7 +1557,7 @@
                   
           if dependencies:
               dependencySection=xdocNode.createSection(title)
  -            titles=['Name','Type','Inheritence','Ids','State']
  +            titles=['Name','Type','Inheritence','Ids','State','FOG']
               if full:
                   titles.append('Contributor')
               titles.append('Notes')
  @@ -1602,6 +1602,9 @@
                   
                   # State Icon
                   
self.insertStateIcon(project,referencingObject,dependencyRow.createData())
  +                
  +                # FOG Factor
  +                dependencyRow.createData(project.getFOGFactor())
                   
                   if full:
                       # Contributor
  
  
  
  1.3       +1 -1      gump/python/gump/test/resolving.py
  
  Index: resolving.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/test/resolving.py,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- resolving.py      2 Apr 2004 21:23:20 -0000       1.2
  +++ resolving.py      3 Apr 2004 17:32:18 -0000       1.3
  @@ -120,7 +120,7 @@
           self.checkRelativeLocation(self.ant1,self.module1)
       
       def testResolving(self):
  -        resolver=Resolver('.','http://somewhere/something')
  +        resolver=Resolver('./test','http://somewhere/something')
   
           #printSeparator()
           self.assertNotNone("Resolved Module: ", resolver.getDirectory(self.module1))
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to