Skip to content

Commit 09dd29d

Browse files
bogdang989mr-c
authored andcommitted
Rename v1.1.0-dev1 requirement ToolTimeLimit (#1066)
1 parent a858bb4 commit 09dd29d

File tree

4 files changed

+74
-19
lines changed

4 files changed

+74
-19
lines changed

cwltool/command_line_tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ def register_reader(f):
546546
adjustDirObjs(builder.files, register_reader)
547547
adjustDirObjs(builder.bindings, register_reader)
548548

549-
timelimit, _ = self.get_requirement("TimeLimit")
549+
timelimit, _ = self.get_requirement("ToolTimeLimit")
550550
if timelimit is not None:
551551
with SourceLine(timelimit, "timelimit", validate.ValidationException, debug):
552552
j.timelimit = builder.do_eval(timelimit["timelimit"])

cwltool/process.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def filter(self, record):
7979
"StepInputExpressionRequirement",
8080
"ResourceRequirement",
8181
"InitialWorkDirRequirement",
82-
"TimeLimit",
82+
"ToolTimeLimit",
8383
"WorkReuse",
8484
"NetworkAccess",
8585
"InplaceUpdateRequirement",

cwltool/schemas/v1.1.0-dev1/CommandLineTool.yml

Lines changed: 71 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,41 +41,65 @@ $graph:
4141
This specification represents the latest development release from the
4242
CWL group. Since the v1.0 release, v1.1 introduces the
4343
following updates to the CWL Command Line Tool standard.
44-
Documents should to use `cwlVersion: v1.1.0-dev1` to make use of new
44+
Documents should use `cwlVersion: v1.1.0-dev1` to make use of new
4545
syntax and features introduced in v1.1.0-dev1. Existing v1.0 documents
46-
should be trivially updatav1.1.0-dev1ble by changing `cwlVersion`, however
46+
should be trivially updatable by changing `cwlVersion`, however
4747
CWL documents that relied on previously undefined or
4848
underspecified behavior may have slightly different behavior in
4949
v1.1.0-dev1.
5050
5151
## Changelog
5252
53+
* Clarify behavior around `ENTRYPOINT` and `CMD` in containers.
5354
* Clarify documentation around `valueFrom` and `null` inputs.
5455
* Default values for some fields are now expressed in the schema.
5556
* When defining record types with `CommandInputRecordSchema`, fields of
5657
type `File` may now include `format`, `loadContents`,
5758
`secondaryFiles` and `streamable`.
58-
* `CommandInputRecordSchema`, `CommandInputEnumSchema`, and
59-
`CommandInputArraySchema` now have an optional `doc` field.
59+
* `CommandInputRecordSchema`, `CommandOutputRecordSchema`,
60+
`CommandInputEnumSchema and `CommandInputArraySchema` now have an optional
61+
`doc` field.
6062
* `inputBinding` has been added as an optional field for
6163
`CommandInputRecordSchema` (was previously in CWL `draft-3` but
62-
disappeared in `v1.0`)
64+
disappeared in `v1.0`).
6365
* Any `doc` field may be an array of strings in addition to the
6466
previously allowed single string.
6567
* Addition of `stdin` type shortcut for
6668
[`CommandInputParameter`](#CommandInputParameter).
6769
* Clarify that the designated output directory should be empty
6870
except for files or directories specified using
6971
[InitialWorkDirRequirement](#InitialWorkDirRequirement).
70-
* Clarify semantics of `shellQuote`
72+
* Clarify semantics of `shellQuote`.
7173
* Expressions are now allowed to evaluate to `null` or `Dirent` in
7274
[InitialWorkDirRequirement.listing](#InitialWorkDirRequirement).
75+
* Items in [InitialWorkDirRequirement.listing](#InitialWorkDirRequirement)
76+
are now allowed to be `null` and `array<File | Directory>`.
7377
* Clarify behavior of secondaryFiles on output.
7478
* [Addition](#Requirements_and_hints) of `cwl:requirements` field to
7579
input object documents.
7680
* Clarify behavior of `glob` for absolute paths and symlinks.
7781
* Clarify behavior of `glob` to include directories.
7882
* `secondaryFiles` can now be explicitly marked as `required` or not.
83+
* Clarify `CommandLineTool.arguments` documentation.
84+
* Clarify that `runtime.outdir` and `runtime.tmpdir` must be distinct
85+
directories.
86+
* Clarify that unspecified details related to execution are left open to
87+
the platform.
88+
* Added `InputParameter.loadContents` field. Use of `loadContents` in
89+
`InputBinding` is deprecated; it is preserved for v1.0 backwards
90+
compatability and will be removed in CWL v2.0.
91+
* [Added](#ToolTimeLimit) `ToolTimeLimit` feature, allowing to set an upper limit on the
92+
execution time of a CommandLineTool.
93+
* [Added](#WorkReuse) `WorkReuse` feature, allowing to enable or disable the reuse
94+
behavior for a particular tool or step for implementations that
95+
support reusing output from past work.
96+
* [Added](#NetworkAccess) `NetworkAccess` feature, allowing to indicate whether a
97+
process requires outgoing network access.
98+
* [Added](#InplaceUpdateRequirement) `InplaceUpdateRequirement` feature, allowing tools to directly
99+
update files with `writable: true` in `InitialWorkDirRequirement`.
100+
* [Added](#LoadListingRequirement) `LoadListingRequirement`
101+
and [loadListing](#LoadContents) to control whether and how
102+
`Directory` listings should be loaded for use in expressions.
79103
80104
See also the [CWL Workflow Description, v1.1.0-dev1 changelog](Workflow.html#Changelog).
81105
@@ -105,10 +129,12 @@ $graph:
105129
provide a common standard description of grammar and semantics for
106130
invoking programs used in data-intensive fields such as Bioinformatics,
107131
Chemistry, Physics, Astronomy, and Statistics. This specification
108-
defines a precise data and execution model for Command Line Tools that
132+
attempts to define a precise data and execution model for Command Line Tools that
109133
can be implemented on a variety of computing platforms, ranging from a
110134
single workstation to cluster, grid, cloud, and high performance
111-
computing platforms.
135+
computing platforms. Details related to execution of these programs not
136+
laid out in this specification are open to interpretation by the computing
137+
platform implementing this specification.
112138
113139
- {$include: concepts.md}
114140
- {$include: invocation.md}
@@ -637,7 +663,10 @@ $graph:
637663
"_container": "@list"
638664
- name: arguments
639665
doc: |
640-
Command line bindings which are not directly associated with input parameters.
666+
Command line bindings which are not directly associated with input
667+
parameters. If the value is a string, it is used as a string literal
668+
argument. If it is an Expression, the result of the evaluation is used
669+
as an argument.
641670
type:
642671
- "null"
643672
- type: array
@@ -702,8 +731,9 @@ $graph:
702731
extends: ProcessRequirement
703732
doc: |
704733
Indicates that a workflow component should be run in a
705-
[Docker](http://docker.com) container, and specifies how to fetch or build
706-
the image.
734+
[Docker](http://docker.com) or Docker-compatible (such as
735+
[Singularity](https://www.sylabs.io/) and [udocker](https://github.com/indigo-dc/udocker)) container environment and
736+
specifies how to fetch or build the image.
707737
708738
If a CommandLineTool lists `DockerRequirement` under
709739
`hints` (or `requirements`), it may (or must) be run in the specified Docker
@@ -720,14 +750,31 @@ $graph:
720750
file paths in the input object to correspond to the Docker bind mounted
721751
locations. That is, the platform should rewrite values in the parameter context
722752
such as `runtime.outdir`, `runtime.tmpdir` and others to be valid paths
723-
within the container.
753+
within the container. The platform must ensure that `runtime.outdir` and
754+
`runtime.tmpdir` are distinct directories.
724755
725756
When running a tool contained in Docker, the workflow platform must not
726757
assume anything about the contents of the Docker container, such as the
727758
presence or absence of specific software, except to assume that the
728759
generated command line represents a valid command within the runtime
729760
environment of the container.
730761
762+
A container image may specify an
763+
[ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint)
764+
and/or
765+
[CMD](https://docs.docker.com/engine/reference/builder/#cmd).
766+
Command line arguments will be appended after all elements of
767+
ENTRYPOINT, and will override all elements specified using CMD (in
768+
other words, CMD is only used when the CommandLineTool definition
769+
produces an empty command line).
770+
771+
Use of implicit ENTRYPOINT or CMD are discouraged due to reproducibility
772+
concerns of the implicit hidden execution point (For further discussion, see
773+
[https://doi.org/10.12688/f1000research.15140.1](https://doi.org/10.12688/f1000research.15140.1)). Portable
774+
CommandLineTool wrappers in which use of a container is optional must not rely on ENTRYPOINT or CMD.
775+
CommandLineTools which do rely on ENTRYPOINT or CMD must list `DockerRequirement` in the
776+
`requirements` section.
777+
731778
## Interaction with other requirements
732779
733780
If [EnvVarRequirement](#EnvVarRequirement) is specified alongside a
@@ -1051,17 +1098,25 @@ $graph:
10511098

10521099

10531100
- type: record
1054-
name: TimeLimit
1101+
name: ToolTimeLimit
10551102
extends: ProcessRequirement
10561103
doc: |
1057-
Set an upper limit on the execution time of a CommandLineTool or
1058-
ExpressionTool. A tool execution which exceeds the time limit may
1104+
Set an upper limit on the execution time of a CommandLineTool.
1105+
A tool execution which exceeds the time limit may
10591106
be preemptively terminated and considered failed. May also be
10601107
used by batch systems to make scheduling decisions.
1108+
1109+
Limit applies only to the command execution time. Time for
1110+
additional steps, such as file download/upload, docker pull or
1111+
expression evaluation is not considered for exceeding time limit.
1112+
1113+
If ToolTimeLimit is set on a workflow level, it propagates down to
1114+
individual processes, in line with requirement inheritance rules.
1115+
ToolTimeLimit is not used to limit the execution time of a Workflow.
10611116
fields:
10621117
- name: class
10631118
type: string
1064-
doc: "Always 'TimeLimit'"
1119+
doc: "Always 'ToolTimeLimit'"
10651120
jsonldPredicate:
10661121
"_id": "@type"
10671122
"_type": "@vocab"

cwltool/update.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def v1_0to1_1_0dev1(doc, loader, baseuri): # pylint: disable=unused-argument
2424

2525
rewrite = {
2626
"http://commonwl.org/cwltool#WorkReuse": "WorkReuse",
27-
"http://commonwl.org/cwltool#TimeLimit": "TimeLimit",
27+
"http://commonwl.org/cwltool#TimeLimit": "ToolTimeLimit",
2828
"http://commonwl.org/cwltool#NetworkAccess": "NetworkAccess",
2929
"http://commonwl.org/cwltool#InplaceUpdateRequirement": "InplaceUpdateRequirement",
3030
"http://commonwl.org/cwltool#LoadListingRequirement": "LoadListingRequirement",

0 commit comments

Comments
 (0)