-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestwflowjson.py
32 lines (29 loc) · 1023 Bytes
/
testwflowjson.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env python
import click
import wflowbackend.backendtasks
import yadageschemas
@click.command()
@click.argument('workflow')
@click.argument('url')
@click.argument('results')
@click.option('-t','--toplevel', default = 'from-github/pseudocap')
@click.option('--cleanup/--no-cleanup',default = True)
def main(workflow,url,results,toplevel,cleanup):
ctx = {
'jobguid': 'dummyjobid',
'shipout_base':'shipout_dummy',
'inputURL':url,
'backend':'testbackend',
'entry_point':'wflowyadageworker.backendtasks:run_workflow',
'resultlist':results.split(','),
'workflow_json': yadageschemas.load(workflow, toplevel, 'yadage/workflow-schema')
}
wflowbackend.backendtasks.run_analysis_standalone(
wflowbackend.backendtasks.setupFromURL,
wflowbackend.backendtasks.dummy_onsuccess,
wflowbackend.backendtasks.cleanup if cleanup else lambda ctx: None,
ctx,
redislogging = False
)
if __name__ == '__main__':
main()