Skip to content

Commit

Permalink
many improvements in documentation tracking - create changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Fiers committed Jun 15, 2012
1 parent 96d7345 commit e8878c0
Show file tree
Hide file tree
Showing 12 changed files with 239 additions and 518 deletions.
5 changes: 4 additions & 1 deletion bin/moa
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ def run_3(wd, exitOnError=True):
sysConf.wd = wd

sysConf.pluginHandler.run('pre_create_job')

# create the job
job = moa.job.Job(wd)


# We should NOT depend on the following (if at all possible)
sysConf.job = job
job.defineOptions(parser)
Expand Down Expand Up @@ -159,6 +159,7 @@ def run_3(wd, exitOnError=True):
"containing a Moa job (try moa -h)") % command)

sysConf.pluginHandler.run('prepare')
job.run_hook('prepare')
sysConf.pluginHandler.run('pre%s' % command.capitalize())

#run the command function
Expand All @@ -169,6 +170,8 @@ def run_3(wd, exitOnError=True):
#run finish & post plugin hooks
sysConf.pluginHandler.run("post%s" % command.capitalize(),
reverse=True)

job.run_hook('finish')
sysConf.pluginHandler.run('finish', reverse=True)


Expand Down
9 changes: 5 additions & 4 deletions lib/python/moa/backend/ruff/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@

def ruffusExecutor(input, output, script, jobData):

if not sysConf.has_key('files_processed'):
sysConf.files_processed = []
sysConf.files_processed.append((input, output))
print input, '->', output
if not sysConf.actor.has_key('files_processed'):
sysConf.actor.files_processed = []

sysConf.actor.files_processed.append((input, output))

wd = jobData['wd']
tmpdir = os.path.realpath(os.path.abspath(
os.path.join(wd, '.moa', 'tmp')))
Expand Down
6 changes: 4 additions & 2 deletions lib/python/moa/backend/ruff/map.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,23 +82,25 @@ def generate_data_map():

fsDict = dict([(x, self.job.data.filesets[x]['files'][i])
for x in self.job.data.inputs + self.job.data.outputs])

thisJobData = copy.copy(self.jobData)
thisJobData.update(fsDict)
thisJobData['command'] = 'run'
runid = thisJobData.get('runid', "moa")

if self.job.data.inputs:
fips = self.job.data.inputs[0]
ffn = os.path.basename(fsDict[fips])
runid = ffn + '.' + runid

runid = 'r' + runid
thisJobData['runid'] = runid
thisJobData['command'] = 'run'

script = self.commands.render('run', thisJobData)
l.debug("Executing %s" % script)

yield([inputs + prereqs], outputs, script, thisJobData)
yield(inputs + prereqs, outputs, script, thisJobData)



Expand Down

0 comments on commit e8878c0

Please sign in to comment.