ajack 2004/03/12 08:10:39
Modified: python/gump/document forrest.py xdoc.py
python/gump/model stats.py
template/forrest/src/documentation/content/xdocs site.xml
python/gump engine.py
Log:
1) Allow 'TAB' not to be mapped to underscore
2) Create _fixes pages showing recent changes to success (with description)
3) Added description paragraph to _todos (the opposite of 2).
Revision Changes Path
1.102 +141 -8 gump/python/gump/document/forrest.py
Index: forrest.py
===================================================================
RCS file: /home/cvs/gump/python/gump/document/forrest.py,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -r1.101 -r1.102
--- forrest.py 12 Mar 2004 14:47:48 -0000 1.101
+++ forrest.py 12 Mar 2004 16:10:39 -0000 1.102
@@ -500,6 +500,9 @@
totalAffected=0
projectsSection=document.createSection('Projects with issues...')
+ projectsSection.createParagraph("""These are the project that need 'fixing'.
+This page helps Gumpmeisters (and others) locate the main areas to focus attention.
+The count of affected indicates relative importance of fixing this project.""")
projectsTable=projectsSection.createTable(['Name','Affected', \
'Dependees', \
'Duration\nin state','Project State'])
@@ -543,6 +546,66 @@
'Total Affected Projects: ' + str(totalAffected))
document.serialize()
+
+ #
+ # ----------------------------------------------------------------------
+ #
+ # project_fixes.xml -- Projects w/ fixes in build order
+ #
+ document=XDocDocument('Project Fixes', \
+ self.resolver.getFile(workspace,'project_fixes'))
+ self.documentSummary(document, workspace.getProjectSummary())
+
+ totalAffected=0
+
+ projectsSection=document.createSection('Projects with fixes...')
+ projectsSection.createParagraph("""These are the projects that were 'fixed'
(state changed to success) within %s runs.
+This page helps Gumpmeisters (and others) observe community progress.
+ """ % INSIGNIFICANT_DURATION)
+
+ projectsTable=projectsSection.createTable(['Name','Affected', \
+ 'Dependees', \
+ 'Duration\nin state','Project State'])
+ pcount=0
+ for project in sortedProjectList:
+ if not gumpSet.inProjectSequence(project): continue
+
+ if not project.getState()==STATE_SUCCESS or \
+ not project.getStats().sequenceInState < INSIGNIFICANT_DURATION:
+ continue
+
+ pcount+=1
+
+ #
+ # Determine the number of projects this module (or it's projects)
+ # cause not to be run.
+ #
+ affected=project.determineAffected()
+ totalAffected += affected
+
+ # How long been like this
+ seq=stats=project.getStats().sequenceInState
+
+ projectRow=projectsTable.createRow()
+ projectRow.createComment(project.getName())
+
+ self.insertLink(project,workspace,projectRow.createData())
+
+ projectRow.createData(affected)
+
+ projectRow.createData( project.getFullDependeeCount())
+
+ projectRow.createData(seq)
+
+ self.insertStateIcon(project,workspace,projectRow.createData())
+
+ if not pcount:
+ projectsTable.createLine('None')
+ else:
+ projectsSection.createParagraph(
+ 'Total Affected Projects: ' + str(totalAffected))
+
+ document.serialize()
#
# ----------------------------------------------------------------------
@@ -553,7 +616,10 @@
self.resolver.getFile(workspace,'module_todos'),)
self.documentSummary(document, workspace.getProjectSummary())
- modulesSection=document.createSection('Modules with TODOs')
+ modulesSection=document.createSection('Modules with TODOs')
+ modulesSection.createParagraph("""These are the modules that need 'fixing',
or contained projects that need fixing.
+This page helps Gumpmeisters (and others) locate the main areas to focus attention.
+The count of affected indicates relative importance of fixing this module.""")
modulesTable=modulesSection.createTable(['Name','Affected','Duration\nin
state','Module State', \
'Project State(s)','Elapsed'])
@@ -564,12 +630,79 @@
#
# Determine if there are todos, otherwise continue
#
- todos=0
+ mcount=0
for pair in module.aggregateStates():
if pair.state==STATE_FAILED:
- todos=1
+ mcount=1
+
+ if not mcount: continue
+
+ # Shown something...
+ mcount+=1
+
+ # Determine longest sequence in this (failed) state...
+ # for any of the projects
+ seq=0
+ for project in module.getProjects():
+ if project.getState()==STATE_FAILED:
+ stats=project.getStats()
+ if stats.sequenceInState > seq: seq = stats.sequenceInState
+
+ #
+ # Determine the number of projects this module (or it's projects)
+ # cause not to be run.
+ #
+ affected=module.determineAffected()
+
+ # Display
+ moduleRow=modulesTable.createRow()
+ moduleRow.createComment(module.getName())
+ self.insertLink(module,workspace,moduleRow.createData())
+
+ moduleRow.createData(affected)
+ moduleRow.createData(seq)
+
+ self.insertStateIcon(module,workspace,moduleRow.createData())
+ self.insertStateIcons(gumpSet,module,workspace,moduleRow.createData())
+
+ moduleRow.createData(secsToElapsedString(module.getElapsedSecs()))
+
+ if not mcount: modulesTable.createLine('None')
+
+ document.serialize()
+
+
+ #
+ # ----------------------------------------------------------------------
+ #
+ # module_fixes.xml
+ #
+ document=XDocDocument('Modules with fixes',
+ self.resolver.getFile(workspace,'module_fixes'),)
+ self.documentSummary(document, workspace.getProjectSummary())
+
+ modulesSection=document.createSection('Modules with fixes')
+ modulesSection.createParagraph("""These are the modules that were 'fixed'
(state changed to success), or contained projects that were fixed, within %s runs.
+This page helps Gumpmeisters (and others) observe community progress.
+ """ % INSIGNIFICANT_DURATION)
+
+ modulesTable=modulesSection.createTable(['Name','Affected','Duration\nin
state','Module State', \
+ 'Project State(s)','Elapsed'])
+
+ mcount=0
+ for module in sortedModuleList:
+ if not gumpSet.inModuleSequence(module): continue
+
+ #
+ # Determine if there are mcount, otherwise continue
+ #
+ mcount=0
+ for pair in module.aggregateStates():
+ if pair.state == STATE_SUCCESS \
+ and project.getStats().sequenceInState < INSIGNIFICANT_DURATION:
+ mcount=1
- if not todos: continue
+ if not mcount: continue
# Shown something...
mcount+=1
@@ -654,7 +787,7 @@
packaged=0
#
- # Determine if there are todos, otherwise continue
+ # Determine if there are packages, otherwise continue
#
if module.getState()==STATE_COMPLETE and \
module.getReason()==REASON_PACKAGE:
1.18 +6 -4 gump/python/gump/document/xdoc.py
Index: xdoc.py
===================================================================
RCS file: /home/cvs/gump/python/gump/document/xdoc.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- xdoc.py 12 Mar 2004 02:50:52 -0000 1.17
+++ xdoc.py 12 Mar 2004 16:10:39 -0000 1.18
@@ -85,10 +85,12 @@
UMAP=[]
i=0
while i<=255:
- if i == 10 or i==13 or (i >= 32 and i < 128):
+ # Allow TAB, LF, CR and 32 .. 128.
+ if i == 9 or i == 10 or i==13 or (i >= 32 and i < 128):
MAP.append(chr(i))
UMAP.append(unicode(chr(i)))
else:
+ # Map others to underscore
MAP.append(chr(95))
UMAP.append(unicode(chr(95)))
i+=1
1.12 +4 -4 gump/python/gump/model/stats.py
Index: stats.py
===================================================================
RCS file: /home/cvs/gump/python/gump/model/stats.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- stats.py 23 Feb 2004 20:55:08 -0000 1.11
+++ stats.py 12 Mar 2004 16:10:39 -0000 1.12
@@ -75,7 +75,7 @@
#
# Durations (in 'runs')
#
-
+INSIGNIFICANT_DURATION=5
SIGNIFICANT_DURATION=30
class Statistics:
1.21 +2 -0 gump/template/forrest/src/documentation/content/xdocs/site.xml
Index: site.xml
===================================================================
RCS file: /home/cvs/gump/template/forrest/src/documentation/content/xdocs/site.xml,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- site.xml 29 Feb 2004 19:16:19 -0000 1.20
+++ site.xml 12 Mar 2004 16:10:39 -0000 1.21
@@ -15,11 +15,13 @@
<work label="Projects" tab="home">
<index label="Issues" href="project_todos.html"/>
+ <index label="Fixes" href="project_fixes.html"/>
<index label="All" href="projects.html"/>
</work>
<work label="Modules" tab="home">
<index label="Issues" href="module_todos.html"/>
+ <index label="Fixes" href="module_fixes.html"/>
<index label="All" href="modules.html"/>
</work>
1.83 +1 -1 gump/python/gump/engine.py
Index: engine.py
===================================================================
RCS file: /home/cvs/gump/python/gump/engine.py,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -r1.82 -r1.83
--- engine.py 12 Mar 2004 14:21:00 -0000 1.82
+++ engine.py 12 Mar 2004 16:10:39 -0000 1.83
@@ -472,7 +472,7 @@
if stats:
if (not STATE_SUCCESS == stats.currentState) and \
not project.isVerboseOrDebug():
- if stats.sequenceInState > 5:
+ if stats.sequenceInState > INSIGNIFICANT_DURATION:
project.addInfo('Enable "debug" output, due to error.')
project.setDebug(1)
else:
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]