You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@gump.apache.org by aj...@apache.org on 2004/05/19 00:37:32 UTC

cvs commit: gump/python/gump/document/text documenter.py

ajack       2004/05/18 15:37:32

  Modified:    python/gump/runner Tag: MultiRunner tasks.py runner.py
                        demand.py
               python/gump/syndication Tag: MultiRunner rss.py
                        syndicator.py atom.py
               python/gump/results Tag: MultiRunner resulter.py
               python/gump/utils Tag: MultiRunner __init__.py
               python/gump/core Tag: MultiRunner actor.py gumprun.py
               python/gump/stats Tag: MultiRunner statistician.py
                        statsdb.py
               python/gump/document/xdocs Tag: MultiRunner resolver.py
                        documenter.py
               python/gump/build Tag: MultiRunner maven.py builder.py
               python/gump/document Tag: MultiRunner documenter.py
               python/gump/document/text Tag: MultiRunner documenter.py
  Log:
  Safety check-in...
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.2   +1 -1      gump/python/gump/runner/Attic/tasks.py
  
  Index: tasks.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/runner/Attic/tasks.py,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- tasks.py	18 May 2004 20:10:43 -0000	1.1.2.1
  +++ tasks.py	18 May 2004 22:37:24 -0000	1.1.2.2
  @@ -113,7 +113,7 @@
               task.invoke()
               
               # Seems a nice place to clean up...    
  -            invokeGarbageCollection()
  +            invokeGarbageCollection('Task ' + task.getName())
      
           
   class GumpTask:
  
  
  
  1.1.2.2   +32 -21    gump/python/gump/runner/Attic/runner.py
  
  Index: runner.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/runner/Attic/runner.py,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- runner.py	18 May 2004 20:10:43 -0000	1.1.2.1
  +++ runner.py	18 May 2004 22:37:24 -0000	1.1.2.2
  @@ -24,12 +24,12 @@
   
   from gump import log
   
  -
  -
   from gump.core.misc import *
   from gump.update.updater import *
   from gump.build.builder import *
   
  +from gump.syndication.syndicator import *
  +from gump.results.resulter import *
   
   ###############################################################################
   # Classes
  @@ -69,20 +69,7 @@
           # Modify the log location on the fly, if --dated
           #
           if self.run.getOptions().isDated():
  -            workspace.setDatedDirectories()
  -        
  -        #
  -        # Use Forrest if available & not overridden...
  -        #
  -        documenter=None
  -        if self.run.getEnvironment().noForrest \
  -            or self.run.getOptions().isText() :
  -            documenter=TextDocumenter(self.run)
  -        else:
  -            documenter=XDocDocumenter(	self.run,	\
  -                                        workspace.getBaseDirectory(), \
  -                                        workspace.getLogUrl())                        
  -        self.run.registerActor(documenter)
  +            workspace.setDatedDirectories()     
                       
           # Check the workspace
           if not workspace.getVersion() >= setting.ws_version:
  @@ -104,17 +91,41 @@
           # :TODO: Put this somewhere else, and/or make it depend upon something...
           workspace.changeState(STATE_SUCCESS)
    
  +        # Initialize Actors
  +        self.initializeActors()             
  + 
           # Let's get going...
  -        self.run.dispatchEvent(InitializeRunEvent())
  -                    
  -    def finalize(self):            
  -        # About to shutdown...
  -        self.run.dispatchEvent(FinalizeRunEvent())
  +        self.run.dispatchEvent(InitializeRunEvent(self.run))
  +    
  +    def initializeActors(self):
  +        self.run.registerActor(Statistician(self.run))
  +        self.run.registerActor(Resulter(self.run))
  +        self.run.registerActor(Notifier(self.run))
  +              
  +        #
  +        # Use Forrest if available & not overridden...
  +        #
  +        documenter=None
  +        if self.run.getEnvironment().noForrest \
  +            or self.run.getOptions().isText() :
  +            documenter=TextDocumenter(self.run)
  +        else:
  +            documenter=XDocDocumenter(	self.run,	\
  +                                        self.run.getWorkspace().getBaseDirectory(), \
  +                                        self.run.getWorkspace().getLogUrl())  
  +        self.run.getOptions().setResolver(documenter.getResolver())
  +                                                              
  +        self.run.registerActor(documenter)    
  +        self.run.registerActor(Syndicator(self.run))
           
       def setEndTime(self):
           logResourceUtilization('Set End Time')
           # :TODO: Move this to run
           self.run.getWorkspace().setEndTime()
  +                    
  +    def finalize(self):            
  +        # About to shutdown...
  +        self.run.dispatchEvent(FinalizeRunEvent(self.run))
   
   def getRunner(run):
       #from gump.runner.tasks import SequentialTaskRunner
  
  
  
  1.1.2.2   +12 -24    gump/python/gump/runner/Attic/demand.py
  
  Index: demand.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/runner/Attic/demand.py,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- demand.py	18 May 2004 20:10:43 -0000	1.1.2.1
  +++ demand.py	18 May 2004 22:37:25 -0000	1.1.2.2
  @@ -63,32 +63,20 @@
               # Process the module, upon demand
               module=project.getModule()
               if not module.isUpdated():
  -                self.processModule(module)
  +                self.updater.updateModule(module)        
                   module.setUpdated(1) #:TODO: Move this...
  +                self.run.generateEvent(module)
   
               # Process
  -            self.processProject(project)
  +            self.builder.buildProject(project)   
  +            self.run.generateEvent(project)
   
  -            # Keep track of progress...
  -            #documentBuildList()
  -
  -        self.finalize()
  -        
  -    def processModule(self,module):
  -        
  -        # Update Module
  -        self.updater.updateModule(module)
  -        #module.updateStats()
  -        #module.document()
  -        #module.syndicate()
  -        #module.notify()
  +        self.finalize()    
                   
  -    def processProject(self,project):
  -        
  -        # Build project
  -        self.builder.buildProject(project)
  -        #product.publishArtefacts()
  -        #project.updateStats()
  -        #project.document()
  -        #project.syndicate()
  -        #project.notify()
  \ No newline at end of file
  +        # Return an exit code based off success
  +        # :TODO: Move onto run
  +        if self.run.getWorkspace().isSuccess():
  +            result = EXIT_CODE_SUCCESS 
  +        else: 
  +            result = EXIT_CODE_FAILED
  +        return result  
  
  
  
  No                   revision
  No                   revision
  1.23.2.3  +5 -5      gump/python/gump/syndication/rss.py
  
  Index: rss.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/syndication/rss.py,v
  retrieving revision 1.23.2.2
  retrieving revision 1.23.2.3
  diff -u -r1.23.2.2 -r1.23.2.3
  --- rss.py	17 May 2004 23:45:50 -0000	1.23.2.2
  +++ rss.py	18 May 2004 22:37:27 -0000	1.23.2.3
  @@ -262,9 +262,9 @@
           if not channel: channel = self.getCurrentChannel()
           channel.addItem(item)
              
  -class RSSSyndicator(Syndicator):
  +class RSSSyndicator(AbstractSyndicator):
       def __init__(self):
  -        Syndicator.__init__(self)
  +        AbstractSyndicator.__init__(self)
           self.gumpImage=Image('http://gump.apache.org/images/bench.png',	\
                       'Apache Gump', \
                       'http://gump.apache.org/')
  
  
  
  1.19.2.2  +73 -20    gump/python/gump/syndication/syndicator.py
  
  Index: syndicator.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/syndication/syndicator.py,v
  retrieving revision 1.19.2.1
  retrieving revision 1.19.2.2
  diff -u -r1.19.2.1 -r1.19.2.2
  --- syndicator.py	17 May 2004 23:45:50 -0000	1.19.2.1
  +++ syndicator.py	18 May 2004 22:37:27 -0000	1.19.2.2
  @@ -1,22 +1,75 @@
  -              
  -def syndicate(run):
  +#!/usr/bin/env python
  +# Copyright 2003-2004 The Apache Software Foundation
  +#
  +# Licensed under the Apache License, Version 2.0 (the "License");
  +# you may not use this file except in compliance with the License.
  +# You may obtain a copy of the License at
  +# 
  +#     http://www.apache.org/licenses/LICENSE-2.0
  +# 
  +# Unless required by applicable law or agreed to in writing, software
  +# distributed under the License is distributed on an "AS IS" BASIS,
  +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  +# See the License for the specific language governing permissions and
  +# limitations under the License.
   
  -    #
  -    # Produce an RSS Feed
  -    #
  -    try:    
  -        from gump.syndication.rss import RSSSyndicator
  -        simple=RSSSyndicator()
  -        simple.syndicate(run)    
  -    except:
  -        log.error('Failed to generate RSS Feeds', exc_info=1)    
  +"""
  +
  +    Syndicate
  +    
  +"""
  +
  +import socket
  +import time
  +import os
  +import sys
  +import logging
  +
  +from string import lower, capitalize
  +
  +from gump import log
  +from gump.core.gumprun import *
  +from gump.core.actor import AbstractRunActor
  +
  +class Syndicator(AbstractRunActor):
  +    
  +    def __init__(self,run):      
  +        
  +        AbstractRunActor.__init__(self,run)              
  +        
  +    def processOtherEvent(self,event):
  +            
  +        workspace=self.run.getWorkspace()        
  +        
  +        if isinstance(event,FinalizeRunEvent):
  +          
  +            #
  +            # Update stats (and stash onto projects)
  +            #
  +            self.syndicate()
  +            
  +    def syndicate(self):
  +
  +        #
  +        # Produce an RSS Feed
  +        #
  +        try:    
  +            from gump.syndication.rss import RSSSyndicator
  +            simple=RSSSyndicator()
  +            simple.syndicate(run)    
  +        except:
  +            log.error('Failed to generate RSS Feeds', exc_info=1)    
           
  -    #
  -    # Produce an Atom Feed
  -    #
  -    try:
  -        from gump.syndication.atom import AtomSyndicator
  -        atom=AtomSyndicator()
  -        atom.syndicate(run)
  -    except:
  -        log.error('Failed to generate Atom Feeds', exc_info=1)  
  \ No newline at end of file
  +        #
  +        # Produce an Atom Feed
  +        #
  +        try:
  +            from gump.syndication.atom import AtomSyndicator
  +            atom=AtomSyndicator()
  +            atom.syndicate(run)
  +        except:
  +            log.error('Failed to generate Atom Feeds', exc_info=1)  
  +            
  +def syndicate(self,run):
  +    s=Syndicator(run)
  +    s.syndicate()
  \ No newline at end of file
  
  
  
  1.16.2.3  +5 -5      gump/python/gump/syndication/atom.py
  
  Index: atom.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/syndication/atom.py,v
  retrieving revision 1.16.2.2
  retrieving revision 1.16.2.3
  diff -u -r1.16.2.2 -r1.16.2.3
  --- atom.py	17 May 2004 23:45:50 -0000	1.16.2.2
  +++ atom.py	18 May 2004 22:37:27 -0000	1.16.2.3
  @@ -164,9 +164,9 @@
           # Close the file.
           stream.close()  
           
  -class AtomSyndicator(Syndicator):
  +class AtomSyndicator(AbstractSyndicator):
       def __init__(self):
  -        Syndicator.__init__(self)
  +        AbstractSyndicator.__init__(self)
           
       def syndicate(self,run):
           
  
  
  
  No                   revision
  No                   revision
  1.23.2.3  +17 -2     gump/python/gump/results/resulter.py
  
  Index: resulter.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/results/resulter.py,v
  retrieving revision 1.23.2.2
  retrieving revision 1.23.2.3
  diff -u -r1.23.2.2 -r1.23.2.3
  --- resulter.py	18 May 2004 20:10:43 -0000	1.23.2.2
  +++ resulter.py	18 May 2004 22:37:28 -0000	1.23.2.3
  @@ -40,7 +40,6 @@
   from gump.results.model import *
   from gump.results.loader import *
   
  -               
   class Resulter(AbstractRunActor):
       
       def __init__(self,run):        
  @@ -52,7 +51,23 @@
           self.serverResults = {}
           self.serversLoaded = 0
           
  -    def getServerResultFor(sefl, server, object):
  +        
  +    def processOtherEvent(self,event):
  +            
  +        workspace=self.run.getWorkspace()        
  +        
  +        if isinstance(event,InitializeRunEvent):
  +            
  +            self.gatherResults()
  +            
  +        elif isinstance(event,FinalizeRunEvent):        
  +            # In the root.
  +            where=self.run.getOptions().getResolver().getFile(	\
  +                    self.run.getWorkspace(),'results','.xml',1)    
  +            # Generate the output...
  +            self.generateResults(where)
  +            
  +    def getServerResultFor(self, server, object):
           results=self.getResultsForAllServers(object)
           if results.has_key(server):
               return results[server]
  
  
  
  No                   revision
  No                   revision
  1.40.2.1  +14 -5     gump/python/gump/utils/__init__.py
  
  Index: __init__.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/utils/__init__.py,v
  retrieving revision 1.40
  retrieving revision 1.40.2.1
  diff -u -r1.40 -r1.40.2.1
  --- __init__.py	15 May 2004 18:02:31 -0000	1.40
  +++ __init__.py	18 May 2004 22:37:29 -0000	1.40.2.1
  @@ -404,21 +404,27 @@
   #    except Exception, details:        
   #        if not os.name == 'dos' and not os.name == 'nt':
   #            log.error("Failed get resource utilization." \
  -#                   
  -def inspectGarbageCollection():
  +#        
  +           
  +def inspectGarbageCollection(marker=''):
       tracked = 0
       try:
           import gc
           tracked = len(gc.get_objects())
  -        log.debug('Objects Tracked by GC : ' + `tracked`)
  +        message=''
  +        if marker:
  +            message=' @ '
  +            message+=marker
  +        log.debug('Objects Tracked by GC %s : %s' \
  +                % (message,  `tracked`))
       except:
           pass  
       return tracked
                       
  -def invokeGarbageCollection():
  +def invokeGarbageCollection(marker=''):
       try:
           # See what GC thinks
  -        inspectGarbageCollection()
  +        inspectGarbageCollection(marker)
           
           # Perform GC
           import gc        
  @@ -427,5 +433,8 @@
           # Curiousity..
           if unreachable:
               log.debug('Objects Unreachable by GC : ' + `unreachable`)
  +                        
  +        # See what GC thinks afterwards...
  +        # inspectGarbageCollection(marker)
       except:
           pass
  
  
  
  No                   revision
  No                   revision
  1.1.2.2   +16 -0     gump/python/gump/core/Attic/actor.py
  
  Index: actor.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/core/Attic/actor.py,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- actor.py	18 May 2004 20:10:44 -0000	1.1.2.1
  +++ actor.py	18 May 2004 22:37:29 -0000	1.1.2.2
  @@ -64,6 +64,9 @@
       def __init__(self, run):
           RunSpecific.__init__(self,run)
           
  +    def __repr__(self):
  +        return self.__class__.__name__
  +        
       #
       # Call a method called 'processEvent(event)', if it
       # is available on the sub-class (i.e. if needed)
  @@ -94,6 +97,8 @@
                   self._processModule(entity)
               elif  isinstance(entity,Project):
                   self._processProject(entity)
  +        else:
  +            self._processOtherEvent(event)
               
               
       #
  @@ -140,5 +145,16 @@
           if not callable(self.processProject):  return        
           log.debug('Process Project [' + `project` + '] using [' + `self` + ']')        
           self.processProject(project)
  +        
  +            
  +    #
  +    # Call a method called 'processOtherEvent(event)', if it
  +    # is available on the sub-class (i.e. if needed)
  +    #
  +    def _processOtherEvent(self,event):
  +        if not hasattr(self,'processOtherEvent'): return        
  +        if not callable(self.processOtherEvent):  return        
  +        log.debug('Process Event [' + `event` + '] using [' + `self` + ']')        
  +        self.processOtherEvent(event)
           
               
  
  
  
  1.5.2.4   +8 -1      gump/python/gump/core/gumprun.py
  
  Index: gumprun.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/core/gumprun.py,v
  retrieving revision 1.5.2.3
  retrieving revision 1.5.2.4
  diff -u -r1.5.2.3 -r1.5.2.4
  --- gumprun.py	18 May 2004 20:10:44 -0000	1.5.2.3
  +++ gumprun.py	18 May 2004 22:37:29 -0000	1.5.2.4
  @@ -403,7 +403,12 @@
       def setVerbose(self,verbose):
           self.verbose=verbose
   
  +    def setResolver(self,resolver):
  +        self.resolver=resolver        
   
  +    def getResolver(self):
  +        return self.resolver
  +        
   class RunSpecific:
       """
       
  @@ -577,14 +582,16 @@
       def dispatchEvent(self,event):
           log.debug('Dispatch Event : ' + `event`)        
           for actor in self.actors:
  -            log.debug('Dispatch Event : ' + `event` + ' to ' + `actor`)     
  +            #log.debug('Dispatch Event : ' + `event` + ' to ' + `actor`)     
               actor._processEvent(event)
  +        inspectGarbageCollection(`event`)
               
       def dispatchRequest(self,request):
           log.debug('Dispatch Request : ' + `request`)    
           for actor in self.actors:
               log.debug('Dispatch Request : ' + `request` + ' to ' + `actor`)       
               actor._processRequest(request)
  +        inspectGarbageCollection(`request`)
               
       def generateEvent(self,entity):
           self.dispatchEvent(EntityRunEvent(self, entity))
  
  
  
  No                   revision
  No                   revision
  1.1.2.2   +22 -3     gump/python/gump/stats/Attic/statistician.py
  
  Index: statistician.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/stats/Attic/statistician.py,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- statistician.py	18 May 2004 20:10:45 -0000	1.1.2.1
  +++ statistician.py	18 May 2004 22:37:30 -0000	1.1.2.2
  @@ -26,11 +26,30 @@
   from gump.model import *
   from gump.core.gumprun import *
   from gump.core.actor import *
  -
  +from gump.stats.statsdb import StatisticsDB
  +        
   
   class Statistician(AbstractRunActor):
       def __init__(self,run):
           
  -        AbstractRunActor.__init__(self,run)
  +        AbstractRunActor.__init__(self,run)        
  +        self.db=StatisticsDB()   
  +        
  +        
  +    def processOtherEvent(self,event):
  +            
  +        workspace=self.run.getWorkspace()        
           
  -  
  +        if isinstance(event,InitializeRunEvent):
  +            #
  +            # Load stats (and stash onto projects)
  +            #    
  +            self.db.loadStatistics(workspace)            
  +            self.db.sync()
  +        elif isinstance(event,FinalizeRunEvent):
  +          
  +            #
  +            # Update stats (and stash onto projects)
  +            #
  +            self.db.updateStatistics(workspace)            
  +            self.db.sync()
  \ No newline at end of file
  
  
  
  1.1.2.2   +1 -60     gump/python/gump/stats/Attic/statsdb.py
  
  Index: statsdb.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/stats/Attic/statsdb.py,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- statsdb.py	17 May 2004 23:45:51 -0000	1.1.2.1
  +++ statsdb.py	18 May 2004 22:37:30 -0000	1.1.2.2
  @@ -307,63 +307,4 @@
       def sync(self):
           if hasattr(self.db, 'sync'):
               self.db.sync()
  -                
  -class WorkspaceStatisticsGuru:                        
  -    """ Know it all for a workspace... """
  -    def __init__(self, workspace):
  -        self.workspace=workspace
  -        
  -        # Crunch the numbers...
  -        self.calculate()
  -        
  -    def calculate(self):
  -        self.modulesInWorkspace=len(self.workspace.getModules())
  -        self.projectsInWorkspace=len(self.workspace.getProjects())
  -        
  -        self.maxProjectsForAModule=1
  -        self.moduleWithMaxProjects=''
  -        
  -        for module in self.workspace.getModules():
  -            
  -            #
  -            # Calculate per project
  -            #
  -            projectCount=len(module.getProjects())
  -            if projectCount > self.maxProjectsForAModule:
  -                self.maxProjectsForAModule=projectCount
  -                self.moduleWithMaxProjects=module.getName()
  -                
  -        #
  -        # Average Projects Per Module
  -        #
  -        self.averageProjectsPerModule=	\
  -            float(self.projectsInWorkspace)/self.modulesInWorkspace
  -
  -class StatisticsGuru:
  -    """ Know it all ... """
  -    
  -    def __init__(self,workspace):
  -        self.workspace=workspace
  -        
  -        # One for the whole workspace
  -        self.wguru=WorkspaceStatisticsGuru(workspace)      
  -        
  -        # All Modules          
  -        self.modulesByElapsed=createOrderedList(workspace.getModules(),compareModulesByElapsed)
  -        self.modulesByProjectCount=createOrderedList(workspace.getModules(),compareModulesByProjectCount)
  -        self.modulesByTotalDependencies=createOrderedList(workspace.getModules(),compareModulesByDependencyCount)
  -        self.modulesByTotalDependees=createOrderedList(workspace.getModules(),compareModulesByDependeeCount)
  -        self.modulesByFOGFactor=createOrderedList(workspace.getModules(),compareModulesByFOGFactor)
  -        self.modulesByLastModified=createOrderedList(workspace.getModules(),compareModulesByLastModified)
  -        
  -        
  -        # All Projects                
  -        self.projectsByElapsed=createOrderedList(workspace.getProjects(),compareProjectsByElapsed)
  -        self.projectsByTotalDependencies=createOrderedList(workspace.getProjects(),compareProjectsByDependencyCount)
  -        self.projectsByTotalDependees=createOrderedList(workspace.getProjects(),compareProjectsByDependeeCount)
  -        self.projectsByFOGFactor=createOrderedList(workspace.getProjects(),compareProjectsByFOGFactor)
  -        self.projectsByLastModified=createOrderedList(workspace.getProjects(),compareProjectsByLastModified)
  -        self.projectsBySequenceInState=createOrderedList(workspace.getProjects(),compareProjectsBySequenceInState)
  -        self.projectsByDependencyDepth=createOrderedList(workspace.getProjects(),compareProjectsByDependencyDepth)
  -        self.projectsByTotalDependencyDepth=createOrderedList(workspace.getProjects(),compareProjectsByTotalDependencyDepth)
  -        
  +          
  \ No newline at end of file
  
  
  
  No                   revision
  No                   revision
  1.1.2.3   +3 -0      gump/python/gump/document/xdocs/Attic/resolver.py
  
  Index: resolver.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/document/xdocs/Attic/resolver.py,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- resolver.py	18 May 2004 20:10:44 -0000	1.1.2.2
  +++ resolver.py	18 May 2004 22:37:30 -0000	1.1.2.3
  @@ -45,6 +45,9 @@
   
   from gump.document.resolver import *
   
  +from gump.guru.stats import *
  +from gump.guru.xref import *
  +
   
   def getPathForObject(object,visited=None):
       if not visited:visited=[] 
  
  
  
  1.1.2.3   +149 -141  gump/python/gump/document/xdocs/Attic/documenter.py
  
  Index: documenter.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/document/xdocs/Attic/documenter.py,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- documenter.py	18 May 2004 20:10:44 -0000	1.1.2.2
  +++ documenter.py	18 May 2004 22:37:30 -0000	1.1.2.3
  @@ -69,13 +69,21 @@
           
           self.setResolver(XDocResolver(dirBase,urlBase))
           
  +    def processOtherEvent(self,event):
  +            
  +        workspace=self.run.getWorkspace()        
  +        
  +        if isinstance(event,InitializeRunEvent):
  +            self.prepareRun()
  +        elif isinstance(event,FinalizeRunEvent):
  +            self.documentRun()
       
       def prepareRun(self):
       
           log.debug('--- Prepare for Documenting Results')
   
  -        workspace=run.getWorkspace()
  -        gumpSet=run.getGumpSet()
  +        workspace=self.run.getWorkspace()
  +        gumpSet=self.run.getGumpSet()
       
           # Seed with default/site skins/etc.
           self.prepareXDoc(workspace)
  @@ -88,8 +96,8 @@
           # 3) update build log        
           # 4) sync biuld log
           
  -        verbose=run.getOptions().isVerbose()
  -        debug=run.getOptions().isDebug()
  +        verbose=self.run.getOptions().isVerbose()
  +        debug=self.run.getOptions().isDebug()
           
           if isinstance(entity,Workspace):
               pass
  @@ -104,25 +112,25 @@
           log.debug('--- Documenting Results')
   
           workspace=self.run.getWorkspace()
  -        gumpSet=run.getGumpSet()
  -        runOptions=run.getOptions()
  +        gumpSet=self.run.getGumpSet()
  +        runOptions=self.run.getOptions()
           
           # Document...
  -        self.documentEnvironment(run,workspace)    
  -        self.documentWorkspace(run,workspace,gumpSet)  
  -        self.documentRunOptions(run,workspace)    
  +        self.documentEnvironment(workspace)    
  +        self.documentWorkspace(workspace,gumpSet)  
  +        self.documentRunOptions(workspace)    
           
           # Document these (even if not a full build)
  -        self.documentStatistics(run,workspace,gumpSet)
  -        self.documentXRef(run,workspace,gumpSet)
  +        self.documentStatistics(workspace,gumpSet)
  +        self.documentXRef(workspace,gumpSet)
   
           #
  -        # Launch XDoc, if we aren't just leaving xdocs...
  +        # Launch Forrest, if we aren't just leaving xdocs...
           #
           ret=0
           
           if not runOptions.isXDocs():
  -            ret=self.executeXDoc(workspace)
  +            ret=self.executeForrest(workspace)
           else:
               ret=self.syncXDocs(workspace)
               
  @@ -132,22 +140,22 @@
       #
       # XDocing...
       def getXDocWorkDirectory(self,workspace):
  -        fdir=os.path.abspath(os.path.join(workspace.getBaseDirectory(),'XDoc-work'))
  +        fdir=os.path.abspath(os.path.join(workspace.getBaseDirectory(),'forrest-work'))
           return fdir
           
       def getXDocStagingDirectory(self,workspace):
           """ Staging Area for built output """
  -        fdir=os.path.abspath(os.path.join(workspace.getBaseDirectory(),'XDoc-staging'))
  +        fdir=os.path.abspath(os.path.join(workspace.getBaseDirectory(),'forrest-staging'))
           return fdir
           
       def getXDocTemplateDirectory(self):
           """ Template (XDoc skin/config) """
  -        fdir=os.path.abspath(os.path.join(dir.template,'XDoc'))
  +        fdir=os.path.abspath(os.path.join(dir.template,'forrest'))
           return fdir  
           
       def getXDocSiteTemplateDirectory(self):
           """ Site Template (XDoc skin/config tweaks) """    
  -        fdir=os.path.abspath(os.path.join(dir.template,'site-XDoc'))
  +        fdir=os.path.abspath(os.path.join(dir.template,'site-forrest'))
           return fdir  
       
       def prepareXDoc(self,workspace):   
  @@ -161,21 +169,21 @@
           #
           # First deleted the work tree (if exists), then ensure created
           #
  -        XDocWorkDir=self.getXDocWorkDirectory(workspace)
  -        wipeDirectoryTree(XDocWorkDir)
  +        xdocWorkDir=self.getXDocWorkDirectory(workspace)
  +        wipeDirectoryTree(xdocWorkDir)
                       
           # Sync in the defaults [i.e. cleans also]
  -        XDocTemplate=self.getXDocTemplateDirectory()   
  -        syncDirectories(	XDocTemplate,	\
  -                            XDocWorkDir,	\
  +        xdocTemplate=self.getXDocTemplateDirectory()   
  +        syncDirectories(	xdocTemplate,	\
  +                            xdocWorkDir,	\
                               workspace)    
                                       
           # Copy over the local site defaults (if any)        
  -        XDocSiteTemplate=self.getXDocSiteTemplateDirectory()  
  -        if os.path.exists(XDocSiteTemplate):
  +        xdocSiteTemplate=self.getXDocSiteTemplateDirectory()  
  +        if os.path.exists(xdocSiteTemplate):
               log.info('Prepare XDoc work with *site* template')            
  -            copyDirectories(XDocSiteTemplate,	\
  -                            XDocWorkDir,	\
  +            copyDirectories(xdocSiteTemplate,	\
  +                            xdocWorkDir,	\
                               workspace)                               
                                
           #    
  @@ -183,39 +191,39 @@
           #   
           wipeDirectoryTree(self.getXDocStagingDirectory(workspace))
                    
  -    def executeXDoc(self,workspace):
  +    def executeForrest(self,workspace):
           # The project tree
           xdocs=self.resolver.getDirectory(workspace)      
           
           # The three dirs, work, output (staging), public
  -        XDocWorkDir=self.getXDocWorkDirectory(workspace)
  +        xdocWorkDir=self.getXDocWorkDirectory(workspace)
           stagingDirectory=self.getXDocStagingDirectory(workspace)
           logDirectory=workspace.getLogDirectory()
           
           # Generate...        
  -        XDoc=Cmd('XDoc','XDoc',XDocWorkDir)
  +        forrest=Cmd('forrest','forrest',xdocWorkDir)
         
  -        XDoc.addPrefixedParameter('-D','java.awt.headless','true','=')
  -        XDoc.addPrefixedParameter('-D','project.content-dir',  \
  +        forrest.addPrefixedParameter('-D','java.awt.headless','true','=')
  +        forrest.addPrefixedParameter('-D','project.content-dir',  \
               '.', '=')
  -        XDoc.addPrefixedParameter('-D','project.site-dir',  \
  +        forrest.addPrefixedParameter('-D','project.site-dir',  \
               stagingDirectory, '=')
                   
           # Temporary:   
  -        # Too verbose ... XDoc.addParameter('-debug')
  -        #XDoc.addParameter('-verbose')
  +        # Too verbose ... forrest.addParameter('-debug')
  +        #forrest.addParameter('-verbose')
           
           # A sneak preview ... 
  -        work=CommandWorkItem(WORK_TYPE_DOCUMENT,XDoc)
  +        work=CommandWorkItem(WORK_TYPE_DOCUMENT,forrest)
           workspace.performedWork(work)
           
           #
           # Do the actual work...
           #
  -        XDocResult=execute(XDoc)
  +        forrestResult=execute(forrest)
       
           # Update Context    
  -        work=CommandWorkItem(WORK_TYPE_DOCUMENT,XDoc,XDocResult)
  +        work=CommandWorkItem(WORK_TYPE_DOCUMENT,forrest,forrestResult)
           workspace.performedWork(work)    
           
           # If ok move from staging to publish
  @@ -224,7 +232,7 @@
           # let's not shoot so high.
           #
           success=1
  -        if 1 or (XDocResult.state==CMD_STATE_SUCCESS):
  +        if 1 or (forrestResult.state==CMD_STATE_SUCCESS):
               try:
                   #
                   # Sync over public pages...
  @@ -238,8 +246,8 @@
                       wipeDirectoryTree(stagingDirectory)
                   
                       # Clean only if successful.
  -                    if  (XDocResult.state==CMD_STATE_SUCCESS):
  -                        wipeDirectoryTree(XDocWorkDir)
  +                    if  (forrestResult.state==CMD_STATE_SUCCESS):
  +                        wipeDirectoryTree(xdocWorkDir)
               except:        
                   log.error('--- Failed to staging->log sync and/or clean-up', exc_info=1)
                   success=0
  @@ -285,9 +293,9 @@
       #
       # Environment
       #      
  -    def documentEnvironment(self,run,workspace):
  +    def documentEnvironment(self,workspace):
           
  -        environment=run.getEnvironment()
  +        environment=self.run.getEnvironment()
              
           #
           # ----------------------------------------------------------------------
  @@ -314,8 +322,8 @@
           
           
           self.documentAnnotations(document,environment)        
  -        #self.documentFileList(run,document,environment,'Environment-level Files')        
  -        self.documentWorkList(run,document,environment,'Environment-level Work')
  +        #self.documentFileList(document,environment,'Environment-level Files')        
  +        self.documentWorkList(document,environment,'Environment-level Work')
        
           document.serialize()
                   
  @@ -323,9 +331,9 @@
       #
       # Options
       #      
  -    def documentRunOptions(self,run,workspace):
  +    def documentRunOptions(self,workspace):
           
  -        options=run.getOptions()
  +        options=self.run.getOptions()
              
           #
           # ----------------------------------------------------------------------
  @@ -357,7 +365,7 @@
       #
       # Model Pieces
       #      
  -    def documentWorkspace(self,run,workspace,gumpSet):
  +    def documentWorkspace(self,workspace,gumpSet):
           
           
           #
  @@ -381,7 +389,7 @@
               definitionTable.createEntry('Workspace Version', workspace.xml.version)
           if not workspace.xml.version or not workspace.xml.version == setting.ws_version:
               definitionTable.createEntry('Gump Preferred Workspace Version', setting.ws_version)
  -        definitionTable.createEntry('Java Command', run.getEnvironment().javaCommand)
  +        definitionTable.createEntry('Java Command', self.run.getEnvironment().javaCommand)
           definitionTable.createEntry('Python', str(sys.version))
           definitionTable.createEntry('Operating System (Name)', str(os.name))
           definitionTable.createEntry('@@DATE@@', str(default.date))
  @@ -389,7 +397,7 @@
           definitionTable.createEntry('Start Date/Time', workspace.getStartDateTime())
           definitionTable.createEntry('Timezone', workspace.timezone)
   
  -        javaproperties=run.getEnvironment().getJavaProperties()
  +        javaproperties=self.run.getEnvironment().getJavaProperties()
           for name in ['java.vendor', 'java.version', 'os.name', 'os.arch', 'os.version']:
               if name in javaproperties:
                   definitionTable.createEntry(name, javaproperties[name])	  
  @@ -468,22 +476,22 @@
           # x.write('<p><strong>Workspace Config:</strong> <link href=\'xml.txt\'>XML</link></p>')
           # x.write('<p><strong>RSS :</strong> <link href=\'index.rss\'>News Feed</link></p>')
           
  -        self.documentFileList(run,document,workspace,'Workspace-level Files')
  -        self.documentWorkList(run,document,workspace,'Workspace-level Work')
  +        self.documentFileList(document,workspace,'Workspace-level Files')
  +        self.documentWorkList(document,workspace,'Workspace-level Work')
        
           document.serialize()
       
           document=None
           
  -        self.documentRepositories(run,workspace,gumpSet)
  -        self.documentServers(run,workspace,gumpSet)
  -        self.documentTrackers(run,workspace,gumpSet)
  -        self.documentBuildLog(run,workspace,gumpSet)
  -        self.documentNotesLog(run,workspace,gumpSet)
  -        self.documentDiffsLog(run,workspace,gumpSet)
  -        self.documentProjects(run,workspace,gumpSet)
  -        self.documentModules(run,workspace,gumpSet)
  -        self.documentPackages(run,workspace,gumpSet)
  +        self.documentRepositories(workspace,gumpSet)
  +        self.documentServers(workspace,gumpSet)
  +        self.documentTrackers(workspace,gumpSet)
  +        self.documentBuildLog(workspace,gumpSet)
  +        self.documentNotesLog(workspace,gumpSet)
  +        self.documentDiffsLog(workspace,gumpSet)
  +        self.documentProjects(workspace,gumpSet)
  +        self.documentModules(workspace,gumpSet)
  +        self.documentPackages(workspace,gumpSet)
               
      
           #
  @@ -491,32 +499,32 @@
           #
           for repo in workspace.getRepositories():            
               if not gumpSet.inRepositories(repo): continue
  -            self.documentRepository(run,repo,workspace,gumpSet)
  +            self.documentRepository(repo,workspace,gumpSet)
               
           #
           # Document individual servers
           #
           for server in workspace.getServers():            
  -            self.documentServer(run,server,workspace,gumpSet)
  +            self.documentServer(server,workspace,gumpSet)
               
           #
           # Document individual trackers
           #
           for tracker in workspace.getTrackers():            
  -            self.documentTracker(run,tracker,workspace,gumpSet)
  +            self.documentTracker(tracker,workspace,gumpSet)
               
           #
           # Document individual modules
           #
           for module in workspace.getModules():
               if not gumpSet.inModuleSequence(module): continue  
  -            self.documentModule(run,module,workspace,gumpSet)
  +            self.documentModule(module,workspace,gumpSet)
               
           # Document workspace 'Text'
           document=XDocDocument('Context',self.resolver.getFile(workspace,'context.xml'))
           stream=StringIO.StringIO() 
  -        texter=TextDocumenter(stream)  
  -        texter.document(run)
  +        texter=TextDocumenter(self.run,stream)  
  +        texter.document()
           stream.seek(0)
           document.createSource(stream.read())
           stream.close()
  @@ -532,7 +540,7 @@
               stream.close()
               document.serialize()            
               
  -    def documentRepositories(self,run,workspace,gumpSet):        
  +    def documentRepositories(self,workspace,gumpSet):        
             
           #
           # ----------------------------------------------------------------------
  @@ -564,7 +572,7 @@
           
           document.serialize()
          
  -    def documentServers(self,run,workspace,gumpSet):   
  +    def documentServers(self,workspace,gumpSet):   
       
           #
           # ----------------------------------------------------------------------
  @@ -622,7 +630,7 @@
           
           document.serialize()
          
  -    def documentTrackers(self,run,workspace,gumpSet): 
  +    def documentTrackers(self,workspace,gumpSet): 
           #
           # ----------------------------------------------------------------------
           #
  @@ -650,7 +658,7 @@
           
           document.serialize()
          
  -    def documentBuildLog(self,run,workspace,gumpSet,realTime=0): 
  +    def documentBuildLog(self,workspace,gumpSet,realTime=0): 
           #
           # ----------------------------------------------------------------------
           #
  @@ -738,7 +746,7 @@
           
           document.serialize()
         
  -    def documentNotesLog(self,run,workspace,gumpSet): 
  +    def documentNotesLog(self,workspace,gumpSet): 
           #
           # ----------------------------------------------------------------------
           #
  @@ -786,7 +794,7 @@
           
           document.serialize()
              
  -    def documentDiffsLog(self,run,workspace,gumpSet): 
  +    def documentDiffsLog(self,workspace,gumpSet): 
           
           #
           # ----------------------------------------------------------------------
  @@ -838,7 +846,7 @@
           
           document.serialize()
              
  -    def documentProjects(self,run,workspace,gumpSet): 
  +    def documentProjects(self,workspace,gumpSet): 
       
           sortedProjectList=createOrderedList(gumpSet.getProjectSequence())
           
  @@ -979,7 +987,7 @@
                       
           document.serialize()
              
  -    def documentModules(self,run,workspace,gumpSet): 
  +    def documentModules(self,workspace,gumpSet): 
       
           sortedModuleList=createOrderedList(gumpSet.getModuleSequence())
        
  @@ -1138,7 +1146,7 @@
           
           document.serialize()
          
  -    def documentPackages(self,run,workspace,gumpSet):
  +    def documentPackages(self,workspace,gumpSet):
           
           #
           # ----------------------------------------------------------------------
  @@ -1195,7 +1203,7 @@
           document.serialize()
        
         
  -    def documentRepository(self,run,repo,workspace,gumpSet):
  +    def documentRepository(self,repo,workspace,gumpSet):
           
           document=XDocDocument( 'Repository : ' + repo.getName(),	\
                   self.resolver.getFile(repo))   
  @@ -1255,12 +1263,12 @@
       
           self.documentXML(document,repo)
           
  -        self.documentFileList(run,document,repo,'Repository-level Files')
  -        self.documentWorkList(run,document,repo,'Repository-level Work')
  +        self.documentFileList(document,repo,'Repository-level Files')
  +        self.documentWorkList(document,repo,'Repository-level Work')
   
           document.serialize()
         
  -    def documentServer(self,run,server,workspace,gumpSet):
  +    def documentServer(self,server,workspace,gumpSet):
           
           document=XDocDocument( 'Server : ' + server.getName(),	\
                   self.resolver.getFile(server))   
  @@ -1333,13 +1341,13 @@
               
           self.documentXML(document,server)
           
  -        self.documentFileList(run,document,server,'Server-level Files')
  -        self.documentWorkList(run,document,server,'Server-level Work')
  +        self.documentFileList(document,server,'Server-level Files')
  +        self.documentWorkList(document,server,'Server-level Work')
   
           document.serialize()
         
                
  -    def documentTracker(self,run,tracker,workspace,gumpSet):
  +    def documentTracker(self,tracker,workspace,gumpSet):
           
           document=XDocDocument( 'Tracker : ' + tracker.getName(),	\
                   self.resolver.getFile(tracker))   
  @@ -1384,13 +1392,13 @@
               
           self.documentXML(document,tracker)
           
  -        self.documentFileList(run,document,tracker,'Tracker-level Files')
  -        self.documentWorkList(run,document,tracker,'Tracker-level Work')
  +        self.documentFileList(document,tracker,'Tracker-level Files')
  +        self.documentWorkList(document,tracker,'Tracker-level Work')
   
           document.serialize()
         
           
  -    def documentModule(self,run,module,workspace,gumpSet):
  +    def documentModule(self,module,workspace,gumpSet):
           
           document=XDocDocument( 'Module : ' + module.getName(),	\
                   self.resolver.getFile(module))   
  @@ -1481,8 +1489,8 @@
               
           if not pcount: pallTable.createLine('None')
                              
  -        self.documentFileList(run,document,module,'Module-level Files')
  -        self.documentWorkList(run,document,module,'Module-level Work')
  +        self.documentFileList(document,module,'Module-level Files')
  +        self.documentWorkList(document,module,'Module-level Work')
           
           #addnSection=document.createSection('Additional Details')
           #addnPara=addnSection.createParagraph()
  @@ -1551,7 +1559,7 @@
           # Document Projects
           for project in module.getProjects():
               if not gumpSet.inProjectSequence(project): continue      
  -            self.documentProject(run,project,workspace,gumpSet)
  +            self.documentProject(project,workspace,gumpSet)
          
       # Document the module XML
       #    x=startXDoc(getModuleXMLDocument(workspace,modulename,mdir))
  @@ -1564,7 +1572,7 @@
       #    footerXDoc(x)
       #    endXDoc(x)
           
  -    def documentProject(self,run,project,workspace,gumpSet): 
  +    def documentProject(self,project,workspace,gumpSet): 
           
           document=XDocDocument('Project : ' + project.getName(),	\
                   self.resolver.getFile(project))       
  @@ -1688,8 +1696,8 @@
           if stats.last:
               statsTable.createEntry("Last Success: ", secsToDate(stats.last))
                   
  -        self.documentFileList(run,document,project,'Project-level Files')  
  -        self.documentWorkList(run,document,project,'Project-level Work')  
  +        self.documentFileList(document,project,'Project-level Files')  
  +        self.documentWorkList(document,project,'Project-level Work')  
                   
                   
           addnSection=document.createSection('Additional Details')
  @@ -1699,9 +1707,9 @@
                                   
           document.serialize()
           
  -        self.documentProjectDetails(run,project,workspace,gumpSet)
  +        self.documentProjectDetails(project,workspace,gumpSet)
           
  -    def documentProjectDetails(self,run,project,workspace,gumpSet):         
  +    def documentProjectDetails(self,project,workspace,gumpSet):         
           
           document=XDocDocument('Project Details : ' + project.getName(),	\
                       self.resolver.getFile(project, \
  @@ -1815,7 +1823,7 @@
        
               nagSection=document.createSection('Notification')
               nagSection.createParagraph('This is the notification mail that is to be sent')
  -            nagger=Notifier(run)
  +            nagger=Notifier(self.run)
               content=nagger.getNamedTypedContent(project)            
               nagSection.createSource(content)
                       
  @@ -2107,7 +2115,7 @@
                                   ' (' + '%02.2f' % summary.packagesPercentage + '%)'] )
           
         
  -    def documentWorkList(self,run,xdocNode,workable,description='Work'):
  +    def documentWorkList(self,xdocNode,workable,description='Work'):
           worklist=workable.getWorkList()
           
           if not worklist: return
  @@ -2148,7 +2156,7 @@
           # Go document the others...
           #
           for work in worklist:
  -            self.documentWork(run.getWorkspace(),work)
  +            self.documentWork(self.run.getWorkspace(),work)
               
       def documentWork(self,workspace,work):
           if isinstance(work,CommandWorkItem):    
  @@ -2301,7 +2309,7 @@
               wdocument.serialize()
               wdocument=None
             
  -    def documentFileList(self,run,xdocNode,holder,description='Files'):
  +    def documentFileList(self,xdocNode,holder,description='Files'):
           filelist=holder.getFileList()
           
           if not filelist: return
  @@ -2320,7 +2328,7 @@
           # Go document the others...
           #
           for fileReference in filelist:
  -            self.documentFile(run.getWorkspace(),fileReference)
  +            self.documentFile(self.run.getWorkspace(),fileReference)
               
       def documentFile(self,workspace,fileReference):
           
  @@ -2579,7 +2587,7 @@
       #
       # Statistics Pages
       #           
  -    def documentStatistics(self,run,workspace,gumpSet):
  +    def documentStatistics(self,workspace,gumpSet):
                   
           log.info('Generate Statistic Guru')
           stats=StatisticsGuru(workspace)
  @@ -2602,37 +2610,37 @@
           mstatsTable=mstatsSection.createTable(['Page','Description'])
                   
           # Modules By Elapsed Time
  -        mByE=self.documentModulesByElapsed(stats, run, workspace, gumpSet)                
  +        mByE=self.documentModulesByElapsed(stats, workspace, gumpSet)                
           mstatsRow=mstatsTable.createRow()
           mstatsRow.createData().createLink(mByE, 'Modules By Elapsed Time')
           mstatsRow.createData('Time spent working on this module.')
                   
           # Modules By Project #
  -        mByP=self.documentModulesByProjects(stats, run, workspace, gumpSet)           
  +        mByP=self.documentModulesByProjects(stats, workspace, gumpSet)           
           mstatsRow=mstatsTable.createRow()
           mstatsRow.createData().createLink(mByP, 'Modules By Project #')
           mstatsRow.createData('Number of projects within the module.')
           
           # Modules By Dependencies
  -        mByDep=self.documentModulesByDependencies(stats, run, workspace, gumpSet)           
  +        mByDep=self.documentModulesByDependencies(stats, workspace, gumpSet)           
           mstatsRow=mstatsTable.createRow()
           mstatsRow.createData().createLink(mByDep, 'Modules By Dependencies #')
           mstatsRow.createData('Number of dependencies within the module.')        
           
           # Modules By Dependees
  -        mByDepees=self.documentModulesByDependees(stats, run, workspace, gumpSet)           
  +        mByDepees=self.documentModulesByDependees(stats, workspace, gumpSet)           
           mstatsRow=mstatsTable.createRow()
           mstatsRow.createData().createLink(mByDepees, 'Modules By Dependees #')
           mstatsRow.createData('Number of dependees on the module.')
           
           # Modules By FOG Factor
  -        mByFOG=self.documentModulesByFOGFactor(stats, run, workspace, gumpSet)           
  +        mByFOG=self.documentModulesByFOGFactor(stats, workspace, gumpSet)           
           mstatsRow=mstatsTable.createRow()
           mstatsRow.createData().createLink(mByFOG, 'Modules By FOG Factor')
           mstatsRow.createData('Friend of Gump (FOG) Factor. A measure of dependability (for other Gumpers).')
                   
           # Modules By Last Modified
  -        mByLU=self.documentModulesByLastModified(stats, run, workspace, gumpSet)           
  +        mByLU=self.documentModulesByLastModified(stats, workspace, gumpSet)           
           mstatsRow=mstatsTable.createRow()
           mstatsRow.createData().createLink(mByLU, 'Modules By Last Modified')
           mstatsRow.createData('Best guess at last code change (in source control).')
  @@ -2641,50 +2649,50 @@
           pstatsTable=pstatsSection.createTable(['Page','Description'])
           
           # Projects By Elapsed
  -        pByE=self.documentProjectsByElapsed(stats, run, workspace, gumpSet)           
  +        pByE=self.documentProjectsByElapsed(stats, workspace, gumpSet)           
           pstatsRow=pstatsTable.createRow()
           pstatsRow.createData().createLink(pByE, 'Projects By Elapsed Time')
           pstatsRow.createData('Time spent working on this project.')
                                           
           # Projects By Dependencies
  -        pByDep=self.documentProjectsByDependencies(stats, run, workspace, gumpSet)           
  +        pByDep=self.documentProjectsByDependencies(stats, workspace, gumpSet)           
           pstatsRow=pstatsTable.createRow()
           pstatsRow.createData().createLink(pByDep, 'Projects By Dependencies')
           pstatsRow.createData('Number of dependencies for the project.')
                                           
           # Projects By Dependees
  -        pByDepees=self.documentProjectsByDependees(stats, run, workspace, gumpSet)           
  +        pByDepees=self.documentProjectsByDependees(stats, workspace, gumpSet)           
           pstatsRow=pstatsTable.createRow()
           pstatsRow.createData().createLink(pByDepees, 'Projects By Dependees')
           pstatsRow.createData('Number of dependees for the project.')
                                           
           # Projects By FOG Factor
  -        pByFOG=self.documentProjectsByFOGFactor(stats, run, workspace, gumpSet)           
  +        pByFOG=self.documentProjectsByFOGFactor(stats, workspace, gumpSet)           
           pstatsRow=pstatsTable.createRow()
           pstatsRow.createData().createLink(pByFOG, 'Projects By FOG Factor')
           pstatsRow.createData('Friend of Gump (FOG) Factor. A measure of dependability (for other Gumpers).')
                                           
           # Projects By Sequence
  -        pBySeq=self.documentProjectsBySequenceInState(stats, run, workspace, gumpSet)           
  +        pBySeq=self.documentProjectsBySequenceInState(stats, workspace, gumpSet)           
           pstatsRow=pstatsTable.createRow()
           pstatsRow.createData().createLink(pBySeq, 'Projects By Duration in state')
           pstatsRow.createData('Duration in current state.')
           
           # Projects By Dependency Depth
  -        pByDepD=self.documentProjectsByDependencyDepth(stats, run, workspace, gumpSet)           
  +        pByDepD=self.documentProjectsByDependencyDepth(stats, workspace, gumpSet)           
           pstatsRow=pstatsTable.createRow()
           pstatsRow.createData().createLink(pByDepD, 'Projects By Dependency Depth')
           pstatsRow.createData('Depth (in dependency tree) of the project.')
           
           # Projects By Dependency Depth
  -        pByTotDepD=self.documentProjectsByDependencyDepth(stats, run, workspace, gumpSet, 1)           
  +        pByTotDepD=self.documentProjectsByDependencyDepth(stats, workspace, gumpSet, 1)           
           pstatsRow=pstatsTable.createRow()
           pstatsRow.createData().createLink(pByTotDepD, 'Projects By Total Dependency Depth')
           pstatsRow.createData('Total Depth (sum of direct dependencies depths) of the project.')
           
           document.serialize()  
       
  -    def documentModulesByElapsed(self,stats,run,workspace,gumpSet):
  +    def documentModulesByElapsed(self,stats,workspace,gumpSet):
           fileName='module_elapsed'
           documentFile=self.resolver.getFile(stats,fileName)
           document=XDocDocument('Modules By Elapsed Time', documentFile)
  @@ -2700,7 +2708,7 @@
           
           return fileName + '.html'
       
  -    def documentModulesByProjects(self,stats,run,workspace,gumpSet):
  +    def documentModulesByProjects(self,stats,workspace,gumpSet):
           fileName='module_projects'
           documentFile=self.resolver.getFile(stats,fileName)
           document=XDocDocument('Modules By Project Count',	documentFile)
  @@ -2726,7 +2734,7 @@
           
           return fileName + '.html'
        
  -    def documentModulesByDependencies(self,stats,run,workspace,gumpSet):
  +    def documentModulesByDependencies(self,stats,workspace,gumpSet):
           fileName='module_dependencies'
           documentFile=self.resolver.getFile(stats,fileName)
           document=XDocDocument('Modules By Dependency Count', documentFile)
  @@ -2749,7 +2757,7 @@
           return fileName + '.html'
                
        
  -    def documentModulesByDependees(self,stats,run,workspace,gumpSet):
  +    def documentModulesByDependees(self,stats,workspace,gumpSet):
           fileName='module_dependees'
           documentFile=self.resolver.getFile(stats,fileName)    
           document=XDocDocument('Modules By Dependee Count', documentFile)
  @@ -2771,7 +2779,7 @@
           
           return fileName + '.html'
           
  -    def documentModulesByFOGFactor(self,stats,run,workspace,gumpSet):
  +    def documentModulesByFOGFactor(self,stats,workspace,gumpSet):
           fileName='module_fogfactor'
           documentFile=self.resolver.getFile(stats,fileName)    
           document=XDocDocument('Modules By FOG Factor',	documentFile)        
  @@ -2786,7 +2794,7 @@
           
           return fileName + '.html'
       
  -    def documentModulesByLastModified(self,stats,run,workspace,gumpSet):
  +    def documentModulesByLastModified(self,stats,workspace,gumpSet):
           fileName='module_modified'
           documentFile=self.resolver.getFile(stats,fileName)    
           document=XDocDocument('Modules By Last Modified', documentFile)        
  @@ -2807,7 +2815,7 @@
           
           return fileName + '.html'
       
  -    def documentProjectsByElapsed(self,stats,run,workspace,gumpSet):
  +    def documentProjectsByElapsed(self,stats,workspace,gumpSet):
           fileName='project_elapsed'
           documentFile=self.resolver.getFile(stats,fileName)    
           document=XDocDocument('Projects By Elapsed Time',	documentFile)
  @@ -2823,7 +2831,7 @@
           
           return fileName + '.html'
        
  -    def documentProjectsByDependencies(self,stats,run,workspace,gumpSet):
  +    def documentProjectsByDependencies(self,stats,workspace,gumpSet):
           fileName='project_dependencies'
           documentFile=self.resolver.getFile(stats,fileName)    
           document=XDocDocument('Projects By Dependency Count',	 documentFile)
  @@ -2847,7 +2855,7 @@
           return fileName + '.html'
                
        
  -    def documentProjectsByDependees(self,stats,run,workspace,gumpSet):
  +    def documentProjectsByDependees(self,stats,workspace,gumpSet):
           fileName='project_dependees'
           documentFile=self.resolver.getFile(stats,fileName)    
           document=XDocDocument('Projects By Dependee Count', documentFile)
  @@ -2870,7 +2878,7 @@
           
           return fileName + '.html'
           
  -    def documentProjectsByFOGFactor(self,stats,run,workspace,gumpSet):
  +    def documentProjectsByFOGFactor(self,stats,workspace,gumpSet):
           fileName='project_fogfactor'
           documentFile=self.resolver.getFile(stats,fileName)    
           document=XDocDocument('Projects By FOG Factor',	 documentFile)        
  @@ -2899,7 +2907,7 @@
           
           return fileName + '.html'
           
  -    def documentProjectsBySequenceInState(self,stats,run,workspace,gumpSet):
  +    def documentProjectsBySequenceInState(self,stats,workspace,gumpSet):
           fileName='project_durstate'
           documentFile=self.resolver.getFile(stats,fileName)    
           document=XDocDocument('Projects By Duration In State',	documentFile)        
  @@ -2918,7 +2926,7 @@
           
           return fileName + '.html'
   
  -    def documentProjectsByDependencyDepth(self,stats,run,workspace,gumpSet,total=0):
  +    def documentProjectsByDependencyDepth(self,stats,workspace,gumpSet,total=0):
           if total:
               title='Projects By Total Dependency Depth'
               fileName='project_totdepdepth'       
  @@ -2950,7 +2958,7 @@
       #
       # XRef Pages
       #           
  -    def documentXRef(self,run,workspace,gumpSet):
  +    def documentXRef(self,workspace,gumpSet):
                       
           log.info('Generate XRef Guru')
           xref=XRefGuru(workspace)    
  @@ -2967,19 +2975,19 @@
           mxrefTable=mxrefSection.createTable(['Page','Description'])
                   
           # Modules By Repository
  -        mByR=self.documentModulesByRepository(xref, run, workspace, gumpSet)                
  +        mByR=self.documentModulesByRepository(xref, workspace, gumpSet)                
           mxrefRow=mxrefTable.createRow()
           mxrefRow.createData().createLink(mByR, 'Modules By Repository')
           mxrefRow.createData('The repository that contains the module.')
           
           # Modules By Package
  -        mByP=self.documentModulesByPackage(xref, run, workspace, gumpSet)                
  +        mByP=self.documentModulesByPackage(xref, workspace, gumpSet)                
           mxrefRow=mxrefTable.createRow()
           mxrefRow.createData().createLink(mByP, 'Modules By Package')
           mxrefRow.createData('The package(s) contained in the module.')
           
           # Modules By Description
  -        mByD=self.documentModulesByDescription(xref, run, workspace, gumpSet)                
  +        mByD=self.documentModulesByDescription(xref, workspace, gumpSet)                
           mxrefRow=mxrefTable.createRow()
           mxrefRow.createData().createLink(mByD, 'Modules By Description')
           mxrefRow.createData('The descriptions for the module.')
  @@ -2991,38 +2999,38 @@
           pxrefTable=pxrefSection.createTable(['Page','Description'])
                           
           # Projects By Package
  -        pByP=self.documentProjectsByPackage(xref, run, workspace, gumpSet)                
  +        pByP=self.documentProjectsByPackage(xref, workspace, gumpSet)                
           pxrefRow=pxrefTable.createRow()
           pxrefRow.createData().createLink(pByP, 'Projects By Package')
           pxrefRow.createData('The package(s) contained in the project.')
           
           # Projects By Description
  -        pByD=self.documentProjectsByDescription(xref, run, workspace, gumpSet)                
  +        pByD=self.documentProjectsByDescription(xref, workspace, gumpSet)                
           pxrefRow=pxrefTable.createRow()
           pxrefRow.createData().createLink(pByD, 'Projects By Description')
           pxrefRow.createData('The descriptions for the project.')
                   
           # Projects By Outputs
  -        pByO=self.documentProjectsByOutput(xref, run, workspace, gumpSet)                
  +        pByO=self.documentProjectsByOutput(xref, workspace, gumpSet)                
           pxrefRow=pxrefTable.createRow()
           pxrefRow.createData().createLink(pByO, 'Projects By Output')
           pxrefRow.createData('The outputs for the project, e.g. jars.')
                
           # Projects By Output Ids
  -        pByOI=self.documentProjectsByOutputId(xref, run, workspace, gumpSet)                
  +        pByOI=self.documentProjectsByOutputId(xref, workspace, gumpSet)                
           pxrefRow=pxrefTable.createRow()
           pxrefRow.createData().createLink(pByOI, 'Projects By Output Identifier')
           pxrefRow.createData('The identifiers for outputs for the project, e.g. jars.')
                
           # Projects By Descriptor Location
  -        pByDL=self.documentProjectsByDescriptorLocation(xref, run, workspace, gumpSet)                
  +        pByDL=self.documentProjectsByDescriptorLocation(xref, workspace, gumpSet)                
           pxrefRow=pxrefTable.createRow()
           pxrefRow.createData().createLink(pByDL, 'Projects By Descriptor Location')
           pxrefRow.createData('The descriptor for the project.')
           
           document.serialize()
           
  -    def documentModulesByRepository(self,xref,run,workspace,gumpSet):
  +    def documentModulesByRepository(self,xref,workspace,gumpSet):
           fileName='repo_module'
           documentFile=self.resolver.getFile(xref,fileName)        
           document=XDocDocument('Modules By Repository',	documentFile)
  @@ -3053,7 +3061,7 @@
           
           return fileName + '.html'
           
  -    def documentModulesByPackage(self,xref,run,workspace,gumpSet):
  +    def documentModulesByPackage(self,xref,workspace,gumpSet):
           fileName='package_module'
           documentFile=self.resolver.getFile(xref,fileName)            
           document=XDocDocument('Modules By Package',	documentFile)
  @@ -3085,7 +3093,7 @@
           return fileName + '.html'
           
           
  -    def documentModulesByDescription(self,xref,run,workspace,gumpSet):
  +    def documentModulesByDescription(self,xref,workspace,gumpSet):
           fileName='description_module'
           documentFile=self.resolver.getFile(xref,fileName)            
           document=XDocDocument('Modules By Description',	documentFile)
  @@ -3116,7 +3124,7 @@
           
           return fileName + '.html'
           
  -    def documentProjectsByPackage(self,xref,run,workspace,gumpSet):
  +    def documentProjectsByPackage(self,xref,workspace,gumpSet):
           fileName='package_project'
           documentFile=self.resolver.getFile(xref,fileName)            
           document=XDocDocument('Projects By Package',	documentFile)
  @@ -3147,7 +3155,7 @@
           
           return fileName + '.html'
   
  -    def documentProjectsByDescription(self,xref,run,workspace,gumpSet):
  +    def documentProjectsByDescription(self,xref,workspace,gumpSet):
           fileName='description_project'
           documentFile=self.resolver.getFile(xref,fileName)            
           document=XDocDocument('Projects By Description',	documentFile)
  @@ -3179,7 +3187,7 @@
           return fileName + '.html'
    
           
  -    def documentProjectsByOutput(self,xref,run,workspace,gumpSet):
  +    def documentProjectsByOutput(self,xref,workspace,gumpSet):
           fileName='output_project'
           documentFile=self.resolver.getFile(xref,fileName)            
           document=XDocDocument('Projects By Outputs (e.g. Jars)',	documentFile)
  @@ -3210,7 +3218,7 @@
           
           return fileName + '.html'
           
  -    def documentProjectsByOutputId(self,xref,run,workspace,gumpSet):
  +    def documentProjectsByOutputId(self,xref,workspace,gumpSet):
           fileName='output_id_project'
           documentFile=self.resolver.getFile(xref,fileName)            
           document=XDocDocument('Projects By Output Identifiers',	documentFile)
  @@ -3241,7 +3249,7 @@
           
           return fileName + '.html'
           
  -    def documentProjectsByDescriptorLocation(self,xref,run,workspace,gumpSet):
  +    def documentProjectsByDescriptorLocation(self,xref,workspace,gumpSet):
           fileName='descriptor_project'
           documentFile=self.resolver.getFile(xref,fileName)            
           document=XDocDocument('Projects By Descriptor Location',	documentFile)
  
  
  
  No                   revision
  No                   revision
  1.1.2.2   +22 -6     gump/python/gump/build/Attic/maven.py
  
  Index: maven.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/build/Attic/maven.py,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- maven.py	17 May 2004 20:22:04 -0000	1.1.2.1
  +++ maven.py	18 May 2004 22:37:31 -0000	1.1.2.2
  @@ -113,6 +113,22 @@
                   else:                         
                       # For now, things are going good...
                       project.changeState(STATE_SUCCESS)
  +                    
  +        if wasBuilt:
  +            pomFile=self.locateMavenProjectFile(project) 
  +            if os.path.exists(pomFile):                               
  +                project.addDebug('Maven POM in: ' + pomFile) 
  +                catFileToFileHolder(project, pomFile, FILE_TYPE_CONFIG) 
  +                    
  +            projpFile=self.locateMavenProjectPropertiesFile(project) 
  +            if os.path.exists(projpFile):                                                
  +                project.addDebug('Maven project properties in: ' + projpFile)                
  +                catFileToFileHolder(project, pomFile, FILE_TYPE_CONFIG) 
  +            
  +            logFile=self.locateMavenLog(project)
  +            if os.path.exists(logFile):
  +                project.addDebug('Maven Log in: ' + logFile)                
  +                catFileToFileHolder(project, logFile, FILE_TYPE_LOG)                                
     
       #
       # Build an ANT command for this project
  @@ -256,17 +272,17 @@
   
           return propertiesFile
         
  -    def locateMavenLog(self):
  +    def locateMavenLog(self,project):
           """Return Maven log location"""  
  -        basedir = self.maven.getBaseDirectory() or self.getBaseDirectory()
  +        basedir = project.maven.getBaseDirectory() or project.getBaseDirectory()
           return os.path.abspath(os.path.join(basedir,'maven.log'))
         
  -    def locateMavenProjectPropertiesFile(self):
  +    def locateMavenProjectPropertiesFile(self,project):
           """Return Maven project properties file location""" 
  -        basedir = self.maven.getBaseDirectory() or self.getBaseDirectory()
  +        basedir = project.maven.getBaseDirectory() or project.getBaseDirectory()
           return os.path.abspath(os.path.join(basedir,'project.properties'))
           
  -    def locateMavenProjectFile(self):
  +    def locateMavenProjectFile(self,project):
           """Return Maven project file location"""      
  -        basedir = self.maven.getBaseDirectory() or self.getBaseDirectory()
  +        basedir = project.maven.getBaseDirectory() or project.getBaseDirectory()
           return os.path.abspath(os.path.join(basedir,'project.xml'))  
  
  
  
  1.1.2.3   +0 -17     gump/python/gump/build/Attic/builder.py
  
  Index: builder.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/build/Attic/builder.py,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- builder.py	17 May 2004 23:45:52 -0000	1.1.2.2
  +++ builder.py	18 May 2004 22:37:31 -0000	1.1.2.3
  @@ -397,23 +397,6 @@
                   project.addInfo('Project Reports in: ' + reportDir)
                   catDirectoryContentsToFileHolder(project, reportDir, FILE_TYPE_OUTPUT)
       
  -        # Maven generates a maven.log...
  -        if project.hasMaven() and not project.isPackaged():
  -            pomFile=project.locateMavenProjectFile() 
  -            if os.path.exists(pomFile):                               
  -                project.addDebug('Maven POM in: ' + pomFile) 
  -                catFileToFileHolder(project, pomFile, FILE_TYPE_CONFIG) 
  -                    
  -            projpFile=project.locateMavenProjectPropertiesFile() 
  -            if os.path.exists(projpFile):                                                
  -                project.addDebug('Maven project properties in: ' + projpFile)                
  -                catFileToFileHolder(project, pomFile, FILE_TYPE_CONFIG) 
  -            
  -            logFile=project.locateMavenLog()                                
  -            if os.path.exists(logFile):
  -                project.addDebug('Maven Log in: ' + logFile)                
  -                catFileToFileHolder(project, logFile, FILE_TYPE_LOG)
  -            
                           
       def performProjectPackageProcessing(self, project, stats):
           """Perform Package Processing Actions"""
  
  
  
  No                   revision
  No                   revision
  1.15.2.3  +2 -11     gump/python/gump/document/documenter.py
  
  Index: documenter.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/document/documenter.py,v
  retrieving revision 1.15.2.2
  retrieving revision 1.15.2.3
  diff -u -r1.15.2.2 -r1.15.2.3
  --- documenter.py	18 May 2004 20:10:45 -0000	1.15.2.2
  +++ documenter.py	18 May 2004 22:37:31 -0000	1.15.2.3
  @@ -44,16 +44,7 @@
           if not callable(self.prepareRun):  return        
           log.debug('Prepare to document run using [' + `self` + ']')        
           self.prepareRun()       
  -        
  -    #
  -    # Call a method called 'documentEntity(entity,run)'
  -    #
  -    def entity(self,entity):
  -        if not hasattr(self,'documentEntity'): return
  -        if not callable(self.documentEntity): return        
  -        log.debug('Document entity [' + `entity` + '] using [' + `self` + ']')        
  -        self.documentEntity(entity)
  -    
  +
       #
       # Call a method called 'documentRun(run)'
       #
  @@ -74,5 +65,5 @@
       def setResolver(self,resolver):
           self.resolver=resolver        
   
  -    def getResolver(self,resolver):
  +    def getResolver(self):
           return self.resolver
  
  
  
  No                   revision
  No                   revision
  1.5.2.3   +18 -16    gump/python/gump/document/text/documenter.py
  
  Index: documenter.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/document/text/documenter.py,v
  retrieving revision 1.5.2.2
  retrieving revision 1.5.2.3
  diff -u -r1.5.2.2 -r1.5.2.3
  --- documenter.py	18 May 2004 20:10:45 -0000	1.5.2.2
  +++ documenter.py	18 May 2004 22:37:31 -0000	1.5.2.3
  @@ -47,31 +47,33 @@
           self.output=output        
           self.setResolver(TextResolver(dirBase,urlBase))
           
  -    def documentEntity(self, entity, run):
           
  -        verbose=run.getOptions().isVerbose()
  -        debug=run.getOptions().isDebug()
  +    def processModule(self,module):
  +        verbose=self.run.getOptions().isVerbose()
  +        debug=self.run.getOptions().isDebug()
  +        self.documentModule('',entity,1,debug,verbose)       
  +         
  +    def processProject(self,project):
  +        verbose=self.run.getOptions().isVerbose()
  +        debug=self.run.getOptions().isDebug()
  +        self.documentModule('',project,1,debug,verbose)  
           
  -        if isinstance(entity,Workspace):
  -            pass
  -        elif isinstance(entity,Module):
  -            self.documentModule('',entity,1,debug,verbose)   
  -        elif  isinstance(entity,Project):
  -            self.documentProject('',entity,1,debug,verbose)        
  +        
  +            
       
  -    def documentRun(self, run):    
  +    def documentRun(self):    
           indent=' '
           
  -        workspace = run.getWorkspace()
  -        gumpSet = run.getGumpSet()
  -        gumpEnv = run.getEnvironment()
  +        workspace = self.run.getWorkspace()
  +        gumpSet = self.run.getGumpSet()
  +        gumpEnv = self.run.getEnvironment()
           
           #
           # 
           #
  -        quick=run.getOptions().isQuick()
  -        verbose=run.getOptions().isVerbose()
  -        debug=run.getOptions().isDebug()
  +        quick=self.run.getOptions().isQuick()
  +        verbose=self.run.getOptions().isVerbose()
  +        debug=self.run.getOptions().isDebug()
           
           #
           # Where to write this.
  
  
  

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