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/document/forrest documenter.py
Date Tue, 11 May 2004 04:20:01 GMT
ajack       2004/05/10 21:20:01

  Modified:    python/gump/model server.py
               server   hermes.xml
               python/gump/core commandLine.py gumprun.py engine.py
               python/gump/document/forrest documenter.py
  Log:
  1) Set hermes down
  2) Respect server status (e.g. up|down)
  3) Allow --official (to nag, etc.) only on these [see brutus.]
  
  Revision  Changes    Path
  1.18      +9 -0      gump/python/gump/model/server.py
  
  Index: server.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/server.py,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- server.py	14 Apr 2004 22:12:58 -0000	1.17
  +++ server.py	11 May 2004 04:20:01 -0000	1.18
  @@ -52,6 +52,15 @@
       def getType(self):
           return str(self.xml.type)
           
  +    def hasStatus(self):
  +        return hasattr(self.xml,'status') and self.xml.status
  +           
  +    def getStatus(self):
  +        return str(self.xml.status)
  +        
  +    def isUp(self):
  +        return self.hasStatus() and 'up' == self.getStatus()
  +        
       def hasSite(self):
           return hasattr(self.xml,'site') and self.xml.site
              
  
  
  
  1.2       +2 -1      gump/server/hermes.xml
  
  Index: hermes.xml
  ===================================================================
  RCS file: /home/cvs/gump/server/hermes.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- hermes.xml	5 Apr 2004 22:44:59 -0000	1.1
  +++ hermes.xml	11 May 2004 04:20:01 -0000	1.2
  @@ -15,9 +15,10 @@
     limitations under the License.
   -->
   
  -<server name="hermes" type="python" status="up">
  +<server name="hermes" type="python" status="down">
     <attribution>The Apache Software Foundation</attribution>
     <title>Hermes</title>
     <url>http://hermes.apache.org/gump/public</url>
     <site>http://gump.apache.org</site>
  +  <note>Might soon be deleted...</note>
   </server>
  
  
  
  1.6       +5 -0      gump/python/gump/core/commandLine.py
  
  Index: commandLine.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/core/commandLine.py,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- commandLine.py	26 Apr 2004 01:00:33 -0000	1.5
  +++ commandLine.py	11 May 2004 04:20:01 -0000	1.6
  @@ -65,6 +65,7 @@
                   print "  -d,  --debug             debug logging."
                   print
                   print " Not relevent to all scripts:"
  +                print "  -O,  --official          Full run, publishing notifications, etc."
                   print "  -D,  --dated             Dated log files."
                   print "  -t,  --text              Use text not Forrest."
                   print "  -T,  --templates         Use temapltes not Forrest."
  @@ -104,6 +105,10 @@
                   #
                   self.options.setDated(1)                    
                   log.info('Dated Operation (add date to log dir)')
  +            elif arg in ['-O','--official']:
  +                removers.append(arg)    
  +                self.options.setOfficial(1)                    
  +                log.info('Official run (publish notifications, etc.)')
               elif arg in ['-t','--text']:
                   removers.append(arg)        
                   self.options.setText(1)
  
  
  
  1.5       +7 -0      gump/python/gump/core/gumprun.py
  
  Index: gumprun.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/core/gumprun.py,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- gumprun.py	30 Apr 2004 20:23:43 -0000	1.4
  +++ gumprun.py	11 May 2004 04:20:01 -0000	1.5
  @@ -353,6 +353,7 @@
           self.quick=1	# Defaults to CACHE
           self.dated=0	# Defaults to NOT dated.
           self.optimize=0	# Do the least ammount of work...
  +        self.official=0	# Do a full run (with publishing e-mail)
           
           # Default is Text unless Forrest is in the environment,
           # but can also force text with --text 
  @@ -383,6 +384,12 @@
           
       def setDated(self,dated):
           self.dated=dated
  +        
  +    def isOfficial(self):
  +        return self.official
  +        
  +    def setOfficial(self,official):
  +        self.official=official
           
       def isQuick(self):
           return self.quick
  
  
  
  1.11      +7 -10     gump/python/gump/core/engine.py
  
  Index: engine.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/core/engine.py,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- engine.py	5 May 2004 17:41:33 -0000	1.10
  +++ engine.py	11 May 2004 04:20:01 -0000	1.11
  @@ -808,7 +808,6 @@
                           + project.getStateDescription())
               
               projectNo+=1
  -
                                      
       """
       
  @@ -819,8 +818,6 @@
           ******************************************************************
       
       """
  -    
  -    
   
       def prepareDocumentation(self,run):
           
  @@ -860,7 +857,8 @@
           #
           #	Send Naggin E-mails
           #
  -        if run.getGumpSet().isFull() \
  +        if run.getOptions().isOfficial() \
  +            and run.getGumpSet().isFull() \
               and run.getWorkspace().isNag():
     
               log.info('Nag about failures... ')            
  @@ -896,9 +894,9 @@
           #
           # Provide a news feed (or few)
           #
  -        syndicate(run)
  +        if run.getOptions().isOfficial():
  +            syndicate(run)
                   
  -    
       def loadStatistics(self,run):   
           """ Load Statistics into the run (to get current values) """
           logResourceUtilization('Before load statistics')
  @@ -907,7 +905,8 @@
       def updateStatistics(self,run):        
           """ Update Statistics into the run (to set current values) """
           logResourceUtilization('Before update statistics')
  -        self.processStatistics(run,0)
  +        if run.getOptions().isOfficial():
  +            self.processStatistics(run,0)
           
       def processStatistics(self,run,load):
       
  @@ -932,9 +931,7 @@
               # Load stats (and stash onto projects)
               #    
               db.loadStatistics(workspace)            
  -          
  -
  -    
  +        
   class GumpTask:
       
       def __init__(self, name, dependencyNames):
  
  
  
  1.33      +21 -8     gump/python/gump/document/forrest/documenter.py
  
  Index: documenter.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/document/forrest/documenter.py,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- documenter.py	7 May 2004 12:49:39 -0000	1.32
  +++ documenter.py	11 May 2004 04:20:01 -0000	1.33
  @@ -513,7 +513,7 @@
               self.resolver.getFile(workspace,'servers'))
                   
           serversSection=document.createSection('All Servers')
  -        serversTable=serversSection.createTable(['Name','Notes','Results','Start (Local)','Start
(UTC)','End (UTC)','Offset (from UTC)'])
  +        serversTable=serversSection.createTable(['Name','Status','Notes','Results','Start
(Local)','Start (UTC)','End (UTC)','Offset (from UTC)'])
   
           scount=0
           for server in sortedServerList:
  @@ -524,7 +524,12 @@
               serverRow.createComment(server.getName())
                          
               self.insertLink( server, workspace, serverRow.createData())
  -                                        
  +                
  +            if server.isUp():   
  +                serverRow.createData('Up')
  +            else:
  +                serverRow.createData().createStrong('Down')                     
  +                                                
               if server.hasNote():
                   serverRow.createData(server.getNote())
               else:
  @@ -1206,6 +1211,11 @@
           
           detailList.createEntry('Name: ', server.getName())
       
  +        if server.isUp():
  +            detailList.createEntry('Status: ', 'Up')
  +        else:
  +            detailList.createEntry('Status: ', 'Down')
  +    
           if server.hasType():
               detailList.createEntry('Type: ', server.getType())
       
  @@ -1608,7 +1618,7 @@
           addnSection=document.createSection('Additional Details')
           addnPara=addnSection.createParagraph()
           addnPara.createLink('details.html',	
  -                              'For additional project details (including dependencies)
...')
  +                              'For additional project details (including classpaths,dependencies)
...')
                                   
           document.serialize()
           
  @@ -1641,9 +1651,10 @@
                   
                   # The jar id
                   id=jar.getId() or 'N/A'
  -                outputRow.createData(id)                                
  +                outputRow.createData(id)    
  +        else:
  +            miscSection.createParagraph('No outputs (e.g. jars) produced')
           
  -            
           if project.hasBuildCommand():
               
               if project.hasAnt():                
  @@ -1652,6 +1663,8 @@
               (classpath,bootclasspath)=project.getClasspathObjects()            
               self.displayClasspath(miscSection, classpath,'Classpath',project)        
               self.displayClasspath(miscSection, bootclasspath,'Boot Classpath',project)

  +        else:
  +            miscSection.createParagraph('No build command (so classpaths irrelevant)')
          
           if project.isDebug():
               self.documentXML(miscSection,project)
  @@ -1789,8 +1802,8 @@
           if not paths:        
               pathTable.createLine('No ' + title + ' entries')
               
  -            
  -        self.documentAnnotations(pathSection,classpath)    
  +        if classpath.containsNasties():
  +            self.documentAnnotations(pathSection,classpath)    
                        
       def documentDependenciesPath(self,xdocNode,title,path,dependees,full,referencingObject,gumpSet):
       
           # :TODO: show start and end?
  @@ -1922,7 +1935,7 @@
                       utcTime=results.getStartDateTimeUtc()
                                   
               # If we can resolve this object to a URL, then do                        
  -            if server.hasResolver():
  +            if server.hasResolver() and server.isUp():
                   dataNode=serverRow.createData()    
               
                   xdocNode=dataNode.createFork(	\
  
  
  

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


Mime
View raw message