ajack 2004/02/26 10:47:34
Modified: python/gump engine.py config.py
python/gump/document forrest.py
Log:
1) Have _details explicitly state if not dependees (or dependencies)
2) If failed but no failed work, but nasties in annotaton, link to '#Annotations'.
3) Load Stats earlier, so we can process based off them.
Revision Changes Path
1.62 +33 -16 jakarta-gump/python/gump/engine.py
Index: engine.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/engine.py,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- engine.py 24 Feb 2004 22:14:49 -0000 1.61
+++ engine.py 26 Feb 2004 18:47:33 -0000 1.62
@@ -114,19 +114,24 @@
def integrate(self,run):
- logResourceUtilization('Before preprocess')
#
# Prepare the context
#
+ logResourceUtilization('Before preprocess')
self.preprocess(run)
-
-
- logResourceUtilization('Before update')
+
+ #
+ # Laod the statistics (so we can use them during
+ # other operations).
+ #
+ logResourceUtilization('Before load statistics')
+ self.loadStatistics(run)
#
# Checkout from source code repositories
#
+ logResourceUtilization('Before update')
self.update(run)
logResourceUtilization('Before build')
@@ -137,23 +142,24 @@
self.buildAll(run)
- logResourceUtilization('Before statistics')
+ if run.getGumpSet().isFull()
+ logResourceUtilization('Before statistics update')
- # Update [or load if not 'all'] Statistics
- self.updateStatistics(run)
+ # Update Statistics
+ self.updateStatistics(run)
- logResourceUtilization('Before syndicate')
#
# Provide a news feed (or few)
#
+ logResourceUtilization('Before syndicate')
syndicate(run)
- logResourceUtilization('Before document')
#
# Build HTML Result (via Forrest or ...)
#
+ logResourceUtilization('Before document')
documenter=run.getOptions().getDocumenter()
if documenter :
documenter.document(run)
@@ -168,11 +174,11 @@
log.info('Nag about failures... ')
- logResourceUtilization('Before nag')
-
+
#
# Nag about failures
#
+ logResourceUtilization('Before nag')
nag(run)
# Return an exit code based off success
@@ -671,27 +677,38 @@
"""
- def updateStatistics(self,run):
+ def loadStatistics(self,run):
+ """ Load Statistics into the run (to get current values) """
+ self.processStatistics(run,1)
+
+ def updateStatistics(self,run):
+ """ Update Statistics into the run (to set current values) """
+ self.processStatistics(run,0)
+
+ def processStatistics(self,run,load):
- log.debug('--- Updating Project Statistics')
+ if load:
+ log.debug('--- Loading Project Statistics')
+ else:
+ log.debug('--- Updating Project Statistics')
db=StatisticsDB()
workspace=run.getWorkspace()
- if run.getGumpSet().isFull():
+ if not load:
#
# Update stats (and stash onto projects)
#
db.updateStatistics(workspace)
+
+ db.sync()
else:
#
# Load stats (and stash onto projects)
#
db.loadStatistics(workspace)
-
- db.sync()
"""
1.14 +4 -4 jakarta-gump/python/gump/config.py
Index: config.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/config.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- config.py 30 Jan 2004 17:22:57 -0000 1.13
+++ config.py 26 Feb 2004 18:47:33 -0000 1.14
@@ -125,7 +125,7 @@
class setting:
"""Configuration of hardcoded settings"""
- version="2.0.2-alpha-0002"
+ version="2.0.2-alpha-0003"
ws_version="0.4"
ws_minimum_version="0.3"
1.85 +32 -10 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.84
retrieving revision 1.85
diff -u -r1.84 -r1.85
--- forrest.py 24 Feb 2004 22:49:10 -0000 1.84
+++ forrest.py 26 Feb 2004 18:47:33 -0000 1.85
@@ -1222,20 +1222,33 @@
dependencySection=document.createSection('Dependency')
- deps = self.documentDependenciesList(dependencySection, "Project
Dependencies", \
+ deps = 0
+ depens = 0
+ depees = 0
+
+ depens += self.documentDependenciesList(dependencySection, "Project
Dependencies", \
project.getDependencies(), 0, project)
- deps += self.documentDependenciesList(dependencySection, "Project
Dependees", \
+ depees += self.documentDependenciesList(dependencySection, "Project
Dependees", \
project.getDependees(), 1, project)
- deps += self.documentDependenciesList(dependencySection, "Full Project
Dependencies", \
+ depens += self.documentDependenciesList(dependencySection, "Full Project
Dependencies", \
project.getFullDependencies(), 0, project)
- deps += self.documentDependenciesList(dependencySection, "Full Project
Dependees", \
+ depees += self.documentDependenciesList(dependencySection, "Full Project
Dependees", \
project.getFullDependees(), 1, project)
+ deps = depees + depens
+
if not deps:
- dependencySection.createParagraph('No dependency information
available.')
+ dependencySection.createNote( \
+ """This project depends upon no others, and no others depend upon it.
This project is an island...""")
+ else:
+ if not depees:
+ dependencySection.createNote('No projects depend upon this
project.')
+ if not depens:
+ dependencySection.createNote('This project depends upon no
others.')
+
document.serialize()
@@ -1793,16 +1806,25 @@
def getLink(self,toObject,fromObject=None,state=0):
url=''
+ postfix=''
#
# If we are looking for what set the state, look at
- # work first. Pick the first not working...
+ # work first. Pick the first not working. If not found
+ # link to the annotations section.
#
if state and isinstance(toObject,Workable):
for work in toObject.getWorkList():
if not url:
if not work.state==STATE_SUCCESS:
url=getRelativeLocation(work,fromObject,'.html').serialize()
+
+ # This assumes that if it failed, but doesn't have work that
+ # mark's it as failed then something in the nasties must refer
+ # to the problem.
+ if not url:
+ if isinstance(toObject,Annotatable) and toObject.containsNasties()
+ postfix='#Annotations'
if not url:
if fromObject:
@@ -1810,7 +1832,7 @@
else:
url=self.resolver.getAbsoluteUrl(toObject)
- return url
+ return url + postfix
def insertStatePairIcon(self,xdocNode,toObject,fromObject):
pair=toObject.getStatePair()
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]