ajack 2004/03/18 15:24:56
Modified: python/gump gumprun.py engine.py
Added: python/gump preview.py
Log:
1) Tinkered w/ preview (to show what would occur).
Used to "predict" how long a pattern might take (e.g. avalon-*)
Need to build this into the main engine, so we can actually follow the flow w/o
doing anything,
also go get results.xml to guestimate times.
2) Worked on nag overrides, I beleive they work now.
3) Made property based depends use inherit=NONE (not ALL)
4) Attempted to ma 'noclasspath' (and 'classpath' on property) work.
5) Some documentation logs/tweaks. No clue why LSD feels repeatedly one day stale.
Revision Changes Path
1.16 +31 -2 gump/python/gump/gumprun.py
Index: gumprun.py
===================================================================
RCS file: /home/cvs/gump/python/gump/gumprun.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- gumprun.py 16 Mar 2004 23:56:41 -0000 1.15
+++ gumprun.py 18 Mar 2004 23:24:56 -0000 1.16
@@ -318,8 +318,25 @@
def dump(self, indent=0, output=sys.stdout):
""" Display the contents of this object """
- output.write(getIndent(indent)+'GumpSet: ' + self.getProjectExpression() +
'\n')
-
+ i=getIndent(indent)
+ output.write(i+'Expression: ' + self.getProjectExpression() + '\n')
+
+ self.dumpList(self.projects,'Projects :',indent+1,output)
+ self.dumpList(self.projectSequence,'Projects :',indent+1,output)
+ self.dumpList(self.modules,'Modules :',indent+1,output)
+ self.dumpList(self.moduleSequence,'Module Sequence :',indent+1,output)
+ self.dumpList(self.repositories,'Repositories :',indent+1,output)
+
+ def dumpList(self,list,title,indent=0,output=sys.stdout):
+ """ Display a single list """
+ i=getIndent(indent)
+ output.write(i + title + '[' + str(len(list)) + '] : \n')
+ idx=0
+ for object in list:
+ idx+=1
+ output.write(i+str(idx)+': '+object.getName() + '\n')
+
+
class GumpRunOptions:
"""
@@ -438,3 +455,15 @@
def getOutputsRepository(self):
return self.outputsRepository
+
+ def dump(self, indent=0, output=sys.stdout):
+ """ Display the contents of this object """
+
+ i=getIndent(indent)
+ #output.write(i+'Expression: ' + self.gumpSet. + '\n')
+ output.write(i+'Gump Set:\n')
+
+ self.gumpSet.dump(indent+1,output)
+
+
+
1.92 +6 -9 gump/python/gump/engine.py
Index: engine.py
===================================================================
RCS file: /home/cvs/gump/python/gump/engine.py,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -r1.91 -r1.92
--- engine.py 17 Mar 2004 05:00:15 -0000 1.91
+++ engine.py 18 Mar 2004 23:24:56 -0000 1.92
@@ -77,7 +77,8 @@
return self.perform(run, GumpTaskList(['update','build','document']) )
def performIntegrate(self,run):
- return self.perform(run,
GumpTaskList(['update','build','document','outputs','notify']) )
+ return self.perform(run, \
+
GumpTaskList(['update','build','syndicate','generateResults','document','notify']) )
def performCheck(self,run):
return self.perform(run, GumpTaskList(['check','document']) )
@@ -768,8 +769,6 @@
projectNo+=1
-
-
"""
@@ -994,22 +993,20 @@
task=GumpTask(name,['preprocess',])
elif 'document'==name:
# Perform actual documentation
-
task=GumpTask(name,['preprocess','loadStatistics','prepareDocumentation','gatherResults'])
+ task=GumpTask(name, \
+
['preprocess','loadStatistics','prepareDocumentation','gatherResults','updateStatistics',])
elif 'notify'==name:
# Was once called 'nag'...
task=GumpTask(name,['preprocess','loadStatistics'])
elif 'syndicate'==name:
# Syndicate to news feeds
- task=GumpTask(name,['preprocess','loadStatistics'])
+
task=GumpTask(name,['preprocess','loadStatistics','prepareDocumentation'])
elif 'gatherResults'==name:
# Gather results.xml from other servers
task=GumpTask(name,['preprocess'])
elif 'generateResults'==name:
# Generate the results.xml for this server/workspace
- task=GumpTask(name,['preprocess','loadStatistics'])
- elif 'outputs'==name:
- # Publish the stuff out the door
-
task=GumpTask(name,['syndicate','generateResults','updateStatistics','notify'])
+
task=GumpTask(name,['preprocess','loadStatistics','prepareDocumentation'])
else:
raise RuntimeError, 'Unknown task name ['+name+']'
return task
1.1 gump/python/gump/preview.py
Index: preview.py
===================================================================
#!/usr/bin/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.
"""
This is one commandline entrypoint into Gump.
It loads the workspace, then updates the specified modules.
"""
import os.path
import os
import sys
import logging
from gump import log
from gump.gumprun import GumpRun, GumpRunOptions, GumpSet
from gump.utils.commandLine import handleArgv
from gump.model.loader import WorkspaceLoader
###############################################################################
# Initialize
###############################################################################
###############################################################################
# Functions
###############################################################################
# static void main()
if __name__=='__main__':
# Process command line
(args,options) = handleArgv(sys.argv)
ws=args[0]
ps=args[1]
result=0
# get parsed workspace definition
workspace=WorkspaceLoader().load(ws, options.isCache())
# The Run Details...
run=GumpRun(workspace,ps,options)
run.dump()
# bye!
sys.exit(result)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]