|
19 | 19 |
|
20 | 20 |
|
21 | 21 | def arg_parser(): # type: () -> argparse.ArgumentParser
|
22 |
| - parser = argparse.ArgumentParser(description='Reference executor for Common Workflow Language') |
| 22 | + parser = argparse.ArgumentParser( |
| 23 | + description='Reference executor for Common Workflow Language standards.') |
23 | 24 | parser.add_argument("--basedir", type=Text)
|
24 | 25 | parser.add_argument("--outdir", type=Text, default=os.path.abspath('.'),
|
25 | 26 | help="Output directory, default current directory")
|
26 | 27 |
|
27 |
| - parser.add_argument("--no-container", action="store_false", default=True, |
28 |
| - help="Do not execute jobs in a Docker container, even when specified by the CommandLineTool", |
29 |
| - dest="use_container") |
30 | 28 | parser.add_argument("--parallel", action="store_true", default=False,
|
31 | 29 | help="[experimental] Run jobs in parallel. "
|
32 | 30 | "Does not currently keep track of ResourceRequirements like the number of cores"
|
33 | 31 | "or memory and can overload this system")
|
34 |
| - parser.add_argument("--preserve-environment", type=Text, action="append", |
35 |
| - help="Preserve specific environment variable when running CommandLineTools. May be provided multiple times.", |
36 |
| - metavar="ENVVAR", |
37 |
| - default=["PATH"], |
| 32 | + envgroup = parser.add_mutually_exclusive_group() |
| 33 | + envgroup.add_argument("--preserve-environment", type=Text, action="append", |
| 34 | + help="Preserve specific environment variable when " |
| 35 | + "running CommandLineTools. May be provided multiple " |
| 36 | + "times.", metavar="ENVVAR", default=["PATH"], |
38 | 37 | dest="preserve_environment")
|
39 |
| - |
40 |
| - parser.add_argument("--preserve-entire-environment", action="store_true", |
41 |
| - help="Preserve entire parent environment when running CommandLineTools.", |
42 |
| - default=False, |
| 38 | + envgroup.add_argument("--preserve-entire-environment", action="store_true", |
| 39 | + help="Preserve all environment variable when running " |
| 40 | + "CommandLineTools.", default=False, |
43 | 41 | dest="preserve_entire_environment")
|
44 | 42 |
|
45 | 43 | exgroup = parser.add_mutually_exclusive_group()
|
@@ -154,10 +152,22 @@ def arg_parser(): # type: () -> argparse.ArgumentParser
|
154 | 152 | "timestamps to the errors, warnings, and "
|
155 | 153 | "notifications.")
|
156 | 154 | parser.add_argument("--js-console", action="store_true", help="Enable javascript console output")
|
157 |
| - parser.add_argument("--user-space-docker-cmd", |
| 155 | + dockergroup = parser.add_mutually_exclusive_group() |
| 156 | + dockergroup.add_argument("--user-space-docker-cmd", metavar="CMD", |
158 | 157 | help="(Linux/OS X only) Specify a user space docker "
|
159 | 158 | "command (like udocker or dx-docker) that will be "
|
160 | 159 | "used to call 'pull' and 'run'")
|
| 160 | + dockergroup.add_argument("--singularity", action="store_true", |
| 161 | + default=False, help="[experimental] Use " |
| 162 | + "Singularity runtime for running containers. " |
| 163 | + "Requires Singularity v2.3.2+ and Linux with kernel " |
| 164 | + "version v3.18+ or with overlayfs support " |
| 165 | + "backported.") |
| 166 | + dockergroup.add_argument("--no-container", action="store_false", |
| 167 | + default=True, help="Do not execute jobs in a " |
| 168 | + "Docker container, even when `DockerRequirement` " |
| 169 | + "is specified under `hints`.", |
| 170 | + dest="use_container") |
161 | 171 |
|
162 | 172 | dependency_resolvers_configuration_help = argparse.SUPPRESS
|
163 | 173 | dependencies_directory_help = argparse.SUPPRESS
|
@@ -237,8 +247,15 @@ def arg_parser(): # type: () -> argparse.ArgumentParser
|
237 | 247 | parser.add_argument("--overrides", type=str,
|
238 | 248 | default=None, help="Read process requirement overrides from file.")
|
239 | 249 |
|
240 |
| - parser.add_argument("workflow", type=Text, nargs="?", default=None) |
241 |
| - parser.add_argument("job_order", nargs=argparse.REMAINDER) |
| 250 | + parser.add_argument("workflow", type=Text, nargs="?", default=None, |
| 251 | + metavar='cwl_document', help="path or URL to a CWL Workflow, " |
| 252 | + "CommandLineTool, or ExpressionTool. If the `inputs_object` has a " |
| 253 | + "`cwl:tool` field indicating the path or URL to the cwl_document, " |
| 254 | + " then the `workflow` argument is optional.") |
| 255 | + parser.add_argument("job_order", nargs=argparse.REMAINDER, |
| 256 | + metavar='inputs_object', help="path or URL to a YAML or JSON " |
| 257 | + "formatted description of the required input values for the given " |
| 258 | + "`cwl_document`.") |
242 | 259 |
|
243 | 260 | return parser
|
244 | 261 |
|
|
0 commit comments