Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

a few minor stylistic changes

  • Loading branch information...
commit cb38482ce0d514046d522e8979614a0226bebffc 1 parent 71c05ba
Klaas Bosteels authored
Showing with 8 additions and 7 deletions.
  1. +8 −7 dumbo/core.py
15 dumbo/core.py
View
@@ -36,8 +36,8 @@ class Job(object):
def __init__(self):
self.iters = []
- self.deps = {}
- self.start = -1
+ self.deps = {} # will contain last dependency for each node
+ self.root = -1 # id for the job's root input
def additer(self, *args, **kwargs):
kwargs.setdefault('input', len(self.iters)-1)
@@ -68,9 +68,9 @@ def run(self):
addpathopt = getopt(opts, 'addpath', delete=False)
getpathopt = getopt(opts, 'getpath', delete=False)
- job_input = getopt(opts, 'input', delete=False)
- if not job_input:
- print >> sys.stderr, 'ERROR: No output path specified'
+ job_inputs = getopt(opts, 'input', delete=False)
+ if not job_inputs:
+ print >> sys.stderr, 'ERROR: No input path specified'
sys.exit(1)
outputopt = getopt(opts, 'output', delete=False)
@@ -87,7 +87,7 @@ def run(self):
if type(input) == int:
input = [input]
if input == [-1]:
- kwargs['input'] = job_input
+ kwargs['input'] = job_inputs
if delinputsopt and delinputsopt[0] == 'yes' and iter == self.deps[-1]:
newopts['delinputs'] = 'yes'
else:
@@ -128,6 +128,7 @@ def run(self):
if iter == self.deps[initer]:
fs.rm(job_output + "_pre" + str(initer + 1), opts)
+
class Program(object):
def __init__(self, prog, opts=[]):
@@ -379,7 +380,7 @@ def run(mapper,
opts += parseargs(sys.argv[1:])
if input is not None:
- inputopt = getopt(opts, 'input', delete=True)
+ getopt(opts, 'input', delete=True) # delete -input opts
for infile in input:
opts.append(('input', infile))
Please sign in to comment.
Something went wrong with that request. Please try again.