ajack 2004/03/30 11:19:34
Modified: python/gump/document forrest.py resolver.py
python/gump/model workspace.py
Log:
1) More work on --dated (but not ready for prime time)
2) Work on notesLog
Revision Changes Path
1.121 +13 -17 gump/python/gump/document/forrest.py
Index: forrest.py
===================================================================
RCS file: /home/cvs/gump/python/gump/document/forrest.py,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -r1.120 -r1.121
--- forrest.py 29 Mar 2004 21:19:45 -0000 1.120
+++ forrest.py 30 Mar 2004 19:19:34 -0000 1.121
@@ -141,11 +141,8 @@
#####################################################################
#
# Forresting...
- def getForrestParentDirectory(self,workspace):
- return workspace.getBaseDirectory()
-
- def getForrestDirectory(self,workspace):
- fdir=os.path.abspath(os.path.join(workspace.getBaseDirectory(),'forrest'))
+ def getForrestWorkDirectory(self,workspace):
+
fdir=os.path.abspath(os.path.join(workspace.getBaseDirectory(),'forrest-work'))
return fdir
def getForrestStagingDirectory(self,workspace):
@@ -172,7 +169,7 @@
#
# First deleted the work tree (if exists), then ensure created
#
- forrestWorkDir=self.getForrestDirectory(workspace)
+ forrestWorkDir=self.getForrestWorkDirectory(workspace)
wipeDirectoryTree(forrestWorkDir)
# Sync in the defaults [i.e. cleans also]
@@ -199,7 +196,7 @@
xdocs=self.resolver.getDirectory(workspace)
# The three dirs, work, output (staging), public
- forrestWorkDir=self.getForrestDirectory(workspace)
+ forrestWorkDir=self.getForrestWorkDirectory(workspace)
stagingDirectory=self.getForrestStagingDirectory(workspace)
logDirectory=workspace.getLogDirectory()
@@ -514,12 +511,11 @@
# notesLog.xml -- Notes log
#
document=XDocDocument('Annotations', \
- self.resolver.getFile(workspace,'notesLog'))
- self.documentSummary(document, workspace.getProjectSummary())
-
+ self.resolver.getFile(workspace,'notesLog'))
+
notesSection=document.createSection('Negative Annotations')
notesSection.createParagraph(
- """Entities with errors and warnings.""")
+ """This page displays entities with errors and/or warning
annotations.""")
ncount=0
for module in gumpSet.getModuleSequence():
@@ -527,13 +523,13 @@
moduleSection=None
- if not module.containsNasties():
+ if module.containsNasties():
moduleSection=document.createSection('Module : ' +
module.getName())
# Link to the module
self.insertLink(module,workspace,moduleSection.createParagraph())
- # Display the annotations
- self.documentAnnotations(moduleSection,project,1)
+ # Display the module annotations
+ self.documentAnnotations(moduleSection,module,1)
for project in module.getProjects():
if not gumpSet.inProjectSequence(project): continue
1.19 +5 -5 gump/python/gump/document/resolver.py
Index: resolver.py
===================================================================
RCS file: /home/cvs/gump/python/gump/document/resolver.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- resolver.py 30 Mar 2004 14:40:59 -0000 1.18
+++ resolver.py 30 Mar 2004 19:19:34 -0000 1.19
@@ -338,12 +338,12 @@
self.rootDir=rootDir
# Content
- contentSubPath=Path(['forrest','src','documentation','content'])
+ contentSubPath=Path(['forrest-work','src','documentation','content'])
self.makePath(contentSubPath,rootDir)
self.contentDir=concatenate(rootDir,contentSubPath.serialize())
# XDocs
- xdocsSubPath=Path(['forrest','src','documentation','content','xdocs'])
+ xdocsSubPath=Path(['forrest-work','src','documentation','content','xdocs'])
self.makePath(xdocsSubPath,rootDir)
self.xdocsDir=concatenate(rootDir,xdocsSubPath.serialize())
1.41 +11 -4 gump/python/gump/model/workspace.py
Index: workspace.py
===================================================================
RCS file: /home/cvs/gump/python/gump/model/workspace.py,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- workspace.py 30 Mar 2004 18:35:12 -0000 1.40
+++ workspace.py 30 Mar 2004 19:19:34 -0000 1.41
@@ -415,6 +415,11 @@
def completeDirectories(self):
+ if self.xml.basedir:
+ self.basedir=self.xml.basedir
+ else:
+ raise RuntimeError, "A workspace cannot operate without a 'basedir'."
+
# Construct tmp on demand
if not self.xml.tmpdir:
self.tmpdir=os.path.join(self.getBaseDirectory(),"tmp")
@@ -474,7 +479,10 @@
# Construct logdir on demand
self.logdir=os.path.join(self.logdir,date)
if not os.path.exists(self.logdir): os.makedirs(self.logdir)
-
+
+ # Extend Log URL
+ if not self.logurl,endswith('/'): self.logurl+='/'
+ self.logurl+=date
def addModule(self,module):
self.modules[module.getName()]=module
@@ -547,11 +555,10 @@
return self.xml.version
def getBaseDirectory(self):
- return self.xml.basedir
+ return self.basedir
def getLogDirectory(self):
- return self.xml.logdir or \
- os.path.abspath(os.path.join(self.getBaseDirectory(),'log'))
+ return self.logdir
def getLogUrl(self):
return self.logurl
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]