chip-gen 2.04 KB
Newer Older
1
2
3
4
5
6
#!/usr/bin/env python
from chipathlon.workflow import Workflow
import argparse

parser = argparse.ArgumentParser(description="Generates a workflow from a run, param & config file.")
parser.add_argument("-H", "--host", dest="host", required=True, help="Database host.")
7
8
parser.add_argument("-u", "--username", dest="username", required=True, help="Database user.")
parser.add_argument("-p", "--password", dest="password", required=True, help="Database user password.")
9
10
11
12
parser.add_argument("-d", "--dir", dest="dir", required=True, help="Directory name to generate files in.")
parser.add_argument("--param", dest="param", required=True, help="Path to param file to load.")
parser.add_argument("--conf", dest="config", required=True, help="Path to config file to load.")
parser.add_argument("--run", dest="run", required=True, help="Path to run file to load.")
13
14
parser.add_argument("--properties", dest="properties", required=True, help="Path to pegasus properties file.")
parser.add_argument("--execute-site", dest="execute_site", required=True, default="local", help="Target execute site.  Sites should be defined in configuration.")
15
parser.add_argument("--output-site", dest="output_site", required=True, default="local", help="Target output site.  Site should be defined in configuration.")
16

17
parser.add_argument("--no-save-db", dest="save_db", default=True, action="store_false", help="Whether or not to save results to the database.  Default: True")
18
19
20
21
22
23
24
25
26
parser.add_argument("--rewrite", dest="rewrite", default=False, action="store_true", help="If specified, don't load from the database, rewrite files.")
parser.add_argument("--debug", dest="debug", default=False, action="store_true", help="Print out more information while generating.")
args = parser.parse_args()

workflow = Workflow(
    args.dir,
    args.run,
    args.param,
    args.config,
27
    args.properties,
28
29
30
    args.host,
    args.username,
    args.password,
31
    execute_site=args.execute_site,
32
    output_site=args.output_site,
33
    save_db=args.save_db,
34
35
36
37
38
    rewrite=args.rewrite,
    debug=args.debug
)

workflow.generate()