Skip to content

Commit bed518b

Browse files
authored
Merge branch 'main' into arrayschema_typedsl_needed
2 parents 2ee49d2 + 6af9932 commit bed518b

File tree

842 files changed

+8432
-420326
lines changed

Some content is hidden

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

842 files changed

+8432
-420326
lines changed

.codecov.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
codecov:
2+
notify:
3+
wait_for_ci: yes

.coveragerc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[run]
22
branch = True
3-
source = cwltool
3+
source_pkgs = cwltool
44
omit = cwltool/run_job.py
55

66
[report]

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ testenv*/
1818
.github/
1919
cwltool/*.so
2020
*.Dockerfile
21+
tmp/
2122
build-cwltool-docker.sh
2223
__pycache__/
2324
*/__pycache__/
@@ -26,3 +27,4 @@ __pycache__/
2627
*.orig
2728
.dockerignore
2829
cache*
30+
*.swp

.github/workflows/ci-tests.yml

Lines changed: 24 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@ on:
77
branches: [ main ]
88
workflow_dispatch:
99

10+
concurrency:
11+
group: build-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
13+
1014
env:
11-
singularity_version: 3.6.4
15+
singularity_version: 3.8.3
1216

1317
jobs:
1418

@@ -20,7 +24,7 @@ jobs:
2024
strategy:
2125
matrix:
2226
py-ver-major: [3]
23-
py-ver-minor: [6, 7, 8, 9]
27+
py-ver-minor: [7, 8, 9, 10]
2428
step: [lint, unit, bandit, mypy]
2529

2630
env:
@@ -34,7 +38,7 @@ jobs:
3438

3539
- name: Set up Singularity
3640
if: ${{ matrix.step == 'unit' || matrix.step == 'mypy' }}
37-
uses: eWaterCycle/setup-singularity@v6
41+
uses: eWaterCycle/setup-singularity@v7
3842
with:
3943
singularity-version: ${{ env.singularity_version }}
4044

@@ -46,12 +50,10 @@ jobs:
4650
uses: actions/setup-python@v2
4751
with:
4852
python-version: ${{ env.py-semver }}
49-
50-
- name: Cache for pip
51-
uses: actions/cache@v2
52-
with:
53-
path: ~/.cache/pip
54-
key: ${{ runner.os }}-pip-${{ matrix.step }}-${{ hashFiles('requirements.txt', 'tox.ini') }}
53+
cache: pip
54+
cache-dependency-path: |
55+
requirements.txt
56+
tox.ini
5557
5658
- name: Upgrade setuptools and install tox
5759
run: |
@@ -70,7 +72,7 @@ jobs:
7072

7173
- name: Upload coverage to Codecov
7274
if: ${{ matrix.step == 'unit' }}
73-
uses: codecov/codecov-action@v2.0.3
75+
uses: codecov/codecov-action@v2.1.0
7476
with:
7577
fail_ci_if_error: true
7678

@@ -84,8 +86,8 @@ jobs:
8486
step: [lintreadme, shellcheck, pydocstyle]
8587

8688
env:
87-
py-semver: 3.9
88-
TOXENV: ${{ format('py39-{0}', matrix.step) }}
89+
py-semver: "3.10"
90+
TOXENV: ${{ format('py310-{0}', matrix.step) }}
8991

9092
steps:
9193
- uses: actions/checkout@v2
@@ -96,12 +98,7 @@ jobs:
9698
uses: actions/setup-python@v2
9799
with:
98100
python-version: ${{ env.py-semver }}
99-
100-
- name: Cache for pip
101-
uses: actions/cache@v2
102-
with:
103-
path: ~/.cache/pip
104-
key: ${{ runner.os }}-pip-${{ matrix.step }}-${{ hashFiles('requirements.txt') }}
101+
cache: pip
105102

106103
- name: Upgrade setuptools and install tox
107104
run: |
@@ -123,26 +120,21 @@ jobs:
123120
strategy:
124121
matrix:
125122
cwl-version: [v1.0, v1.1, v1.2]
126-
container: [docker, singularity]
123+
container: [docker, singularity, podman]
127124

128125
steps:
129126
- uses: actions/checkout@v2
130127

131128
- name: Set up Singularity
132-
uses: eWaterCycle/setup-singularity@v6
129+
uses: eWaterCycle/setup-singularity@v7
133130
with:
134131
singularity-version: ${{ env.singularity_version }}
135132

136133
- name: Set up Python
137134
uses: actions/setup-python@v2
138135
with:
139136
python-version: 3.9
140-
141-
- name: Cache for pip
142-
uses: actions/cache@v2
143-
with:
144-
path: ~/.cache/pip
145-
key: ${{ runner.os }}-conformance-${{ matrix.step }}-${{ hashFiles('requirements.txt') }}
137+
cache: pip
146138

147139
- name: Run CWL conformance tests ${{ matrix.cwl-version }}
148140
env:
@@ -160,24 +152,22 @@ jobs:
160152
- uses: actions/checkout@v2
161153

162154
- name: Set up Singularity
163-
uses: eWaterCycle/setup-singularity@v6
155+
uses: eWaterCycle/setup-singularity@v7
164156
with:
165157
singularity-version: ${{ env.singularity_version }}
166158

167159
- name: Set up Python
168160
uses: actions/setup-python@v2
169161
with:
170-
python-version: 3.9
162+
python-version: "3.10" # quoted, otherwise that turns into the number 3.1
163+
cache: pip
164+
cache-dependency-path: |
165+
requirements.txt
166+
test-requirements.txt
171167
172168
- name: Give the test runner user a name to make provenance happy.
173169
run: sudo usermod -c 'CI Runner' $(whoami)
174170

175-
- name: Cache for pip
176-
uses: actions/cache@v2
177-
with:
178-
path: ~/.cache/pip
179-
key: ${{ runner.os }}-pip-release-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
180-
181171
- name: Install packages
182172
run: |
183173
pip install -U pip setuptools wheel

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
schedule:
99
- cron: '0 10 * * 2'
1010

11+
concurrency:
12+
group: codeql-${{ github.event.pull_request.number || github.ref }}
13+
cancel-in-progress: true
14+
1115
jobs:
1216
CodeQL-Build:
1317

.mergify.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1+
queue_rules:
2+
- name: default
3+
conditions:
4+
- -draft # not a draft
5+
- base=main
6+
17
pull_request_rules:
28
- name: Automatic merge on approval and when when GitHub branch protection passes on main
39
conditions:
410
- "#approved-reviews-by>=1"
511
- -draft
612
- base=main
713
actions:
8-
merge:
14+
queue:
915
method: merge
10-
strict: smart+fasttrack
16+
name: default
1117

1218
pull_request_rules:
1319
- name: Automatic merge for leadership team members when there are no reviewers and the label is "ready"
@@ -19,6 +25,6 @@ pull_request_rules:
1925
- author=@leadership
2026
- label=ready
2127
actions:
22-
merge:
28+
queue:
2329
method: merge
24-
strict: smart+fasttrack
30+
name: default

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ formats: all
1616
python:
1717
version: 3.7
1818
install:
19+
- requirements: docs/requirements.txt
1920
- method: pip
2021
path: .
21-
extra_requirements: [ docs ]

CONTRIBUTING.md

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,32 @@
11
Style guide:
22
- PEP-8
3-
- Python 3.6+ compatible code
3+
- Python 3.7+ compatible code
44
- PEP-484 type hints
55
- Vertically align the type hints in function definitions
66

7-
In order to contribute to the development of ``cwltool``, you need to install cwltool from source (preferably in a virtual environment):
7+
The development is done using ``git``, we encourage you to get familiar with it.
88
Here's a rough guide (improvements are welcome!)
9-
- Install virtualenv via pip: ``pip install virtualenv``
9+
To get the code and start working on the changes you can start a console and:
1010
- Clone the cwltool: ``git clone https://github.com/common-workflow-language/cwltool.git``
1111
- Switch to cwltool directory: ``cd cwltool``
12-
- Create a virtual environment: ``virtualenv cwltool``
12+
13+
In order to contribute to the development of ``cwltool``, the source code needs to pass the test before your changes are accepted.
14+
There are a couple ways to test the code with your changes: let `tox` manage installation and test running in virtual environments, or do it manually (preferably in a virtual environment):
15+
- Install ``tox`` preferably using the OS' package manager, otherwise it can be installed with ``pip install --user -U tox``
16+
- Make your changes to the code and add tests for new cool things you're adding!
17+
- Run the tests with the command ``tox``, it's recommended to use some parameters as tox will try to run all the checks in all available python interpreters.
18+
- The important tests to run are ``unit tests`` and ``type tests``.
19+
To run these two in Python 3.7, we can tell tox to run only those tests by running: ``tox -e py37-unit,py37-mypy2,py37-mypy3``.
20+
- Run ``tox -l`` to see all available tests and runtimes
21+
22+
For the more traditional workflow:
23+
- Create a virtual environment: ``python3 -m venv cwltool``
1324
- To begin using the virtual environment, it needs to be activated: ``source bin/activate``
14-
- To check if you have the virtual environment set up: ``which python`` and it should point to python executable in your virtual env
15-
- Install cwltool in the virtual environment: ``pip install .``
25+
- To check if you have the virtual environment set up: ``which python`` and it should point to python executable in your virtualenv
26+
- Install cwltool: ``pip install -e .``
1627
- Check the version which might be different from the version installed in general on any system: ``cwltool --version``
17-
- After you've made the changes, you can the complete test suite via tox: ``tox``
18-
- If you want to run specific tests, say ``unit tests`` in Python 3.8, then: ``tox -e py38-unit``.
19-
- Look at ``tox.ini`` for all available tests and runtimes
20-
- If tests are passing, you can simply commit and create a PR on ``cwltool`` repo:
21-
- After you're done working on the ``cwltool``, you can deactivate the virtual environment: ``deactivate``
28+
- Make your changes to the code and add tests for new cool things you're adding!
29+
- Run the unit-tests to see : ``python setup.py test``
30+
- After you're done working on ``cwltool``, you can deactivate the virtual environment: ``deactivate``
31+
32+
When tests are passing, you can simply commit and create a PR on ``cwltool`` repo

MANIFEST.in

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
1-
include README.rst
1+
include README.rst CODE_OF_CONDUCT.md CONTRIBUTING.md
22
include MANIFEST.in
33
include LICENSE.txt
4-
include *requirements.txt
4+
include *requirements.txt mypy.ini tox.ini
55
include gittaggers.py Makefile cwltool.py
6+
recursive-include typeshed *.pyi
67
include tests/*
78
include tests/tmp1/tmp2/tmp3/.gitkeep
89
include tests/tmp4/alpha/*
910
include tests/wf/*
1011
include tests/wf/operation/*
1112
include tests/override/*
13+
include tests/reloc/*.cwl
14+
include tests/reloc/dir1/*
15+
include tests/reloc/dir2/*
1216
include tests/checker_wf/*
1317
include tests/subgraph/*
18+
include tests/input_deps/*
1419
include tests/trs/*
1520
include tests/wf/generator/*
1621
include cwltool/py.typed
@@ -61,9 +66,6 @@ prune cwltool/schemas/v1.0/salad/schema_salad/tests
6166
prune cwltool/schemas/v1.1.0-dev1/salad/typeshed
6267
prune cwltool/schemas/v1.1.0-dev1/salad/schema_salad/tests
6368
prune cwltool/schemas/presentations
64-
prune cwltool/schemas/draft-2
65-
prune cwltool/schemas/draft-1
66-
prune cwltool/schemas/draft-3
6769
prune cwltool/schemas/site
6870
prune cwltool/schemas/v1.0/examples
6971
prune cwltool/schemas/v1.0/v1.0

Makefile

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ MODULE=cwltool
2525
# `SHELL=bash` doesn't work for some, so don't use BASH-isms like
2626
# `[[` conditional expressions.
2727
PYSOURCES=$(wildcard ${MODULE}/**.py tests/*.py) setup.py
28-
DEVPKGS=diff_cover black pylint pep257 pydocstyle flake8 tox tox-pyenv \
29-
isort wheel autoflake flake8-bugbear pyupgrade bandit \
30-
-rtest-requirements.txt -rmypy_requirements.txt
28+
DEVPKGS=diff_cover pylint pep257 pydocstyle tox tox-pyenv \
29+
isort wheel autoflake pyupgrade bandit -rlint-requirements.txt\
30+
-rtest-requirements.txt -rmypy-requirements.txt
3131
DEBDEVPKGS=pep8 python-autopep8 pylint python-coverage pydocstyle sloccount \
3232
python-flake8 python-mock shellcheck
3333

@@ -50,6 +50,9 @@ install-dependencies: FORCE
5050
pip install --upgrade $(DEVPKGS)
5151
pip install -r requirements.txt
5252

53+
install-doc-dep:
54+
pip install -r docs/requirements.txt
55+
5356
## install-deb-dep: install most of the dev dependencies via apt-get
5457
install-deb-dep:
5558
sudo apt-get install $(DEBDEVPKGS)
@@ -148,11 +151,11 @@ diff-cover.html: coverage.xml
148151

149152
## test : run the ${MODULE} test suite
150153
test: check-python3 $(PYSOURCES)
151-
python -m pytest ${PYTEST_EXTRA}
154+
python -m pytest -rs ${PYTEST_EXTRA}
152155

153156
## testcov : run the ${MODULE} test suite and collect coverage
154157
testcov: check-python3 $(PYSOURCES)
155-
python -m pytest --cov --cov-config=.coveragerc --cov-report= ${PYTEST_EXTRA}
158+
python -m pytest -rs --cov --cov-config=.coveragerc --cov-report= ${PYTEST_EXTRA}
156159

157160
sloccount.sc: $(PYSOURCES) Makefile
158161
sloccount --duplicates --wide --details $^ > $@
@@ -177,14 +180,14 @@ mypy: $(filter-out setup.py gittagger.py,$(PYSOURCES))
177180

178181
mypyc: $(PYSOURCES)
179182
MYPYPATH=typeshed CWLTOOL_USE_MYPYC=1 pip install --verbose -e . \
180-
&& pytest -vv ${PYTEST_EXTRA}
183+
&& pytest -rs -vv ${PYTEST_EXTRA}
181184

182185
shellcheck: FORCE
183186
shellcheck build-cwltool-docker.sh cwl-docker.sh release-test.sh conformance-test.sh \
184187
cwltool-in-docker.sh
185188

186189
pyupgrade: $(PYSOURCES)
187-
pyupgrade --exit-zero-even-if-changed --py36-plus $^
190+
pyupgrade --exit-zero-even-if-changed --py37-plus $^
188191

189192
release-test: check-python3 FORCE
190193
git diff-index --quiet HEAD -- || ( echo You have uncommited changes, please commit them and try again; false )

0 commit comments

Comments
 (0)