Skip to content

Commit 86636f8

Browse files
authored
Merge branch 'main' into patch-1
2 parents a181499 + f5a3fd9 commit 86636f8

File tree

122 files changed

+67519
-70
lines changed

Some content is hidden

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

122 files changed

+67519
-70
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
script: ${TRAVIS_BUILD_DIR}/travis.bash
3737
- python: "3.7"
3838
script: RELEASE_SKIP=head ${TRAVIS_BUILD_DIR}/release-test.sh
39+
name: 'release test'
3940
- python: "3.8"
4041
name: "CWL v1.2 conformance tests"
4142
env:
@@ -47,6 +48,6 @@ jobs:
4748
script: tox
4849
branches:
4950
only:
50-
- master
51+
- main
5152
notifications:
5253
email: false

CWLProv.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ These set which vocabularies ("namespaces") are used by the CWLProv statements::
230230
prefix wf <arcp://uuid,0e6cb79e-fe70-4807-888c-3a61b9bf232a/workflow/packed.cwl#>
231231
prefix foaf <http://xmlns.com/foaf/0.1/>
232232

233-
Note that the `arcp <https://tools.ietf.org/id/draft-soilandreyes-arcp-03.html>`__ base URI will correspond to the UUID of each master workflow run.
233+
Note that the `arcp <https://tools.ietf.org/id/draft-soilandreyes-arcp-03.html>`__ base URI will correspond to the UUID of each main workflow run.
234234

235235
Account who launched cwltool
236236
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

MANIFEST.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ include cwltool/schemas/v1.2.0-dev3/*.yml
3333
include cwltool/schemas/v1.2.0-dev3/*.md
3434
include cwltool/schemas/v1.2.0-dev3/salad/schema_salad/metaschema/*.yml
3535
include cwltool/schemas/v1.2.0-dev3/salad/schema_salad/metaschema/*.md
36+
include cwltool/schemas/v1.2.0-dev4/*.yml
37+
include cwltool/schemas/v1.2.0-dev4/*.md
38+
include cwltool/schemas/v1.2.0-dev4/salad/schema_salad/metaschema/*.yml
39+
include cwltool/schemas/v1.2.0-dev4/salad/schema_salad/metaschema/*.md
3640
include cwltool/cwlNodeEngine.js
3741
include cwltool/cwlNodeEngineJSConsole.js
3842
include cwltool/cwlNodeEngineWithContext.js

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ pydocstyle_report.txt: $(PYSOURCES)
8989
pydocstyle setup.py $^ > $@ 2>&1 || true
9090

9191
diff_pydocstyle_report: pydocstyle_report.txt
92-
diff-quality --violations=pycodestyle --fail-under=100 $^
92+
diff-quality --compare-branch=main --violations=pycodestyle --fail-under=100 $^
9393

9494
## format : check/fix all code indentation and formatting (runs black)
9595
format:

README.rst

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ CWL conformance tests: |Conformance Status| |Linux Status| |Windows Status| |Cov
1212
.. |Conformance Status| image:: https://ci.commonwl.org/buildStatus/icon?job=cwltool-conformance
1313
:target: https://ci.commonwl.org/job/cwltool-conformance/
1414

15-
.. |Linux Status| image:: https://img.shields.io/travis/common-workflow-language/cwltool/master.svg?label=Linux%20builds
15+
.. |Linux Status| image:: https://img.shields.io/travis/common-workflow-language/cwltool/main.svg?label=Linux%20builds
1616
:target: https://travis-ci.org/common-workflow-language/cwltool
1717

18-
.. |Windows Status| image:: https://img.shields.io/appveyor/ci/mr-c/cwltool/master.svg?label=Windows%20builds
18+
.. |Windows Status| image:: https://img.shields.io/appveyor/ci/mr-c/cwltool/main.svg?label=Windows%20builds
1919
:target: https://ci.appveyor.com/project/mr-c/cwltool
2020

2121
.. |Coverage Status| image:: https://img.shields.io/codecov/c/github/common-workflow-language/cwltool.svg
@@ -24,49 +24,49 @@ CWL conformance tests: |Conformance Status| |Linux Status| |Windows Status| |Cov
2424
.. |Downloads| image:: https://pepy.tech/badge/cwltool/month
2525
:target: https://pepy.tech/project/cwltool
2626

27-
.. |CommandLineTool Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/master/cwltool/cwl_v1.0/cwltool_latest/command_line_tool.json?icon=commonwl
27+
.. |CommandLineTool Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/main/cwltool/cwl_v1.0/cwltool_latest/command_line_tool.json?icon=commonwl
2828
:target: https://ci.commonwl.org/job/cwltool-conformance/
2929

30-
.. |DockerRequirement Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/master/cwltool/cwl_v1.0/cwltool_latest/docker.json?icon=commonwl
30+
.. |DockerRequirement Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/main/cwltool/cwl_v1.0/cwltool_latest/docker.json?icon=commonwl
3131
:target: https://ci.commonwl.org/job/cwltool-conformance/
3232

33-
.. |EnvVarRequirement Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/master/cwltool/cwl_v1.0/cwltool_latest/env_var.json?icon=commonwl
33+
.. |EnvVarRequirement Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/main/cwltool/cwl_v1.0/cwltool_latest/env_var.json?icon=commonwl
3434
:target: https://ci.commonwl.org/job/cwltool-conformance/
3535

36-
.. |ExpressionTool Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/master/cwltool/cwl_v1.0/cwltool_latest/expression_tool.json?icon=commonwl
36+
.. |ExpressionTool Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/main/cwltool/cwl_v1.0/cwltool_latest/expression_tool.json?icon=commonwl
3737
:target: https://ci.commonwl.org/job/cwltool-conformance/
3838

39-
.. |InitialWorkDirRequirement Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/master/cwltool/cwl_v1.0/cwltool_latest/initial_work_dir.json?icon=commonwl
39+
.. |InitialWorkDirRequirement Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/main/cwltool/cwl_v1.0/cwltool_latest/initial_work_dir.json?icon=commonwl
4040
:target: https://ci.commonwl.org/job/cwltool-conformance/
4141

42-
.. |InlineJavascriptRequirement Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/master/cwltool/cwl_v1.0/cwltool_latest/inline_javascript.json?icon=commonwl
42+
.. |InlineJavascriptRequirement Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/main/cwltool/cwl_v1.0/cwltool_latest/inline_javascript.json?icon=commonwl
4343
:target: https://ci.commonwl.org/job/cwltool-conformance/
4444

45-
.. |MultipleInputRequirement Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/master/cwltool/cwl_v1.0/cwltool_latest/multiple_input.json?icon=commonwl
45+
.. |MultipleInputRequirement Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/main/cwltool/cwl_v1.0/cwltool_latest/multiple_input.json?icon=commonwl
4646
:target: https://ci.commonwl.org/job/cwltool-conformance/
4747

48-
.. |Core Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/master/cwltool/cwl_v1.0/cwltool_latest/required.json?icon=commonwl
48+
.. |Core Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/main/cwltool/cwl_v1.0/cwltool_latest/required.json?icon=commonwl
4949
:target: https://ci.commonwl.org/job/cwltool-conformance/
5050

51-
.. |ResourceRequirement Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/master/cwltool/cwl_v1.0/cwltool_latest/resource.json?icon=commonwl
51+
.. |ResourceRequirement Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/main/cwltool/cwl_v1.0/cwltool_latest/resource.json?icon=commonwl
5252
:target: https://ci.commonwl.org/job/cwltool-conformance/
5353

54-
.. |ScatterRequirement Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/master/cwltool/cwl_v1.0/cwltool_latest/scatter.json?icon=commonwl
54+
.. |ScatterRequirement Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/main/cwltool/cwl_v1.0/cwltool_latest/scatter.json?icon=commonwl
5555
:target: https://ci.commonwl.org/job/cwltool-conformance/
5656

57-
.. |SchemaDefRequirement Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/master/cwltool/cwl_v1.0/cwltool_latest/schema_def.json?icon=commonwl
57+
.. |SchemaDefRequirement Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/main/cwltool/cwl_v1.0/cwltool_latest/schema_def.json?icon=commonwl
5858
:target: https://ci.commonwl.org/job/cwltool-conformance/
5959

60-
.. |ShellCommandequirement Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/master/cwltool/cwl_v1.0/cwltool_latest/shell_command.json?icon=commonwl
60+
.. |ShellCommandequirement Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/main/cwltool/cwl_v1.0/cwltool_latest/shell_command.json?icon=commonwl
6161
:target: https://ci.commonwl.org/job/cwltool-conformance/
6262

63-
.. |StepInputRequirement Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/master/cwltool/cwl_v1.0/cwltool_latest/step_input.json?icon=commonwl
63+
.. |StepInputRequirement Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/main/cwltool/cwl_v1.0/cwltool_latest/step_input.json?icon=commonwl
6464
:target: https://ci.commonwl.org/job/cwltool-conformance/
6565

66-
.. |SubWorkflowRequirement Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/master/cwltool/cwl_v1.0/cwltool_latest/subworkflow.json?icon=commonwl
66+
.. |SubWorkflowRequirement Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/main/cwltool/cwl_v1.0/cwltool_latest/subworkflow.json?icon=commonwl
6767
:target: https://ci.commonwl.org/job/cwltool-conformance/
6868

69-
.. |Workflow Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/master/cwltool/cwl_v1.0/cwltool_latest/workflow.json?icon=commonwl
69+
.. |Workflow Support| image:: https://badgen.net/https/raw.githubusercontent.com/common-workflow-language/conformance/main/cwltool/cwl_v1.0/cwltool_latest/workflow.json?icon=commonwl
7070
:target: https://ci.commonwl.org/job/cwltool-conformance/
7171

7272

@@ -177,21 +177,21 @@ with the ``--user-space-docker-cmd`` option.
177177
One such "user space" friendly docker replacement is ``udocker`` https://github.com/indigo-dc/udocker and another
178178
is ``dx-docker`` https://wiki.dnanexus.com/Developer-Tutorials/Using-Docker-Images
179179

180-
udocker installation: https://github.com/indigo-dc/udocker/blob/master/doc/installation_manual.md#22-install-from-indigo-datacloud-repositories
180+
udocker installation: https://github.com/indigo-dc/udocker/blob/main/doc/installation_manual.md#22-install-from-indigo-datacloud-repositories
181181

182182
dx-docker installation: start with the DNAnexus toolkit (see https://wiki.dnanexus.com/Downloads for instructions).
183183

184184
Run `cwltool` just as you normally would, but with the new option, e.g. from the conformance tests:
185185

186186
.. code:: bash
187187
188-
cwltool --user-space-docker-cmd=udocker https://raw.githubusercontent.com/common-workflow-language/common-workflow-language/master/v1.0/v1.0/test-cwl-out2.cwl https://github.com/common-workflow-language/common-workflow-language/blob/master/v1.0/v1.0/empty.json
188+
cwltool --user-space-docker-cmd=udocker https://raw.githubusercontent.com/common-workflow-language/common-workflow-language/main/v1.0/v1.0/test-cwl-out2.cwl https://github.com/common-workflow-language/common-workflow-language/blob/main/v1.0/v1.0/empty.json
189189
190190
or
191191

192192
.. code:: bash
193193
194-
cwltool --user-space-docker-cmd=dx-docker https://raw.githubusercontent.com/common-workflow-language/common-workflow-language/master/v1.0/v1.0/test-cwl-out2.cwl https://github.com/common-workflow-language/common-workflow-language/blob/master/v1.0/v1.0/empty.json
194+
cwltool --user-space-docker-cmd=dx-docker https://raw.githubusercontent.com/common-workflow-language/common-workflow-language/main/v1.0/v1.0/test-cwl-out2.cwl https://github.com/common-workflow-language/common-workflow-language/blob/main/v1.0/v1.0/empty.json
195195
196196
``cwltool`` can use `Singularity <http://singularity.lbl.gov/>`_ version 2.6.1
197197
or later as a Docker container runtime.
@@ -205,7 +205,7 @@ those involving Docker container ENTRYPOINTs.
205205

206206
.. code:: bash
207207
208-
cwltool --singularity https://raw.githubusercontent.com/common-workflow-language/common-workflow-language/master/v1.0/v1.0/v1.0/cat3-tool-mediumcut.cwl https://github.com/common-workflow-language/common-workflow-language/blob/master/v1.0/v1.0/cat-job.json
208+
cwltool --singularity https://raw.githubusercontent.com/common-workflow-language/common-workflow-language/main/v1.0/v1.0/v1.0/cat3-tool-mediumcut.cwl https://github.com/common-workflow-language/common-workflow-language/blob/main/v1.0/v1.0/cat-job.json
209209
210210
Running a tool or workflow from remote or local locations
211211
---------------------------------------------------------
@@ -652,7 +652,7 @@ To run the basic tests after installing `cwltool` execute the following:
652652
pip install -rtest-requirements.txt
653653
py.test --ignore cwltool/schemas/ --pyarg cwltool
654654
655-
To run various tests in all supported Python environments we use `tox <https://github.com/common-workflow-language/cwltool/tree/master/tox.ini>`_. To run the test suite in all supported Python environments
655+
To run various tests in all supported Python environments we use `tox <https://github.com/common-workflow-language/cwltool/tree/main/tox.ini>`_. To run the test suite in all supported Python environments
656656
first downloading the complete code repository (see the ``git clone`` instructions above) and then run
657657
the following in the terminal:
658658
``pip install tox; tox``
@@ -670,7 +670,7 @@ The GitHub repository for the CWL specifications contains a script that tests a
670670
implementation against a wide array of valid CWL files using the `cwltest <https://github.com/common-workflow-language/cwltest>`_
671671
program
672672

673-
Instructions for running these tests can be found in the Common Workflow Language Specification repository at https://github.com/common-workflow-language/common-workflow-language/blob/master/CONFORMANCE_TESTS.md
673+
Instructions for running these tests can be found in the Common Workflow Language Specification repository at https://github.com/common-workflow-language/common-workflow-language/blob/main/CONFORMANCE_TESTS.md
674674

675675
Import as a module
676676
------------------

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ on_finish:
5050
5151
branches:
5252
only:
53-
- master
53+
- main

cwltool/builder.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ def __init__(
173173
outdir: str,
174174
tmpdir: str,
175175
stagedir: str,
176+
cwlVersion: str,
176177
) -> None:
177178
"""Initialize this Builder."""
178179
self.job = job
@@ -204,6 +205,8 @@ def __init__(
204205
self.tmpdir = tmpdir
205206
self.stagedir = stagedir
206207

208+
self.cwlVersion = cwlVersion
209+
207210
self.pathmapper = None # type: Optional[PathMapper]
208211
self.prov_obj = None # type: Optional[ProvenanceProfile]
209212
self.find_default_container = None # type: Optional[Callable[[], str]]
@@ -630,4 +633,5 @@ def do_eval(
630633
js_console=self.js_console,
631634
force_docker_pull=self.force_docker_pull,
632635
strip_whitespace=strip_whitespace,
636+
cwlVersion=self.cwlVersion,
633637
)

cwltool/command_line_tool.py

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,10 @@ def make_job_runner(self, runtimeContext: RuntimeContext) -> Type[JobBase]:
368368
if runtimeContext.find_default_container is not None:
369369
default_container = runtimeContext.find_default_container(self)
370370
if default_container is not None:
371-
dockerReq = {"class": "DockerRequirement", "dockerPull": default_container}
371+
dockerReq = {
372+
"class": "DockerRequirement",
373+
"dockerPull": default_container,
374+
}
372375
if mpiRequired:
373376
self.hints.insert(0, dockerReq)
374377
dockerRequired = False
@@ -389,29 +392,33 @@ def make_job_runner(self, runtimeContext: RuntimeContext) -> Type[JobBase]:
389392

390393
if dockerReq is not None and runtimeContext.use_container:
391394
if mpiReq is not None:
392-
_logger.warning(
393-
"MPIRequirement with containers is a beta feature"
394-
)
395+
_logger.warning("MPIRequirement with containers is a beta feature")
395396
if runtimeContext.singularity:
396397
return SingularityCommandLineJob
397398
elif runtimeContext.user_space_docker_cmd:
398399
return UDockerCommandLineJob
399400
if mpiReq is not None:
400401
if mpiRequired:
401402
if dockerRequired:
402-
raise UnsupportedRequirement("No support for Docker and MPIRequirement both being required")
403+
raise UnsupportedRequirement(
404+
"No support for Docker and MPIRequirement both being required"
405+
)
403406
else:
404407
_logger.warning(
405408
"MPI has been required while Docker is hinted, discarding Docker hint(s)"
406409
)
407-
self.hints = [h for h in self.hints if h["class"] != "DockerRequirement"]
410+
self.hints = [
411+
h for h in self.hints if h["class"] != "DockerRequirement"
412+
]
408413
return CommandLineJob
409414
else:
410415
if dockerRequired:
411416
_logger.warning(
412417
"Docker has been required while MPI is hinted, discarding MPI hint(s)"
413418
)
414-
self.hints = [h for h in self.hints if h["class"] != MPIRequirementName]
419+
self.hints = [
420+
h for h in self.hints if h["class"] != MPIRequirementName
421+
]
415422
else:
416423
raise UnsupportedRequirement(
417424
"Both Docker and MPI have been hinted - don't know what to do"
@@ -873,12 +880,16 @@ def register_reader(f: CWLObjectType) -> None:
873880
if mpi is not None:
874881
np = cast( # From the schema for MPIRequirement.processes
875882
Union[int, str],
876-
mpi.get('processes', runtimeContext.mpi_config.default_nproc)
883+
mpi.get("processes", runtimeContext.mpi_config.default_nproc),
877884
)
878885
if isinstance(np, str):
879886
tmp = builder.do_eval(np)
880887
if not isinstance(tmp, int):
881-
raise TypeError("{} needs 'processes' to evaluate to an int, got {}".format(MPIRequirementName, type(np)))
888+
raise TypeError(
889+
"{} needs 'processes' to evaluate to an int, got {}".format(
890+
MPIRequirementName, type(np)
891+
)
892+
)
882893
np = tmp
883894
j.mpi_procs = np
884895
yield j

0 commit comments

Comments
 (0)