Added function to specify a specific workflow based on module name.
This commit is contained in:
parent
9242b88d07
commit
c862c8bb04
|
@ -46,6 +46,21 @@ def workflow_list():
|
||||||
|
|
||||||
return retval
|
return retval
|
||||||
|
|
||||||
|
def find_workflow(basename):
|
||||||
|
"""Searches for a workflow with a given filename."""
|
||||||
|
print "find_workflow"
|
||||||
|
|
||||||
|
# List all .py files that can contain workflow classes
|
||||||
|
wf_path = sys.path
|
||||||
|
wf_file = None
|
||||||
|
|
||||||
|
for dir in wf_path:
|
||||||
|
fn = os.path.join(dir, "%s.py" % basename)
|
||||||
|
if os.path.isfile(fn):
|
||||||
|
wf_file = fn
|
||||||
|
return _workflow_classes(basename)[0]
|
||||||
|
|
||||||
|
return None
|
||||||
|
|
||||||
class Workflow:
|
class Workflow:
|
||||||
"""Defines a workflow that contains a set of analysis stages.
|
"""Defines a workflow that contains a set of analysis stages.
|
||||||
|
|
Reference in New Issue