From 5d436d3b094dc3bec017a770c7fe04ce2f345267 Mon Sep 17 00:00:00 2001 From: Adam Novak Date: Wed, 1 May 2024 13:46:32 -0400 Subject: [PATCH] Fix WDL option spelling and tolerate Cromwell-isms (#4906) * Fix WDL option spelling and tolerate Cromwell-isms * Linting. * Satisfy MyPy more (new MyPy?) --------- Co-authored-by: DailyDreaming Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- docs/wdl/developing.rst | 2 +- docs/wdl/running.rst | 11 +++++++---- src/toil/common.py | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/wdl/developing.rst b/docs/wdl/developing.rst index 9bae8111e7..6f4b988d9f 100644 --- a/docs/wdl/developing.rst +++ b/docs/wdl/developing.rst @@ -39,7 +39,7 @@ Cromwell:: you can instead run with ``toil-wdl-runner``:: - toil-wdl-runner myWorkflow.wdl --inputs myWorkflow_inputs.json + toil-wdl-runner myWorkflow.wdl --input myWorkflow_inputs.json .. _`official WDL tutorials`: https://wdl-docs.readthedocs.io/en/stable/ .. _`executing your workflow`: https://wdl-docs.readthedocs.io/en/stable/WDL/execute/ diff --git a/docs/wdl/running.rst b/docs/wdl/running.rst index 46b0242b9a..6274a68f32 100644 --- a/docs/wdl/running.rst +++ b/docs/wdl/running.rst @@ -24,15 +24,18 @@ Instead of running a workflow with Cromwell:: You can run the workflow with ``toil-wdl-runner``:: - toil-wdl-runner myWorkflow.wdl --inputs myWorkflow_inputs.json + toil-wdl-runner myWorkflow.wdl --input myWorkflow_inputs.json + +(We're here running Toil with ``--input``, but it can also accept the +Cromwell-style ``--inputs``.) This will default to executing on the current machine, with a job store in an automatically determined temporary location, but you can add a few Toil options to use other Toil-supported batch systems, such as Kubernetes:: - toil-wdl-runner --jobStore aws:us-west-2:wdl-job-store --batchSystem kubernetes myWorkflow.wdl --inputs myWorkflow_inputs.json + toil-wdl-runner --jobStore aws:us-west-2:wdl-job-store --batchSystem kubernetes myWorkflow.wdl --input myWorkflow_inputs.json -For Toil, the ``--inputs`` is optional, and inputs can be passed as a positional +For Toil, the ``--input`` is optional, and inputs can be passed as a positional argument:: toil-wdl-runner myWorkflow.wdl myWorkflow_inputs.json @@ -58,7 +61,7 @@ directory. ``-m`` or ``--outputFile``: Specifies a JSON file name or URI to save workflow output values at. Defaults to standard output. -``-i`` or ``--input``: Alternative to the positional argument for the +``-i``, ``--input``, or ``--inputs``: Alternative to the positional argument for the input JSON file, for compatibility with other WDL runners. ``--outputDialect``: Specifies an output format dialect. Can be diff --git a/src/toil/common.py b/src/toil/common.py index f50f6d7263..6180b031e0 100644 --- a/src/toil/common.py +++ b/src/toil/common.py @@ -713,7 +713,7 @@ def check_arguments(typ: str) -> None: help="WDL document URI") parser.add_argument("inputs_uri", type=str, nargs='?', help="WDL input JSON URI") - parser.add_argument("--input", "-i", dest="inputs_uri", type=str, + parser.add_argument("--input", "--inputs", "-i", dest="inputs_uri", type=str, help="WDL input JSON URI") check_arguments(typ="wdl")