Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language cleanup #43

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
6 changes: 6 additions & 0 deletions .github/config/wordlist.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
abstractworkflowstep
acyclic
amstutz
arrayschema
Expand Down Expand Up @@ -160,6 +161,9 @@ loadlistingrequirement
localhost
lookahead
loopback
loopinput
loopoutputmethod
loopworkflowstep
maccallum
macos
mappredicate
Expand Down Expand Up @@ -194,6 +198,7 @@ outputbinding
outputenumschema
outputeval
outputformat
outputmethod
outputschema
outputsink
outputsource
Expand Down Expand Up @@ -231,6 +236,7 @@ saladversion
sbgenomics
scatterfeaturerequirement
scattermethod
scatterworkflowstep
schemadefrequirement
schemaorg
schemas
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cwltool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ jobs:
run: cp conformance_tests.yaml conformance_tests.cwltest.yaml

- name: Run tests against the reference runner
run: python -m pytest conformance_tests.cwltest.yaml -n auto -rs
run: python -m pytest conformance_tests.cwltest.yaml -n auto -rsfE
4 changes: 2 additions & 2 deletions CONFORMANCE_TESTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ We will use this single entry to explain the format
Must include one or more of the following tags: `command_line_tool`, `expression_tool` or `workflow`.
If the test does not test any optional features, the tag `required` is required.

Because `conformance_tests.yaml` is a `schema-salad` processed document, [`$import`](https://www.commonwl.org/v1.2/SchemaSalad.html#Import)
Because `conformance_tests.yaml` is a `schema-salad` processed document, [`$import`](https://www.commonwl.org/v1.3/SchemaSalad.html#Import)
can be used to organize the tests into separate files.

Currently, the main file is too big (over 3400 lines); we are slowly re-organizing it.
Expand All @@ -166,7 +166,7 @@ At any level, if there is an extra field, then that will be considered an error.
An exception to this is `class: File` and `class: Directory` objects, the `cwl-runner` under test can add additional fields here without causing a test to fail.
Likewise, if you don't want to test some aspect of a `class: File` or `class: Directory` object (like `nameext`) you can just omit it.

[According to the CWL standards](https://www.commonwl.org/v1.2/CommandLineTool.html#File), the format of the `location` field in
[According to the CWL standards](https://www.commonwl.org/v1.3/CommandLineTool.html#File), the format of the `location` field in
`class: File` and `class: Directory` is implementation specific and we should not be testing them.
Please remember to use `location: Any` for them.

Expand Down
112 changes: 111 additions & 1 deletion CommandLineTool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,20 @@ $graph:
## Changelog for v1.3.0-dev1

See also the [CWL Workflow Description, v1.3.0-dev1 changelog](Workflow.html#Changelog).

* New field `networkAccess` on
[CommandLineTool](#CommandLineTool). This supersedes the
[NetworkAccess](#NetworkAccess) requirement, which is now
deprecated.
* New field `envDef` on [CommandLineTool](#CommandLineTool).
This supersedes the [EnvVarRequirement](#EnvVarRequirement)
requirement, which is now deprecated.
* New field `initialWorkDir` on
[CommandLineTool](#CommandLineTool). This supersedes the
[InitialWorkDirRequirement](#InitialWorkDirRequirement)
requirement, which is now deprecated.


For other changes since CWL v1.0, see the
[CWL Command Line Tool Description, v1.1 changelog](https://www.commonwl.org/v1.1/CommandLineTool.html#Changelog)
and
Expand Down Expand Up @@ -711,6 +725,94 @@ $graph:

If not specified, all exit codes except 0 are considered permanent failure.

- name: networkAccess
type: ['null', boolean, Expression]
jsonldPredicate: "cwl:NetworkAccess/networkAccess"
doc: |
Indicate whether a process requires outgoing IPv4/IPv6 network
access. Choice of IPv4 or IPv6 is implementation and site
specific, correct tools must support both.

If `networkAccess` is false or not specified, tools must not
assume network access, except for localhost (the loopback device).

If `networkAccess` is true, the tool must be able to make outgoing
connections to network resources. Resources may be on a private
subnet or the public Internet. However, implementations and sites
may apply their own security policies to restrict what is
accessible by the tool.

Enabling network access does not imply a publicly routable IP
address or the ability to accept inbound connections.

- name: initialWorkDir
type:
- 'null'
- Expression
- type: array
items:
- "null"
- Dirent
- Expression
- File
- Directory
- type: array
items:
- File
- Directory
doc: |
Define a list of files and subdirectories that must be staged
by the workflow platform prior to executing the command line
tool. Normally this is the designated output directory, but
when containers are used, it is possible to stage to other
locations, see discussion below.

Return type of each expression must validate as `["null",
File, Directory, Dirent, {type: array, items: [File,
Directory]}]`.

Each `File` or `Directory` that is returned by an Expression
must be added to the designated output directory prior to
executing the tool.

Each `Dirent` record that is listed or returned by an
expression specifies a file to be created or staged in the
designated output directory prior to executing the tool.

Expressions may return null, in which case they have no effect.

Files or Directories which are listed in the input parameters
and appear in `initialWorkDir` must have their `path` set to
their staged location. If the same File or Directory appears
more than once in the `initialWorkDir`, the implementation
must choose exactly one value for `path`; how this value is
chosen is undefined.

Normally files are staged within the designated output
directory. However, when running inside containers, files may
be staged at arbitrary locations, see discussion for
[`Dirent.entryname`](#Dirent). Together with
`DockerRequirement.dockerOutputDirectory` it is possible to
control the locations of both input and output files when
running in containers.

Files listed in `inputs` that are not listed in
`initialWorkDir` shall be staged to an arbitrary location on
the file system. This location must be outside the designated
output directory.

- name: envDef
type: EnvironmentDef[]?
doc: |
Define a list of environment variables which will be set in
the execution environment of the tool. See
[EnvironmentDef](#EnvironmentDef) for details.
jsonldPredicate:
"_id": "cwl:EnvVarRequirement/envDef"
mapSubject: envName
mapPredicate: envValue



- type: record
name: DockerRequirement
Expand Down Expand Up @@ -991,7 +1093,9 @@ $graph:
- name: InitialWorkDirRequirement
type: record
extends: ProcessRequirement
doc:
doc: |
**Deprecated as of v1.3** Prefer [CommandLineTool.initialWorkDir](#CommandLineTool)

Define a list of files and subdirectories that must be staged by
the workflow platform prior to executing the command line tool.

Expand Down Expand Up @@ -1059,6 +1163,8 @@ $graph:
type: record
extends: ProcessRequirement
doc: |
**Deprecated as of v1.3** Prefer [CommandLineTool.envDef](#CommandLineTool)

Define a list of environment variables which will be set in the
execution environment of the tool. See `EnvironmentDef` for details.
fields:
Expand All @@ -1076,6 +1182,7 @@ $graph:
type: EnvironmentDef[]
doc: The list of environment variables.
jsonldPredicate:
"_id": "cwl:EnvVarRequirement/envDef"
mapSubject: envName
mapPredicate: envValue

Expand Down Expand Up @@ -1291,6 +1398,8 @@ $graph:
name: NetworkAccess
extends: ProcessRequirement
doc: |
**Deprecated as of v1.3** Prefer [CommandLineTool.networkAccess](#CommandLineTool)

Indicate whether a process requires outgoing IPv4/IPv6 network
access. Choice of IPv4 or IPv6 is implementation and site
specific, correct tools must support both.
Expand Down Expand Up @@ -1320,6 +1429,7 @@ $graph:
"_type": "@vocab"
- name: networkAccess
type: [boolean, Expression]
jsonldPredicate: "cwl:NetworkAccess/networkAccess"

- name: InplaceUpdateRequirement
type: record
Expand Down
Loading
Loading