Skip to content

Commit 4029c19

Browse files
author
radhika
committed
cwltool: --compute-checksum and --no-compute-checksum are mutually exclusive command line args.
1 parent 9eddc55 commit 4029c19

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

cwltool/draft2tool.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,8 @@ def rm_pending_output_callback(output_callback, jobcachepending,
334334
else:
335335
j.command_line = flatten(map(builder.generate_arg, builder.bindings))
336336

337+
print("******** KWARGS = ", kwargs)
338+
337339
j.pathmapper = builder.pathmapper
338340
j.collect_outputs = partial(
339341
self.collect_output_ports, self.tool["outputs"], builder, compute_checksum=kwargs.get("compute_checksum"))

cwltool/main.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,12 @@ def arg_parser(): # type: () -> argparse.ArgumentParser
158158
help="Desired workflow behavior when a step fails. One of 'stop' or 'continue'. "
159159
"Default is 'stop.", default="stop")
160160

161-
parser.add_argument("--compute-checksum", action="store_true", default=True,
161+
exgroup = parser.add_mutually_exclusive_group()
162+
exgroup.add_argument("--compute-checksum", action="store_true", default=True,
162163
help="Compute checksum of contents while collecting outputs",
163164
dest="compute_checksum")
164-
parser.add_argument("--no-compute-checksum", action="store_false",
165-
help="Compute checksum of contents while collecting outputs",
165+
exgroup.add_argument("--no-compute-checksum", action="store_false",
166+
help="Do not compute checksum of contents while collecting outputs",
166167
dest="compute_checksum")
167168

168169
parser.add_argument("workflow", type=str, nargs="?", default=None)

0 commit comments

Comments
 (0)