Skip to content

Commit 041a3ef

Browse files
committed
include v1.3.0-dev1 schema; adjust updater
1 parent 52710a1 commit 041a3ef

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+7078
-65
lines changed

MANIFEST.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ include cwltool/schemas/v1.2/*.yml
5353
include cwltool/schemas/v1.2/*.md
5454
include cwltool/schemas/v1.2/salad/schema_salad/metaschema/*.yml
5555
include cwltool/schemas/v1.2/salad/schema_salad/metaschema/*.md
56+
include cwltool/schemas/v1.3.0-dev1/*.yml
57+
include cwltool/schemas/v1.3.0-dev1/*.md
58+
include cwltool/schemas/v1.3.0-dev1/salad/schema_salad/metaschema/*.yml
59+
include cwltool/schemas/v1.3.0-dev1/salad/schema_salad/metaschema/*.md
5660
include cwltool/extensions.yml
5761
include cwltool/extensions-v1.1.yml
5862
include cwltool/extensions-v1.2.yml
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
CWL Code of Conduct
2+
===================
3+
4+
The CWL Project is dedicated to providing a harassment-free experience for
5+
everyone. We do not tolerate harassment of participants in any form.
6+
7+
This code of conduct applies to all CWL Project spaces both online and off: the
8+
Google Group, the Gitter chat room, the Google Hangouts chats, and any other
9+
CWL spaces. Anyone who violates this code of conduct may be sanctioned or
10+
expelled from these spaces at the discretion of the CWL Leadership Team.
11+
12+
Some CWL Project spaces may have additional rules in place, which will be
13+
made clearly available to participants. Participants are responsible for
14+
knowing and abiding by these rules.
15+
16+
Harassment includes, but is not limited to:
17+
18+
- Offensive comments related to gender, gender identity and expression, sexual
19+
orientation, disability, mental illness, neuro(a)typicality, physical
20+
appearance, body size, age, race, or religion.
21+
- Unwelcome comments regarding a person’s lifestyle choices and practices,
22+
including those related to food, health, parenting, drugs, and employment.
23+
- Deliberate misgendering or use of [dead](https://www.quora.com/What-is-deadnaming/answer/Nancy-C-Walker)
24+
or rejected names.
25+
- Gratuitous or off-topic sexual images or behaviour in spaces where they’re not
26+
appropriate.
27+
- Physical contact and simulated physical contact (eg, textual descriptions like
28+
\*hug\*” or “\*backrub\*”) without consent or after a request to stop.
29+
- Threats of violence.
30+
- Incitement of violence towards any individual, including encouraging a person
31+
to commit suicide or to engage in self-harm.
32+
- Deliberate intimidation.
33+
- Stalking or following.
34+
- Harassing photography or recording, including logging online activity for
35+
harassment purposes.
36+
- Sustained disruption of discussion.
37+
- Unwelcome sexual attention.
38+
- Pattern of inappropriate social contact, such as requesting/assuming
39+
inappropriate levels of intimacy with others
40+
- Continued one-on-one communication after requests to cease.
41+
- Deliberate “outing” of any aspect of a person’s identity without their consent
42+
except as necessary to protect vulnerable people from intentional abuse.
43+
- Publication of non-harassing private communication.
44+
45+
The CWL Project prioritizes marginalized people’s safety over privileged
46+
people’s comfort. The CWL Leadership Team will not act on complaints regarding:
47+
48+
- ‘Reverse’ -isms, including ‘reverse racism,’ ‘reverse sexism,’ and ‘cisphobia’
49+
- Reasonable communication of boundaries, such as “leave me alone,” “go away,” or
50+
“I’m not discussing this with you.”
51+
- Communicating in a [tone](http://geekfeminism.wikia.com/wiki/Tone_argument)
52+
you don’t find congenial
53+
54+
Reporting
55+
---------
56+
57+
If you are being harassed by a member of the CWL Project, notice that someone
58+
else is being harassed, or have any other concerns, please contact the CWL
59+
Leadership Team at [email protected]. If person who is harassing
60+
you is on the team, they will recuse themselves from handling your incident. We
61+
will respond as promptly as we can.
62+
63+
This code of conduct applies to CWL Project spaces, but if you are being
64+
harassed by a member of CWL Project outside our spaces, we still want to
65+
know about it. We will take all good-faith reports of harassment by CWL Project
66+
members, especially the CWL Leadership Team, seriously. This includes harassment
67+
outside our spaces and harassment that took place at any point in time. The
68+
abuse team reserves the right to exclude people from the CWL Project based on
69+
their past behavior, including behavior outside CWL Project spaces and
70+
behavior towards people who are not in the CWL Project.
71+
72+
In order to protect volunteers from abuse and burnout, we reserve the right to
73+
reject any report we believe to have been made in bad faith. Reports intended
74+
to silence legitimate criticism may be deleted without response.
75+
76+
We will respect confidentiality requests for the purpose of protecting victims
77+
of abuse. At our discretion, we may publicly name a person about whom we’ve
78+
received harassment complaints, or privately warn third parties about them, if
79+
we believe that doing so will increase the safety of CWL Project members or
80+
the general public. We will not name harassment victims without their
81+
affirmative consent.
82+
83+
Consequences
84+
------------
85+
86+
Participants asked to stop any harassing behavior are expected to comply
87+
immediately.
88+
89+
If a participant engages in harassing behavior, the CWL Leadership Team may
90+
take any action they deem appropriate, up to and including expulsion from all
91+
CWL Project spaces and identification of the participant as a harasser to other
92+
CWL Project members or the general public.
93+
94+
This anti-harassment policy is based on the [example policy from the Geek
95+
Feminism wiki](http://geekfeminism.wikia.com/wiki/Community_anti-harassment/Policy),
96+
created by the Geek Feminism community.
97+
98+
CWL Leadership Team
99+
-------------------
100+
101+
As a stop gap measure until a more formal governance structure is adopted, the
102+
following individuals make up the leadership of the CWL Project: Peter Amstutz,
103+
John Chilton, Michael R. Crusoe, and Nebojša Tijanić.
104+
105+
To report an issue with anyone on the team you can escalate to Ward Vandewege
106+
(Curoverse) [email protected], Anton Nekrutenko (Galaxy)
107+
anton AT bx DOT psu DOT edu, C. Titus Brown (UC Davis) [email protected], or
108+
Brandi Davis-Dusenbery (Seven Bridges Genomics) [email protected].
Lines changed: 220 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,220 @@
1+
# Common workflow language conformance test suite
2+
3+
The conformance tests are intended to test feature coverage of a CWL
4+
implementation. It uses the module cwltest from https://github.com/common-workflow-language/cwltest/.
5+
6+
## Pre-requisites
7+
8+
You will need both the `cwltest` Python package and the CWL runner you would like to test installed.
9+
10+
Installing the `cwltest` Python package using a virtualenv:
11+
12+
```
13+
$ python3 -m venv cwltest_env
14+
$ source cwltest_env/bin/activate
15+
$ pip install cwltest
16+
```
17+
18+
or via `bioconda`
19+
20+
```
21+
$ conda install -c bioconda cwltest
22+
```
23+
24+
## Usage
25+
26+
```bash
27+
$ ./run_test.sh
28+
--- Running conformance test draft-3 on cwl-runner ---
29+
Test [49/49]
30+
All tests passed
31+
```
32+
33+
34+
## Options
35+
36+
`RUNNER=other-cwl-runner`
37+
38+
The CWL implementation to be tested.
39+
40+
### Test Selection
41+
42+
`--tags`
43+
44+
A comma separated list of [tags](#tags-for-conformance-tests); only tests with these tags will be tested.
45+
`--tags shell_command` will run all tests with `shell_command` in their `tags` list.
46+
47+
`-n{test_range}`
48+
49+
Run only the specific test numbers. `{test_range}` is a comma separated list of
50+
single test numbers and/or numeric ranges.
51+
`-n5-7,15` == only runs the 5th, 6th, 7th, and 15th tests.
52+
53+
`-N{test_range}`
54+
55+
Like the lowercase `-n` option, except that the specified tests will not be run.
56+
Can be mixed with the other test selectors: `-n5-7,15 -N6` == only runs the 5th, 7th, and 15th tests, skipping the 6th test.
57+
58+
`-s{test_names}`
59+
60+
Run the specific tests according to their `id`s. `{test_names}` is a comma separated list of
61+
test identifiers (the `id` field). `-scl_optional_bindings_provided,stdout_redirect_docker,expression_any_null`
62+
achieves the same effect as `-n5-7,15 -N6` and it will still work if the tests are re-ordered.
63+
64+
`-S{test_names}`
65+
66+
Excludes specific tests according to their `id`s. `{test_names}` is a comma separated list of
67+
test identifiers (the `id` field). `--tags shell_command -Sstderr_redirect_shortcut`
68+
will run all tests with `expression_tool` in their `tags` list except the test
69+
with the `id` of `stderr_redirect_shortcut`.
70+
71+
### Misc
72+
73+
`EXTRA="--parallel --singularity"`
74+
75+
Extra options to pass to the CWL runner (check your runner for exact options)
76+
77+
`-j=4`
78+
79+
The number of different tests to run at the same time
80+
81+
`--junit-xml=FILENAME`
82+
83+
Store results in JUnit XML format using the given FILENAME.
84+
85+
`--classname=CLASSNAME`
86+
87+
In the JUnit XML, tag the results with the given CLASSNAME.
88+
Can be useful when multiple test runs are combined to document the differences in `EXTRA=`.
89+
90+
---
91+
92+
For example, to run conformance test 15,16,17, and 20 against the "cwltool"
93+
reference implementation using the `podman` container engine
94+
and parallel execution of workflow steps
95+
96+
```bash
97+
$ ./run_test.sh RUNNER=cwltool -n15-17,20 EXTRA="--parallel --podman"
98+
Test [15/49]
99+
Test [16/49]
100+
Test [17/49]
101+
Test [20/49]
102+
All tests passed
103+
```
104+
105+
## OS X / macOS Notes
106+
107+
_NOTE_: For running on OSX systems, you'll need to install coreutils via brew. This will add to your
108+
system some needed GNU-like tools like `greadlink`.
109+
110+
1. If you haven't already, install [brew](http://brew.sh/) package manager in your mac
111+
2. Run `brew install coreutils`
112+
113+
## Format of the conformance test file
114+
115+
A single conformance test consist of the path to an input CWL document plus an input CWL object
116+
and the expected outputs (or `should_fail: true` if the test is deliberately broken)
117+
118+
They are stored in [`conformance_tests.yaml`](https://github.com/common-workflow-language/cwl-v1.2/blob/main/conformance_tests.yaml)
119+
(or a file `$import`ed into that one)
120+
121+
You can examine [the formal schema of this file](https://github.com/common-workflow-language/cwltest/blob/main/cwltest/cwltest-schema.yml),
122+
or just continue reading here for an explanation.
123+
124+
The conformance test file is a YAML document: a list of key-value pairs.
125+
126+
We will use this single entry to explain the format
127+
``` yaml
128+
- doc: Test command line with optional input (missing)
129+
id: cl_optional_inputs_missing
130+
tool: tests/cat1-testcli.cwl
131+
job: tests/cat-job.json
132+
output:
133+
args: [cat, hello.txt]
134+
tags: [ required, command_line_tool ]
135+
```
136+
- `doc`: A unique, single-line sentence that explain what is being tested.
137+
Will be printed at test execution time, so please don't make it too long!
138+
Additional documentation can go as comments in the CWL document itself.
139+
- `id`: a short list of underscore (`_`) separated words that succinctly identifies and explains the test.
140+
- `tool` the path to the CWL document to run
141+
- `job`: the CWL input object in YAML/JSON format. If there are no inputs then use `tests/empty.json`.
142+
- `output` [the CWL output object expected.](#output-matching)
143+
- `tags`: a yaml list of tag names, see [the list of canonical tags below](#tags-for-conformance-tests).
144+
Must include one or more of the following tags: `command_line_tool`, `expression_tool` or `workflow`.
145+
If the test does not test any optional features, the tag `required` is required.
146+
147+
Because `conformance_tests.yaml` is a `schema-salad` processed document, [`$import`](https://www.commonwl.org/v1.2/SchemaSalad.html#Import)
148+
can be used to organize the tests into separate files.
149+
150+
Currently, the main file is too big (over 3400 lines); we are slowly re-organizing it.
151+
152+
Eventually it would be good to organize the tests so that the test for each optional feature and other logical groups of tests are in their own separate file;
153+
with the supporting CWL documents and their inputs in separate sub-folders of `tests` as well.
154+
155+
Example: [`- $import: tests/string-interpolation/test-index.yaml`](https://github.com/common-workflow-language/cwl-v1.2/blob/5f27e234b4ca88ed1280dedf9e3391a01de12912/conformance_tests.yaml#L3395)
156+
adds all the entries in [`tests/string-interpolation/test-index.yaml`](https://github.com/common-workflow-language/cwl-v1.2/blob/main/tests/string-interpolation/test-index.yaml)
157+
as entries in the main conformance test file.
158+
159+
## Output matching
160+
161+
In each test entry there is an `output` field that contains a mapping of the expected outputs names and their values.
162+
163+
If a particular value could vary and it doesn't matter to the proper functioning of the test, then it can be represented by the special token `Any`.
164+
165+
At any level, if there is an extra field, then that will be considered an error.
166+
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.
167+
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.
168+
169+
[According to the CWL standards](https://www.commonwl.org/v1.2/CommandLineTool.html#File), the format of the `location` field in
170+
`class: File` and `class: Directory` is implementation specific and we should not be testing them.
171+
Please remember to use `location: Any` for them.
172+
173+
Currently, we do [test the contents of the location field in some older tests, but we should stop](https://github.com/common-workflow-language/common-workflow-language/issues/930)
174+
If you are editing those old tests, you may be interested in some special processing for `class: File` and `class: Directory` output objects:
175+
any `location` value specified will succeed if there is either an exact match to the real output, or it matches the end of the real output.
176+
Additionally, for `class: Directory` the location reported by the actual execution will have any trailing forward slash (`/`) trimmed off before comparison.
177+
178+
Likewise, please do not test the `path` for `class: File` and `class: Directory`.
179+
180+
## Writing a new conformance test
181+
182+
To add a new conformance test:
183+
1. Ensure the CWL document you have tests the desired feature or aspect.
184+
2. All `CommandLineTool`s need a software container (via `DockerRequirement`) for better reproducibility, preferably under `hints`.
185+
Please limit your container usage to the following:
186+
- `dockerPull: docker.io/alpine:latest`
187+
- `dockerPull: docker.io/bash:4.4`
188+
- `dockerPull: docker.io/debian:stable-slim`
189+
- `dockerPull: docker.io/python:3-slim`
190+
4. Run your test using the CWL reference runner (`cwltool`) or another CWL runner
191+
that shows the correct behavior to collect the output, or confirm that validation/execution fails as expected
192+
3. Add the CWL document and output object to the subdirectory `tests` in this repository.
193+
4. Fill out a new entry in [conformance_tests.yaml](conformance_tests.yaml) following the [format of the conformance test file](#format-of-the-conformance-test-file)
194+
5. Send a pull request to [current staging branch for the next revision of the CWL standards](https://github.com/common-workflow-language/cwl-v1.2/tree/1.2.1_proposed)
195+
with your changes
196+
197+
## Tags for conformance tests
198+
199+
Each test in the [conformance_tests.yaml](conformance_tests.yaml) should be tagged with one or more tags.
200+
201+
1. A `command_line_tool`, `expression_tool` or `workflow` tag to identify whether a CommandLineTool, ExpressionTool
202+
or Workflow is being tested
203+
2. If the test does not test any optional features, the tag `required`
204+
3. The name of any features that are being tested:
205+
1. `docker` for DockerRequirement
206+
1. `env_var` for EnvVarRequirement
207+
1. `format_checking` for checking format requirement annotation on File inputs
208+
1. `initial_work_dir` for InitialWorkDirRequirements
209+
1. `inline_javascript` for InlineJavascriptRequirement
210+
1. `inplace_update` for InplaceUpdateRequirement
211+
1. `input_object_requirements` for tests that use cwl:requirements in the input object
212+
1. `multiple_input` for MultipleInputFeatureRequirement
213+
1. `networkaccess` for NetworkAccess
214+
1. `resource` for ResourceRequirement
215+
1. `scatter` for ScatterFeatureRequirement
216+
1. `schema_def` for SchemaDefRequirement
217+
1. `shell_command` for ShellCommandRequirement
218+
1. `step_input` for StepInputExpressionRequirement
219+
1. `subworkflow` for SubworkflowRequirement
220+
1. `timelimit` for ToolTimeLimit
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- $import: Process.yml
2+
- $import: CommandLineTool.yml

0 commit comments

Comments
 (0)