Skip to content

Commit c4442a8

Browse files
authored
Merge branch 'main' into workflow-checker
2 parents 5810ce6 + 0f70992 commit c4442a8

Some content is hidden

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

41 files changed

+178
-113
lines changed

.github/workflows/ci-tests.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Continous integration tests
1+
name: Continuous integration tests
22

33
on:
44
push:
@@ -32,7 +32,7 @@ jobs:
3232
TOXENV: ${{ format('py{0}{1}-{2}', matrix.py-ver-major, matrix.py-ver-minor, matrix.step) }}
3333

3434
steps:
35-
- uses: actions/checkout@v2
35+
- uses: actions/checkout@v3
3636
with:
3737
fetch-depth: 0
3838

@@ -47,7 +47,7 @@ jobs:
4747
run: sudo usermod -c 'CI Runner' $(whoami)
4848

4949
- name: Set up Python
50-
uses: actions/setup-python@v2
50+
uses: actions/setup-python@v3
5151
with:
5252
python-version: ${{ env.py-semver }}
5353
cache: pip
@@ -90,12 +90,12 @@ jobs:
9090
TOXENV: ${{ format('py310-{0}', matrix.step) }}
9191

9292
steps:
93-
- uses: actions/checkout@v2
93+
- uses: actions/checkout@v3
9494
with:
9595
fetch-depth: 0
9696

9797
- name: Set up Python
98-
uses: actions/setup-python@v2
98+
uses: actions/setup-python@v3
9999
with:
100100
python-version: ${{ env.py-semver }}
101101
cache: pip
@@ -123,15 +123,15 @@ jobs:
123123
container: [docker, singularity, podman]
124124

125125
steps:
126-
- uses: actions/checkout@v2
126+
- uses: actions/checkout@v3
127127

128128
- name: Set up Singularity
129129
uses: eWaterCycle/setup-singularity@v7
130130
with:
131131
singularity-version: ${{ env.singularity_version }}
132132

133133
- name: Set up Python
134-
uses: actions/setup-python@v2
134+
uses: actions/setup-python@v3
135135
with:
136136
python-version: 3.9
137137
cache: pip
@@ -149,15 +149,15 @@ jobs:
149149
runs-on: ubuntu-20.04
150150

151151
steps:
152-
- uses: actions/checkout@v2
152+
- uses: actions/checkout@v3
153153

154154
- name: Set up Singularity
155155
uses: eWaterCycle/setup-singularity@v7
156156
with:
157157
singularity-version: ${{ env.singularity_version }}
158158

159159
- name: Set up Python
160-
uses: actions/setup-python@v2
160+
uses: actions/setup-python@v3
161161
with:
162162
python-version: "3.10" # quoted, otherwise that turns into the number 3.1
163163
cache: pip

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
steps:
2525
- name: Checkout repository
26-
uses: actions/checkout@v2
26+
uses: actions/checkout@v3
2727

2828
# Initializes the CodeQL tools for scanning.
2929
- name: Initialize CodeQL

.github/workflows/quay-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
build:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@master
11+
- uses: actions/checkout@v3
1212
- name: Get image tags
1313
id: image_tags
1414
run: |

CWLProv.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ Note that the `arcp <https://tools.ietf.org/id/draft-soilandreyes-arcp-03.html>`
235235
Account who launched cwltool
236236
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
237237

238-
If `--enable-user-provenance` was used, the local machine acccount (e.g. Windows or UNIX user name) who started ``cwltool`` is tracked::
238+
If `--enable-user-provenance` was used, the local machine account (e.g. Windows or UNIX user name) who started ``cwltool`` is tracked::
239239

240240
agent(id:855c6823-bbe7-48a5-be37-b0f07f20c495, [foaf:accountName="stain", prov:type='foaf:OnlineAccount', prov:label="stain"])
241241

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ pydocstyle_report.txt: $(PYSOURCES)
107107
diff_pydocstyle_report: pydocstyle_report.txt
108108
diff-quality --compare-branch=main --violations=pydocstyle --fail-under=100 $^
109109

110+
## codespell : check for common mispellings
111+
codespell:
112+
codespell -w $(shell git ls-files | grep -v cwltool/schemas | grep -v cwltool/jshint/ | grep -v typeshed)
113+
110114
## format : check/fix all code indentation and formatting (runs black)
111115
format:
112116
black --exclude cwltool/schemas setup.py cwltool.py cwltool tests
@@ -190,7 +194,7 @@ pyupgrade: $(PYSOURCES)
190194
pyupgrade --exit-zero-even-if-changed --py36-plus $^
191195

192196
release-test: check-python3 FORCE
193-
git diff-index --quiet HEAD -- || ( echo You have uncommited changes, please commit them and try again; false )
197+
git diff-index --quiet HEAD -- || ( echo You have uncommitted changes, please commit them and try again; false )
194198
./release-test.sh
195199

196200
release: release-test

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ Environment Variables in cwltool
338338
This reference implementation supports several ways of setting
339339
environment variables for tools, in addition to the standard
340340
``EnvVarRequirement``. The sequence of steps applied to create the
341-
enviroment is:
341+
environment is:
342342

343343
0. If the ``--preserve-entire-environment`` flag is present, then begin with the current
344344
environment, else begin with an empty environment.
@@ -381,7 +381,7 @@ which your tool runs, for example by loading one or more Environment
381381
Modules. The environment is constructed as above, then the environment
382382
may modified by the selected tool resolver. This currently means that
383383
you cannot override any environment variables set by the selected tool
384-
resolver. Note that the enviroment given to the configured dependency
384+
resolver. Note that the environment given to the configured dependency
385385
resolver has the variable `_CWLTOOL` set to `1` to allow introspection.
386386

387387
To discuss some of these plugins and how to configure them, first consider the
@@ -691,7 +691,7 @@ the following in the terminal:
691691

692692
List of all environment can be seen using:
693693
``tox --listenvs``
694-
and running a specfic test env using:
694+
and running a specific test env using:
695695
``tox -e <env name>``
696696
and additionally run a specific test using this format:
697697
``tox -e py310-unit -- -v tests/test_examples.py::test_scandeps``

cwltool/checker.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,9 @@ def static_checker(
191191
# sink parameters: step_inputs and workflow_outputs
192192

193193
# make a dictionary of source parameters, indexed by the "id" field
194-
src_parms = workflow_inputs + step_outputs
195-
src_dict = {} # type: Dict[str, CWLObjectType]
196-
for parm in src_parms:
197-
src_dict[cast(str, parm["id"])] = parm
194+
src_dict: Dict[str, CWLObjectType] = {}
195+
for param in workflow_inputs + step_outputs:
196+
src_dict[cast(str, param["id"])] = param
198197

199198
step_inputs_val = check_all_types(src_dict, step_inputs, "source", param_to_step)
200199
workflow_outputs_val = check_all_types(
@@ -343,7 +342,7 @@ def check_all_types(
343342
"""
344343
Given a list of sinks, check if their types match with the types of their sources.
345344
346-
sourceField is either "soure" or "outputSource"
345+
sourceField is either "source" or "outputSource"
347346
"""
348347
validation = {"warning": [], "exception": []} # type: Dict[str, List[SrcSink]]
349348
for sink in sinks:

cwltool/command_line_tool.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ def _initialworkdir(self, j: JobBase, builder: Builder) -> None:
598598
if isinstance(t, Mapping) and "entry" in t:
599599
# Dirent
600600
entry_field = cast(str, t["entry"])
601-
# the schema guarentees that 'entry' is a string, so the cast is safe
601+
# the schema guarantees that 'entry' is a string, so the cast is safe
602602
entry = builder.do_eval(entry_field, strip_whitespace=False)
603603
if entry is None:
604604
continue
@@ -634,7 +634,7 @@ def _initialworkdir(self, j: JobBase, builder: Builder) -> None:
634634
)
635635
for e in entry:
636636
ec = cast(CWLObjectType, e)
637-
ec["writeable"] = t.get("writable", False)
637+
ec["writable"] = t.get("writable", False)
638638
ls.extend(cast(List[CWLObjectType], entry))
639639
continue
640640

cwltool/docker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def _check_docker_machine_path(path: Optional[str]) -> None:
7878

7979

8080
class DockerCommandLineJob(ContainerCommandLineJob):
81-
"""Runs a CommandLineJob in a sofware container using the Docker engine."""
81+
"""Runs a CommandLineJob in a software container using the Docker engine."""
8282

8383
def __init__(
8484
self,

cwltool/env_to_stdout.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
Ideally we would just use `env -0`, because python (thanks to PEPs 538
77
and 540) will set zero to two environment variables to better handle
8-
Unicode-locale interactions, however BSD familiy implementations of
8+
Unicode-locale interactions, however BSD family implementations of
99
`env` do not all support the `-0` flag so we supply this script that
1010
produces equivalent output.
1111
"""
@@ -16,15 +16,15 @@
1616

1717
def deserialize_env(data: str) -> Dict[str, str]:
1818
"""Deserialize the output of `env -0` to dictionary."""
19-
ans = {}
19+
result = {}
2020
for item in data.strip("\0").split("\0"):
2121
key, val = item.split("=", 1)
22-
ans[key] = val
23-
return ans
22+
result[key] = val
23+
return result
2424

2525

2626
def main() -> None:
27-
"""Print the null-separated enviroment to stdout."""
27+
"""Print the null-separated environment to stdout."""
2828
for k, v in os.environ.items():
2929
print(f"{k}={v}", end="\0")
3030

0 commit comments

Comments
 (0)