Skip to content

Commit 8e0b646

Browse files
committed
--help cleanup
1 parent f281ea7 commit 8e0b646

File tree

1 file changed

+49
-35
lines changed

1 file changed

+49
-35
lines changed

cwltool/argparser.py

Lines changed: 49 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@
2626

2727
def arg_parser() -> argparse.ArgumentParser:
2828
parser = argparse.ArgumentParser(
29-
description="Reference executor for Common Workflow Language standards."
29+
description="Reference executor for Common Workflow Language standards. "
30+
"Not for production use."
3031
)
3132
parser.add_argument("--basedir", type=str)
3233
parser.add_argument(
3334
"--outdir",
3435
type=str,
3536
default=os.path.abspath("."),
36-
help="Output directory, default current directory",
37+
help="Output directory. The default is the current directory.",
3738
)
3839

3940
parser.add_argument(
@@ -47,17 +48,18 @@ def arg_parser() -> argparse.ArgumentParser:
4748
"--preserve-environment",
4849
type=str,
4950
action="append",
50-
help="Preserve specific environment variable when "
51-
"running CommandLineTools. May be provided multiple "
52-
"times.",
51+
help="Preserve specific environment variable when running "
52+
"CommandLineTools without a software container. May be provided "
53+
"multiple times. The default is to preserve only the PATH.",
5354
metavar="ENVVAR",
5455
default=["PATH"],
5556
dest="preserve_environment",
5657
)
5758
envgroup.add_argument(
5859
"--preserve-entire-environment",
5960
action="store_true",
60-
help="Preserve all environment variable when running " "CommandLineTools.",
61+
help="Preserve all environment variables when running CommandLineTools "
62+
"without a software container.",
6163
default=False,
6264
dest="preserve_entire_environment",
6365
)
@@ -82,8 +84,8 @@ def arg_parser() -> argparse.ArgumentParser:
8284
cidgroup = parser.add_argument_group(
8385
"Options for recording the Docker container identifier into a file."
8486
)
85-
# Disabled as containerid is now saved by default
8687
cidgroup.add_argument(
88+
# Disabled as containerid is now saved by default
8789
"--record-container-id",
8890
action="store_true",
8991
default=False,
@@ -94,7 +96,7 @@ def arg_parser() -> argparse.ArgumentParser:
9496
cidgroup.add_argument(
9597
"--cidfile-dir",
9698
type=str,
97-
help="Store the Docker " "container ID into a file in the specified directory.",
99+
help="Store the Docker container ID into a file in the specified " "directory.",
98100
default=None,
99101
dest="cidfile_dir",
100102
)
@@ -134,7 +136,9 @@ def arg_parser() -> argparse.ArgumentParser:
134136
"--cachedir",
135137
type=str,
136138
default="",
137-
help="Directory to cache intermediate workflow outputs to avoid recomputing steps.",
139+
help="Directory to cache intermediate workflow outputs to avoid "
140+
"recomputing steps. Can be very helpful in the development and "
141+
"troubleshooting of CWL documents.",
138142
)
139143

140144
exgroup = parser.add_mutually_exclusive_group()
@@ -179,7 +183,8 @@ def arg_parser() -> argparse.ArgumentParser:
179183
action="store_const",
180184
const="copy",
181185
default="move",
182-
help="Copy output files to the workflow output directory, don't delete intermediate output directories.",
186+
help="Copy output files to the workflow output directory and don't "
187+
"delete intermediate output directories.",
183188
dest="move_outputs",
184189
)
185190

@@ -202,19 +207,21 @@ def arg_parser() -> argparse.ArgumentParser:
202207

203208
parser.add_argument(
204209
"--rdf-serializer",
205-
help="Output RDF serialization format used by --print-rdf (one of turtle (default), n3, nt, xml)",
210+
help="Output RDF serialization format used by --print-rdf (one of "
211+
"turtle (default), n3, nt, xml)",
206212
default="turtle",
207213
)
208214

209215
parser.add_argument(
210216
"--eval-timeout",
211-
help="Time to wait for a Javascript expression to evaluate before giving an error, default 20s.",
217+
help="Time to wait for a Javascript expression to evaluate before giving "
218+
"an error, default 20s.",
212219
type=float,
213220
default=20,
214221
)
215222

216223
provgroup = parser.add_argument_group(
217-
"Options for recording provenance " "information of the execution"
224+
"Options for recording provenance information of the execution"
218225
)
219226
provgroup.add_argument(
220227
"--provenance",
@@ -316,7 +323,8 @@ def arg_parser() -> argparse.ArgumentParser:
316323
exgroup.add_argument(
317324
"--print-subgraph",
318325
action="store_true",
319-
help="Print workflow subgraph that will execute " "(can combine with --target)",
326+
help="Print workflow subgraph that will execute. Can combined with "
327+
"--target.",
320328
)
321329
exgroup.add_argument(
322330
"--print-targets", action="store_true", help="Print targets (output parameters)"
@@ -381,7 +389,7 @@ def arg_parser() -> argparse.ArgumentParser:
381389
parser.add_argument(
382390
"--timestamps",
383391
action="store_true",
384-
help="Add " "timestamps to the errors, warnings, and " "notifications.",
392+
help="Add timestamps to the errors, warnings, and notifications.",
385393
)
386394
parser.add_argument(
387395
"--js-console", action="store_true", help="Enable javascript console output"
@@ -394,7 +402,7 @@ def arg_parser() -> argparse.ArgumentParser:
394402
parser.add_argument(
395403
"--js-hint-options-file",
396404
type=str,
397-
help="File of options to pass to jshint."
405+
help="File of options to pass to jshint. "
398406
'This includes the added option "includewarnings". ',
399407
)
400408
dockergroup = parser.add_mutually_exclusive_group()
@@ -438,11 +446,14 @@ def arg_parser() -> argparse.ArgumentParser:
438446
conda_dependencies = argparse.SUPPRESS
439447

440448
if SOFTWARE_REQUIREMENTS_ENABLED:
441-
dependency_resolvers_configuration_help = "Dependency resolver configuration file describing how to adapt 'SoftwareRequirement' packages to current system."
449+
dependency_resolvers_configuration_help = "Dependency resolver "
450+
"configuration file describing how to adapt 'SoftwareRequirement' "
451+
"packages to current system."
442452
dependencies_directory_help = (
443453
"Defaut root directory used by dependency resolvers configuration."
444454
)
445-
use_biocontainers_help = "Use biocontainers for tools without an explicitly annotated Docker container."
455+
use_biocontainers_help = "Use biocontainers for tools without an "
456+
"explicitly annotated Docker container."
446457
conda_dependencies = (
447458
"Short cut to use Conda to resolve 'SoftwareRequirement' packages."
448459
)
@@ -483,14 +494,15 @@ def arg_parser() -> argparse.ArgumentParser:
483494
parser.add_argument(
484495
"--enable-dev",
485496
action="store_true",
486-
help="Enable loading and running development versions " "of CWL spec.",
497+
help="Enable loading and running unofficial development versions of "
498+
"the CWL standards.",
487499
default=False,
488500
)
489501

490502
parser.add_argument(
491503
"--enable-ext",
492504
action="store_true",
493-
help="Enable loading and running cwltool extensions " "to CWL spec.",
505+
help="Enable loading and running 'cwltool:' extensions to the CWL standards.",
494506
default=False,
495507
)
496508

@@ -511,7 +523,8 @@ def arg_parser() -> argparse.ArgumentParser:
511523

512524
parser.add_argument(
513525
"--default-container",
514-
help="Specify a default docker container that will be used if the workflow fails to specify one.",
526+
help="Specify a default software container to use for any "
527+
"CommandLineTool without a DockerRequirement.",
515528
)
516529
parser.add_argument(
517530
"--no-match-user",
@@ -521,8 +534,8 @@ def arg_parser() -> argparse.ArgumentParser:
521534
parser.add_argument(
522535
"--custom-net",
523536
type=str,
524-
help="Passed to `docker run` as the '--net' "
525-
"parameter when NetworkAccess is true.",
537+
help="Passed to `docker run` as the '--net' parameter when "
538+
"NetworkAccess is true, which is its default setting.",
526539
)
527540
parser.add_argument(
528541
"--disable-validate",
@@ -536,14 +549,14 @@ def arg_parser() -> argparse.ArgumentParser:
536549
exgroup.add_argument(
537550
"--enable-ga4gh-tool-registry",
538551
action="store_true",
539-
help="Enable resolution using GA4GH tool registry API",
552+
help="Enable tool resolution using GA4GH tool registry API",
540553
dest="enable_ga4gh_tool_registry",
541554
default=True,
542555
)
543556
exgroup.add_argument(
544557
"--disable-ga4gh-tool-registry",
545558
action="store_false",
546-
help="Disable resolution using GA4GH tool registry API",
559+
help="Disable tool resolution using GA4GH tool registry API",
547560
dest="enable_ga4gh_tool_registry",
548561
default=True,
549562
)
@@ -559,8 +572,9 @@ def arg_parser() -> argparse.ArgumentParser:
559572

560573
parser.add_argument(
561574
"--on-error",
562-
help="Desired workflow behavior when a step fails. One of 'stop' (do not submit any more steps) or "
563-
"'continue' (may submit other steps that are not downstream from the error). Default is 'stop'.",
575+
help="Desired workflow behavior when a step fails. One of 'stop' (do "
576+
"not submit any more steps) or 'continue' (may submit other steps that "
577+
"are not downstream from the error). Default is 'stop'.",
564578
default="stop",
565579
choices=("stop", "continue"),
566580
)
@@ -596,14 +610,14 @@ def arg_parser() -> argparse.ArgumentParser:
596610
"--force-docker-pull",
597611
action="store_true",
598612
default=False,
599-
help="Pull latest docker image even if" " it is locally present",
613+
help="Pull latest software container image even if it is locally present",
600614
dest="force_docker_pull",
601615
)
602616
parser.add_argument(
603617
"--no-read-only",
604618
action="store_true",
605619
default=False,
606-
help="Do not set root directory in the" " container as read-only",
620+
help="Do not set root directory in the container as read-only",
607621
dest="no_read_only",
608622
)
609623

@@ -618,17 +632,17 @@ def arg_parser() -> argparse.ArgumentParser:
618632
"--target",
619633
"-t",
620634
action="append",
621-
help="Only execute steps that contribute to "
622-
"listed targets (can provide more than once).",
635+
help="Only execute steps that contribute to listed targets (can be "
636+
"provided more than once).",
623637
)
624638

625639
parser.add_argument(
626640
"--mpi-config-file",
627641
type=str,
628642
default=None,
629-
help="Platform specific configuration for MPI (parallel "
630-
"launcher, its flag etc). See README section 'Running MPI-"
631-
"based tools' for details of the format.",
643+
help="Platform specific configuration for MPI (parallel launcher, its "
644+
"flag etc). See README section 'Running MPI-based tools' for details "
645+
"of the format.",
632646
)
633647

634648
parser.add_argument(
@@ -640,7 +654,7 @@ def arg_parser() -> argparse.ArgumentParser:
640654
help="path or URL to a CWL Workflow, "
641655
"CommandLineTool, or ExpressionTool. If the `inputs_object` has a "
642656
"`cwl:tool` field indicating the path or URL to the cwl_document, "
643-
" then the `workflow` argument is optional.",
657+
" then the `cwl_document` argument is optional.",
644658
)
645659
parser.add_argument(
646660
"job_order",

0 commit comments

Comments
 (0)