ajack       2004/02/23 12:55:08

  Modified:    python/gump/output statsdb.py nag.py
               python/gump/model module.py stats.py
               .        .cvsignore
               python/test .cvsignore
               python/gump/document forrest.py
  Log:
  1) Try to keep presentation issues w/ float away from internals

  2) Try to debug why unwanted nags aren't coming to mailing list

  3) Added to some .cvsignores, to try to keep dross out of CVS
  
  Revision  Changes    Path
  1.14      +5 -5      jakarta-gump/python/gump/output/statsdb.py
  
  Index: statsdb.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/output/statsdb.py,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- statsdb.py        21 Jan 2004 18:52:30 -0000      1.13
  +++ statsdb.py        23 Feb 2004 20:55:08 -0000      1.14
  @@ -378,7 +378,7 @@
           # Average Projects Per Module
           #
           self.averageProjectsPerModule=       \
  -            round(self.projectsInWorkspace/self.modulesInWorkspace,2)
  +            float(self.projectsInWorkspace)/self.modulesInWorkspace
               
   #
   # Module Comparisons
  @@ -459,7 +459,7 @@
   def compareProjectsByFOGFactor(project1,project2):
       fog1=project1.getFOGFactor()
       fog2=project2.getFOGFactor()
  -    c= int(round(fog2 - fog1,2))                  
  +    c= int(round(fog2 - fog1,0))                  
       if not c: c=cmp(project1,project2)
       return c             
               
  
  
  
  1.15      +13 -8     jakarta-gump/python/gump/output/nag.py
  
  Index: nag.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/output/nag.py,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- nag.py    23 Feb 2004 15:43:06 -0000      1.14
  +++ nag.py    23 Feb 2004 20:55:08 -0000      1.15
  @@ -152,7 +152,8 @@
                   
           # Belt and braces (nag to us if not nag to them)
           if self.hasUnwanted():
  -            log.info('Got some unwanted\'s to send to list...')
  +            log.info('We have some unwanted\'s to send to list...')
  +            
               self.sendEmail(self.workspace.mailinglist,self.workspace.email,  \
                           'All dressed up, with nowhere to go...',self.unwanted)
                           
  @@ -164,7 +165,7 @@
                   
           # Belt and braces (nag to us if not nag to them)
           if self.hasUnsent():
  -            log.info('Got some unsented\'s to send to list...')    
  +            log.info('We have some unsented\'s to send to list...')    
               self.sendEmail(self.workspace.mailinglist,self.workspace.email,  \
                           'Unable to send...',self.unsent)
                           
  @@ -283,7 +284,9 @@
           toaddrs=[ toaddr ]
       
           try:
  -            
  +               
  +            log.info('Send Nag e-mail to: ' + str(toaddr) + ' from: ' + 
str(fromaddr))
  +           
               #
               # Form the user visable part ...
               #
  @@ -292,7 +295,7 @@
                                   subject, \
                                   content)       
                 
  -            log.info('Send Nag e-mail to: ' + str(toaddr) + ' from: ' + 
str(fromaddr) + ' subject: ' + str(subject))
  +            log.info('Subject: ' + str(subject))
                           
               #print 
'-------------------------------------------------------------------'
               #print 'To:' + `toaddr`
  @@ -306,10 +309,12 @@
                   self.workspace.mailport) 
               
           except Exception, details:
  -            log.error('Failed to send nag e-mail ['+str(toaddr)+'] 
['+str(fromaddr)+']: ' + str(details), \
  +            log.error('Failed to send nag e-mail: ' + str(details), \
                           exc_info=1)
                           
               self.addUnsent(subject,content)                
  +                        
  +            log.error('Failed with to: ['+str(toaddr)+'] from: ['+str(fromaddr)+']' 
)
               
       def getNamedTypedContent(self,object,feedPrefix=None,message=None):
           content="""To whom it may engage...
  
  
  
  1.33      +4 -4      jakarta-gump/python/gump/model/module.py
  
  Index: module.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/model/module.py,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- module.py 12 Feb 2004 13:41:52 -0000      1.32
  +++ module.py 23 Feb 2004 20:55:08 -0000      1.33
  @@ -437,7 +437,7 @@
           if not fogFactors:
               fogFactors=1 # 0/1 is better than 0/0
               
  -        return round(fogFactor/fogFactors,2)
  +        return fogFactor/fogFactors
           
       def getLastUpdated(self):
           return self.getStats().getLastUpdated()                
  
  
  
  1.11      +4 -4      jakarta-gump/python/gump/model/stats.py
  
  Index: stats.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/model/stats.py,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- stats.py  17 Feb 2004 21:54:20 -0000      1.10
  +++ stats.py  23 Feb 2004 20:55:08 -0000      1.11
  @@ -94,7 +94,7 @@
           self.lastUpdated=0
                   
       def getFOGFactor(self):
  -        return round((float(self.successes) / (float(self.failures) + 
float(self.prereqs))), 2)
  +        return (float(self.successes) / (float(self.failures) + 
float(self.prereqs)))
           
       def getLastUpdated(self):
           return (self.lastUpdated)
  
  
  
  1.19      +2 -1      jakarta-gump/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/.cvsignore,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- .cvsignore        26 Nov 2003 20:01:16 -0000      1.18
  +++ .cvsignore        23 Feb 2004 20:55:08 -0000      1.19
  @@ -17,4 +17,5 @@
   local-env.sh
   local-eny-py.sh
   tsws1.xml
  -x.txt
  \ No newline at end of file
  +x.txt
  +test
  \ No newline at end of file
  
  
  
  1.2       +2 -1      jakarta-gump/python/test/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/test/.cvsignore,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- .cvsignore        26 Nov 2003 20:01:16 -0000      1.1
  +++ .cvsignore        23 Feb 2004 20:55:08 -0000      1.2
  @@ -1,2 +1,3 @@
   forrest
  -gump
  \ No newline at end of file
  +gump
  +*
  \ No newline at end of file
  
  
  
  1.78      +8 -8      jakarta-gump/python/gump/document/forrest.py
  
  Index: forrest.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/document/forrest.py,v
  retrieving revision 1.77
  retrieving revision 1.78
  diff -u -r1.77 -r1.78
  --- forrest.py        23 Feb 2004 17:00:05 -0000      1.77
  +++ forrest.py        23 Feb 2004 20:55:08 -0000      1.78
  @@ -485,7 +485,7 @@
               self.insertStateIcon(project,workspace,projectRow.createData())    
               projectRow.createData(secsToElapsedString(project.getElapsedSecs()))  
               
  -            projectRow.createData(round(project.getFOGFactor(),2))
  +            projectRow.createData('%02.2f' % project.getFOGFactor())
                   
           if not pcount: projectsTable.createLine('None')    
           document.serialize()
  @@ -631,7 +631,7 @@
               self.insertStateIcons(gumpSet,module,workspace,moduleRow.createData())
               
               moduleRow.createData(secsToElapsedString(module.getElapsedSecs()))
  -            moduleRow.createData(round(module.getFOGFactor(),2))
  +            moduleRow.createData('%02.2f' % module.getFOGFactor())
               
           if not mcount: modulesTable.createLine('None')
           
  @@ -1152,7 +1152,7 @@
                   'This project has existed in this failed state for a significant 
duration.')
           
           statsTable=statsSection.createTable()           
  -        statsTable.createEntry("FOG Factor: ", round(stats.getFOGFactor(),2))
  +        statsTable.createEntry("FOG Factor: ", '%02.2f' % stats.getFOGFactor())
           statsTable.createEntry("Successes: ", stats.successes)
           statsTable.createEntry("Failures: ", stats.failures)
           statsTable.createEntry("Prerequisite Failures: ", stats.prereqs)
  @@ -1913,7 +1913,7 @@
               if not gumpSet.inModules(module): continue    
               fogRow=fogTable.createRow()            
               self.insertLink( module, stats, fogRow.createData())                
  -            fogRow.createData(round(module.getFOGFactor(),2))
  +            fogRow.createData('%02.2f' % module.getFOGFactor())
               
           document.serialize()
           
  @@ -2012,7 +2012,7 @@
               fogRow.createData(pstats.successes)
               fogRow.createData(pstats.failures)
               fogRow.createData(pstats.prereqs)
  -            fogRow.createData(round(pstats.getFOGFactor(),2))
  +            fogRow.createData('%02.2f' % pstats.getFOGFactor())
               
           document.serialize()   
           
  
  
  

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

Reply via email to