Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ jobs:
py-ver-major: [3]
py-ver-minor: [6, 7, 8, 9, 10]
step: [lint, unit, bandit, mypy]
exclude:
- py-ver-major: 3
py-ver-minor: 6
step: mypy

env:
py-semver: ${{ format('{0}.{1}', matrix.py-ver-major, matrix.py-ver-minor) }}
Expand Down
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,16 @@ mypy: $(filter-out setup.py gittagger.py,$(PYSOURCES))
fi # if minimally required ruamel.yaml version is 0.15.99 or greater, than the above can be removed
MYPYPATH=$$MYPYPATH:mypy-stubs mypy $^

mypy_3.6: $(filter-out setup.py gittagger.py,$(PYSOURCES))
if ! test -f $(shell python -c 'import ruamel.yaml; import os.path; print(os.path.dirname(ruamel.yaml.__file__))')/py.typed ; \
then \
rm -Rf mypy-stubs/ruamel/yaml ; \
ln -s $(shell python -c 'import ruamel.yaml; import os.path; print(os.path.dirname(ruamel.yaml.__file__))') \
mypy-stubs/ruamel/ ; \
fi # if minimally required ruamel.yaml version is 0.15.99 or greater, than the above can be removed
MYPYPATH=$$MYPYPATH:mypy-stubs mypy --python-version 3.6 $^


mypyc: $(PYSOURCES)
MYPYPATH=mypy-stubs CWLTOOL_USE_MYPYC=1 pip install --verbose -e . \
&& pytest -rs -vv ${PYTEST_EXTRA}
Expand Down
2 changes: 1 addition & 1 deletion mypy-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
mypy==0.971
mypy==0.981
ruamel.yaml>=0.16.0,<0.17.22
schema-salad>=8.2.20211104054942,<9
cwl-utils >=0.19
Expand Down
9 changes: 5 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ envlist =
py3{6,7,8,9,10}-lint
py3{6,7,8,9,10}-unit
py3{6,7,8,9,10}-bandit
py3{6,7,8,9,10}-mypy
py3{7,8,9,10}-mypy
py39-lintreadme
py39-shellcheck
py39-pydocstyle
Expand All @@ -30,7 +30,7 @@ description =
py3{6,7,8,9,10}-unit: Run the unit tests
py3{6,7,8,9,10}-lint: Lint the Python code
py3{6,7,8,9,10}-bandit: Search for common security issues
py3{6,7,8,9,10}-mypy: Check for type safety
py3{7,8,9,10}-mypy: Check for type safety
py39-pydocstyle: docstring style checker
py39-shellcheck: syntax check for shell scripts
py39-lintreadme: Lint the README.rst→.md conversion
Expand All @@ -49,7 +49,7 @@ deps =
py3{6,7,8,9,10}-lint: -rlint-requirements.txt
py3{6,7,8,9,10}-bandit: bandit
py3{6,7,8,9,10}-bandit: importlib_metadata != 4.8.0
py3{6,7,8,9,10}-mypy: -rmypy-requirements.txt
py3{7,8,9,10}-mypy: -rmypy-requirements.txt
py39-pydocstyle: pydocstyle
py39-pydocstyle: diff-cover
py39-lintreadme: twine
Expand All @@ -68,7 +68,8 @@ commands =
py3{6,7,8,9,10}-unit: make coverage-report coverage.xml PYTEST_EXTRA={posargs}
py3{6,7,8,9,10}-bandit: bandit -r cwltool
py3{6,7,8,9,10}-lint: make flake8 format-check codespell
py3{6,7,8,9,10}-mypy: make mypy mypyc PYTEST_EXTRA={posargs}
py3{7,8,9,10}-mypy: make mypy mypyc PYTEST_EXTRA={posargs}
py37-mypy: make mypy_3.6
py39-shellcheck: make shellcheck
py39-pydocstyle: make diff_pydocstyle_report
py39-lintreadme: twine check {distdir}/*
Expand Down