Source
arg_list=arg_list+key+'='+quoteit+str(the_args[count]['args'][key])+quoteit+comma
#pipeline['null'] ={'fill':{}, 'flag':{}, 'calibrate':{}, 'image':{}, 'analysis':{}}
#pipeline['fill']['name'] = ''
#pipeline['fill']['args'] = []
#pipeline['fill']['verify'] = ''
#pipeline['fill']['data'] = ''
#regression(pipeline)
import time
import os
from tasks import *
class regressionframe :
steps = ['fill', 'flag', 'calibrate', 'image', 'analysis']
title = "Regression test"
datarepos = ''
workdir = ''
fill = {}
flag = {}
calibrate = {}
image = {}
analysis = {}
def run(self, workdir='testing', verbose=True) :
try :
startdir = os.getcwd()
os.mkdir(self.workdir)
os.chdir(self.workdir)
startTime = time.time()
print self.title + ":" + workdir
for mystep in self.steps :
print "Processing step: " +mystep
beenrun = {}
for task in eval('self.'+mystep+"['tasks']") :
beenrun[task] = 0
for task in eval('self.'+mystep+"['tasks']") :
#print " "+ eval('self.'+mystep+"['"+task+"']")
mycommand = "self."+mystep+"['"+task+"']"
the_args = eval(mycommand)
arg_list = ''
thecommand=task+'('
if(the_args.has_key('args')) :
argscount = len(the_args['args'].keys())
argcount = 0
comma = ', '
for key in the_args['args'] :
argcount = argcount+1
if(argcount == argscount):
comma = ''
quoteit = ''
if type(the_args['args'][key]) == str :
quoteit = "'"
arg_list=arg_list+key+'='+quoteit+str(the_args['args'][key])+quoteit+comma
thecommand=thecommand+arg_list
elif(len(the_args.keys())>1) :
count = beenrun[task]
argscount = len(the_args[count]['args'].keys())
argcount = 0
comma = ', '
for key in the_args[count]['args'] :
argcount = argcount+1
if(argcount == argscount):
comma = ''
quoteit = ''