Skip to content
This repository has been archived by the owner on Mar 16, 2022. It is now read-only.

Commit

Permalink
Drop TaskType/URL
Browse files Browse the repository at this point in the history
  • Loading branch information
cdunn2001 committed Nov 27, 2016
1 parent 9981af6 commit bdd41db
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pypeflow/simple_pwatcher_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,13 +464,13 @@ def only_path(p):
return p.path
else:
return p
def PypeTask(inputs, outputs, TaskType=None, parameters=None, URL=None, wdir=None, name=None):
def PypeTask(inputs, outputs, parameters=None, wdir=None, name=None):
"""A slightly messy factory because we want to support both strings and PypeLocalFiles, for now.
This can alter dict values in inputs/outputs if they were not already PypeLocalFiles.
"""
if wdir is None:
wdir = find_work_dir([only_path(v) for v in outputs.values()])
this = _PypeTask(inputs, outputs, parameters, URL, wdir, name)
this = _PypeTask(inputs, outputs, parameters, wdir, name)
#basedir = os.path.basename(wdir)
basedir = this.name
if basedir in PRODUCERS:
Expand Down Expand Up @@ -508,15 +508,14 @@ def __call__(self, func):
return self
def __repr__(self):
return 'PypeTask({!r}, {!r}, {!r}, {!r})'.format(self.name, self.wdir, pprint.pformat(self.outputs), pprint.pformat(self.inputs))
def __init__(self, inputs, outputs, parameters=None, URL=None, wdir=None, name=None):
def __init__(self, inputs, outputs, parameters=None, wdir=None, name=None):
if parameters is None:
parameters = {}
if wdir is None:
wdir = parameters.get('wdir', name) # One of these must be a string!
if name is None:
name = os.path.relpath(wdir)
if URL is None:
URL = 'task://localhost/{}'.format(name)
URL = 'task://localhost/{}'.format(name)
self.inputs = inputs
self.outputs = outputs
self.parameters = parameters
Expand Down

0 comments on commit bdd41db

Please sign in to comment.