|
27 | 27 | from .pack import pack
|
28 | 28 | from .process import (shortname, Process, relocateOutputs, cleanIntermediate,
|
29 | 29 | scandeps, normalizeFilesDirs, use_custom_schema, use_standard_schema)
|
30 |
| -from .resolver import tool_resolver |
| 30 | +from .resolver import tool_resolver, ga4gh_tool_registries |
31 | 31 | from .stdfsaccess import StdFsAccess
|
32 | 32 |
|
33 | 33 | _logger = logging.getLogger("cwltool")
|
@@ -166,7 +166,16 @@ def arg_parser(): # type: () -> argparse.ArgumentParser
|
166 | 166 | help="Will be passed to `docker run` as the '--net' "
|
167 | 167 | "parameter. Implies '--enable-net'.")
|
168 | 168 |
|
169 |
| - parser.add_argument("--on-error", type=str, |
| 169 | + exgroup = parser.add_mutually_exclusive_group() |
| 170 | + exgroup.add_argument("--enable-ga4gh-tool-registry", action="store_true", help="Enable resolution using GA4GH tool registry API", |
| 171 | + dest="enable_ga4gh_tool_registry", default=True) |
| 172 | + exgroup.add_argument("--disable-ga4gh-tool-registry", action="store_false", help="Disable resolution using GA4GH tool registry API", |
| 173 | + dest="enable_ga4gh_tool_registry", default=True) |
| 174 | + |
| 175 | + parser.add_argument("--add-ga4gh-tool-registry", action="append", help="Add a GA4GH tool registry endpoint to use for resolution, default %s" % ga4gh_tool_registries, |
| 176 | + dest="ga4gh_tool_registries", default=[]) |
| 177 | + |
| 178 | + parser.add_argument("--on-error", |
170 | 179 | help="Desired workflow behavior when a step fails. One of 'stop' or 'continue'. "
|
171 | 180 | "Default is 'stop'.", default="stop", choices=("stop", "continue"))
|
172 | 181 |
|
@@ -642,6 +651,11 @@ def main(argsl=None, # type: List[str]
|
642 | 651 | if args.relax_path_checks:
|
643 | 652 | draft2tool.ACCEPTLIST_RE = draft2tool.ACCEPTLIST_EN_RELAXED_RE
|
644 | 653 |
|
| 654 | + if args.ga4gh_tool_registries: |
| 655 | + ga4gh_tool_registries[:] = args.ga4gh_tool_registries |
| 656 | + if not args.enable_ga4gh_tool_registry: |
| 657 | + del ga4gh_tool_registries[:] |
| 658 | + |
645 | 659 | if args.enable_ext:
|
646 | 660 | res = pkg_resources.resource_stream(__name__, 'extensions.yml')
|
647 | 661 | use_custom_schema("v1.0", "http://commonwl.org/cwltool", res.read())
|
|
0 commit comments