Skip to content

Commit 909e87e

Browse files
authored
Merge branch 'main' into leave_input_staging_directory
2 parents 10430ef + 8d7e75d commit 909e87e

File tree

1,501 files changed

+10865
-246494
lines changed

Some content is hidden

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

1,501 files changed

+10865
-246494
lines changed

.coveragerc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ exclude_lines =
99
pragma: no cover
1010
raise NotImplementedError
1111
if __name__ == .__main__.:
12+
if TYPE_CHECKING:
1213
ignore_errors = True
1314
omit =
1415
tests/*

.flake8

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[flake8]
2+
ignore = E203,W503
3+
max-line-length = 100
4+
select = B,C,E,F,W,T4
5+
exclude = cwltool/schemas
6+
extend-ignore = E501,B905
7+
# when Python 3.10 is the minimum version, re-enable check B905 for zip + strict
8+
extend-select = B9

.git-blame-ignore-revs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# isort
2+
46e0485a889453dc178a878b5b5ebbfc7e4eb5f1
3+
4+
# upgrade to black 20.8b1
5+
6fd6fdb381fe3f347627fd517a8f2dba7b0a7029
6+
7+
# upgrade to black 23.1, longer lines (100)
8+
7fe8c0739b0515d00daabc7db87bc5fad926d345

.github/workflows/ci-tests.yml

Lines changed: 155 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Continuous integration tests
1+
name: CI Tests
22

33
on:
44
push:
@@ -12,20 +12,35 @@ concurrency:
1212
cancel-in-progress: true
1313

1414
env:
15-
singularity_version: 3.8.3
15+
TOX_SKIP_MISSING_INTERPRETERS: False
16+
# Rich (pip)
17+
FORCE_COLOR: 1
18+
# Tox
19+
PY_COLORS: 1
20+
# Mypy (see https://github.com/python/mypy/issues/7771)
21+
TERM: xterm-color
22+
MYPY_FORCE_COLOR: 1
23+
MYPY_FORCE_TERMINAL_WIDTH: 200
24+
# Pytest
25+
PYTEST_ADDOPTS: --color=yes
1626

1727
jobs:
1828

1929
tox:
20-
name: CI tests via Tox
21-
22-
runs-on: ubuntu-20.04
23-
30+
name: Tox
31+
runs-on: ubuntu-20.04 # 22.04 doesn't support Python 3.6
2432
strategy:
2533
matrix:
2634
py-ver-major: [3]
27-
py-ver-minor: [6, 7, 8, 9, 10]
35+
py-ver-minor: [6, 7, 8, 9, 10, 11]
2836
step: [lint, unit, bandit, mypy]
37+
exclude:
38+
- py-ver-major: 3
39+
py-ver-minor: 6
40+
step: mypy
41+
- py-ver-major: 3
42+
py-ver-minor: 6
43+
step: lint
2944

3045
env:
3146
py-semver: ${{ format('{0}.{1}', matrix.py-ver-major, matrix.py-ver-minor) }}
@@ -38,13 +53,13 @@ jobs:
3853

3954
- name: Set up Singularity
4055
if: ${{ matrix.step == 'unit' || matrix.step == 'mypy' }}
41-
uses: eWaterCycle/setup-singularity@v7
42-
with:
43-
singularity-version: ${{ env.singularity_version }}
56+
run: |
57+
wget --no-verbose https://github.com/sylabs/singularity/releases/download/v3.10.4/singularity-ce_3.10.4-focal_amd64.deb
58+
sudo apt-get install -y ./singularity-ce_3.10.4-focal_amd64.deb
4459
4560
- name: Give the test runner user a name to make provenance happy.
4661
if: ${{ matrix.step == 'unit' || matrix.step == 'mypy' }}
47-
run: sudo usermod -c 'CI Runner' $(whoami)
62+
run: sudo usermod -c 'CI Runner' "$(whoami)"
4863

4964
- name: Set up Python
5065
uses: actions/setup-python@v4
@@ -58,7 +73,7 @@ jobs:
5873
- name: Upgrade setuptools and install tox
5974
run: |
6075
pip install -U pip setuptools wheel
61-
pip install tox tox-gh-actions
76+
pip install "tox<4" "tox-gh-actions<3"
6277
6378
- name: MyPy cache
6479
if: ${{ matrix.step == 'mypy' }}
@@ -75,19 +90,19 @@ jobs:
7590
uses: codecov/codecov-action@v3
7691
with:
7792
fail_ci_if_error: true
93+
token: ${{ secrets.CODECOV_TOKEN }}
7894

7995
tox-style:
80-
name: CI linters via Tox
81-
96+
name: Linters
8297
runs-on: ubuntu-20.04
8398

8499
strategy:
85100
matrix:
86101
step: [lintreadme, shellcheck, pydocstyle]
87102

88103
env:
89-
py-semver: "3.10"
90-
TOXENV: ${{ format('py310-{0}', matrix.step) }}
104+
py-semver: "3.11"
105+
TOXENV: ${{ format('py311-{0}', matrix.step) }}
91106

92107
steps:
93108
- uses: actions/checkout@v3
@@ -103,7 +118,7 @@ jobs:
103118
- name: Upgrade setuptools and install tox
104119
run: |
105120
pip install -U pip setuptools wheel
106-
pip install tox tox-gh-actions
121+
pip install "tox<4" "tox-gh-actions<3"
107122
108123
- if: ${{ matrix.step == 'pydocstyle' && github.event_name == 'pull_request'}}
109124
name: Create local branch for diff-quality for PRs
@@ -112,61 +127,119 @@ jobs:
112127
- name: Test with tox
113128
run: tox
114129

115-
conformance_tests:
116-
name: CWL spec conformance tests
130+
clean_working_dir:
131+
name: No leftovers
132+
runs-on: ubuntu-22.04
133+
env:
134+
py-semver: "3.11"
135+
steps:
136+
- uses: actions/checkout@v3
137+
with:
138+
fetch-depth: 0
117139

118-
runs-on: ubuntu-20.04
140+
- name: Set up Singularity
141+
run: |
142+
wget --no-verbose https://github.com/sylabs/singularity/releases/download/v3.10.4/singularity-ce_3.10.4-focal_amd64.deb
143+
sudo apt-get install -y ./singularity-ce_3.10.4-focal_amd64.deb
144+
145+
- name: Give the test runner user a name to make provenance happy.
146+
run: sudo usermod -c 'CI Runner' "$(whoami)"
147+
148+
- name: Set up Python
149+
uses: actions/setup-python@v4
150+
with:
151+
python-version: ${{ env.py-semver }}
152+
cache: pip
153+
154+
- name: install with test dependencies
155+
run: |
156+
pip install -U pip setuptools wheel
157+
pip install --no-build-isolation -rtest-requirements.txt .[deps]
158+
159+
- name: make working directory read-only
160+
run: |
161+
mkdir .pytest_cache
162+
chmod a-w .
163+
164+
- name: run tests
165+
run: make test
166+
167+
168+
conformance_tests:
169+
name: CWL conformance
170+
runs-on: ubuntu-22.04
119171

120172
strategy:
121173
matrix:
122174
cwl-version: [v1.0, v1.1, v1.2]
123175
container: [docker, singularity, podman]
176+
extras: [""]
177+
include:
178+
- cwl-version: v1.2
179+
container: docker
180+
extras: "--fast-parser"
124181

125182
steps:
126183
- uses: actions/checkout@v3
127184

128185
- name: Set up Singularity
129-
uses: eWaterCycle/setup-singularity@v7
186+
if: ${{ matrix.container == 'singularity' }}
187+
run: |
188+
wget --no-verbose https://github.com/sylabs/singularity/releases/download/v3.10.4/singularity-ce_3.10.4-jammy_amd64.deb
189+
sudo apt-get install -y ./singularity-ce_3.10.4-jammy_amd64.deb
190+
191+
- name: Singularity cache
192+
if: ${{ matrix.container == 'singularity' }}
193+
uses: actions/cache@v3
130194
with:
131-
singularity-version: ${{ env.singularity_version }}
195+
path: sifcache
196+
key: singularity
197+
198+
- name: Set up Podman
199+
if: ${{ matrix.container == 'podman' }}
200+
run: sudo rm -f /usr/bin/docker ; sudo apt-get install -y podman
132201

133202
- name: Set up Python
134203
uses: actions/setup-python@v4
135204
with:
136-
python-version: 3.9
205+
python-version: 3.11
137206
cache: pip
138207

139-
- name: Run CWL conformance tests ${{ matrix.cwl-version }}
208+
- name: "Test CWL ${{ matrix.cwl-version }} conformance"
140209
env:
141-
version: ${{ matrix.cwl-version }}
142-
container: ${{ matrix.container }}
143-
spec_branch: main
210+
VERSION: ${{ matrix.cwl-version }}
211+
CONTAINER: ${{ matrix.container }}
212+
GIT_TARGET: main
213+
CWLTOOL_OPTIONS: ${{ matrix.extras }}
144214
run: ./conformance-test.sh
145-
215+
- name: Upload coverage to Codecov
216+
uses: codecov/codecov-action@v3
217+
with:
218+
fail_ci_if_error: true
219+
token: ${{ secrets.CODECOV_TOKEN }}
146220
release_test:
147221
name: cwltool release test
148-
149-
runs-on: ubuntu-20.04
222+
runs-on: ubuntu-22.04
150223

151224
steps:
152225
- uses: actions/checkout@v3
153226

154227
- name: Set up Singularity
155-
uses: eWaterCycle/setup-singularity@v7
156-
with:
157-
singularity-version: ${{ env.singularity_version }}
228+
run: |
229+
wget --no-verbose https://github.com/sylabs/singularity/releases/download/v3.10.4/singularity-ce_3.10.4-jammy_amd64.deb
230+
sudo apt-get install -y ./singularity-ce_3.10.4-jammy_amd64.deb
158231
159232
- name: Set up Python
160233
uses: actions/setup-python@v4
161234
with:
162-
python-version: "3.10" # quoted, otherwise that turns into the number 3.1
235+
python-version: 3.11
163236
cache: pip
164237
cache-dependency-path: |
165238
requirements.txt
166239
test-requirements.txt
167240
168241
- name: Give the test runner user a name to make provenance happy.
169-
run: sudo usermod -c 'CI Runner' $(whoami)
242+
run: sudo usermod -c 'CI Runner' "$(whoami)"
170243

171244
- name: Install packages
172245
run: |
@@ -177,3 +250,50 @@ jobs:
177250
env:
178251
RELEASE_SKIP: head
179252
run: ./release-test.sh
253+
254+
build_test_container:
255+
runs-on: ubuntu-latest
256+
steps:
257+
- uses: actions/checkout@v3
258+
- name: build & test cwltool_module container
259+
run: ./build-cwltool-docker.sh
260+
261+
macos:
262+
name: Test on macos-latest
263+
runs-on: macos-latest
264+
env:
265+
TOXENV: py311-unit
266+
steps:
267+
- uses: actions/checkout@v3
268+
with:
269+
fetch-depth: 0
270+
- name: Set up Python
271+
uses: actions/setup-python@v4
272+
with:
273+
python-version: 3.11
274+
cache: pip
275+
cache-dependency-path: |
276+
requirements.txt
277+
tox.ini
278+
- name: Upgrade setuptools and install tox
279+
run: |
280+
pip install -U pip setuptools wheel
281+
pip install "tox<4" "tox-gh-actions<3"
282+
# # docker for mac install is not currently stable
283+
# - name: 'SETUP MacOS: load Homebrew cache'
284+
# uses: actions/cache@v3
285+
# if: runner.os == 'macOS'
286+
# with:
287+
# path: |
288+
# ~/Library/Caches/Homebrew/downloads/*--Docker.dmg
289+
# key: brew-actions-setup-docker-1.0.11
290+
# restore-keys: brew-actions-setup-docker-
291+
# - name: setup docker on macos (default stable version)
292+
# uses: docker-practice/actions-setup-docker@master
293+
- name: Test with tox
294+
run: tox
295+
- name: Upload coverage to Codecov
296+
uses: codecov/codecov-action@v3
297+
with:
298+
fail_ci_if_error: true
299+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/quay-publish.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,40 @@ jobs:
1212
- name: Get image tags
1313
id: image_tags
1414
run: |
15-
echo -n ::set-output name=IMAGE_TAGS::${GITHUB_REF#refs/*/}
15+
echo -n ::set-output "name=IMAGE_TAGS::${GITHUB_REF#refs/*/}"
16+
- name: Set up QEMU
17+
uses: docker/setup-qemu-action@v2
1618
- name: Set up Docker Buildx
1719
uses: docker/setup-buildx-action@v2
20+
- name: Cache Docker layers
21+
uses: actions/cache@v3
22+
with:
23+
path: /tmp/.buildx-cache
24+
key: ${{ runner.os }}-multi-buildx-${{ github.sha }}
25+
restore-keys: |
26+
${{ runner.os }}-multi-buildx
1827
- name: Login to Quay.io
1928
uses: docker/login-action@v2
2029
with:
2130
registry: ${{ secrets.REGISTRY_SERVER }}
2231
username: ${{ secrets.REGISTRY_USERNAME }}
2332
password: ${{ secrets.REGISTRY_PASSWORD }}
2433
- name: Build and publish cwltool_module image to Quay
25-
uses: docker/build-push-action@v3
34+
uses: docker/build-push-action@v4
2635
with:
2736
file: cwltool.Dockerfile
28-
tags: quay.io/commonwl/cwltool_module:${{ steps.image_tags.outputs.IMAGE_TAGS }}
37+
tags: quay.io/commonwl/cwltool_module:${{ steps.image_tags.outputs.IMAGE_TAGS }},quay.io/commonwl/cwltool_module:latest
2938
target: module
39+
platforms: linux/amd64,linux/arm64
3040
push: true
3141
cache-from: type=gha
3242
cache-to: type=gha,mode=max
3343
- name: Build and publish cwltool image to Quay
34-
uses: docker/build-push-action@v3
44+
uses: docker/build-push-action@v4
3545
with:
3646
file: cwltool.Dockerfile
37-
tags: quay.io/commonwl/cwltool:${{ steps.image_tags.outputs.IMAGE_TAGS }}
47+
tags: quay.io/commonwl/cwltool:${{ steps.image_tags.outputs.IMAGE_TAGS }},quay.io/commonwl/cwltool:latest
48+
platforms: linux/amd64,linux/arm64
3849
push: true
3950
cache-from: type=gha
4051
cache-to: type=gha,mode=max

.gitignore

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,8 @@ venv3/
2828
# pycharm
2929
.idea/
3030

31-
# typshed repo
32-
typeshed/2and3/schema_salad
33-
typeshed/2and3/ruamel/yaml
34-
31+
# local stubs
32+
mypy-stubs/ruamel/yaml
3533

3634
#mypy
3735
.mypy_cache/
@@ -54,3 +52,9 @@ time.txt
5452
value
5553

5654
.python-version
55+
56+
# Folder created when using make
57+
cwltool_deps
58+
docs/_build/
59+
docs/autoapi/
60+

0 commit comments

Comments
 (0)