Skip to content

Commit 0f35dc6

Browse files
authored
Merge branch 'master' into remove-badge-header
2 parents 70a5012 + 55fb28b commit 0f35dc6

Some content is hidden

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

57 files changed

+1879
-1946
lines changed

.travis.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@ services:
33

44
matrix:
55
include:
6-
- os: linux
7-
language: python
8-
python: 2.7
9-
script:
10-
- tox
11-
- RELEASE_SKIP=head PYVER=2.7 ${TRAVIS_BUILD_DIR}/release-test.sh
126
- os: linux
137
language: python
148
python: 3.5
@@ -33,9 +27,6 @@ matrix:
3327
script:
3428
- tox
3529
- RELEASE_SKIP=head PYVER=3 ${TRAVIS_BUILD_DIR}/release-test.sh
36-
- os: osx
37-
language: generic
38-
env: TRAVIS_PYTHON_VERSION=2.7 PYENV_VERSION=2.7.15
3930
- os: osx
4031
language: generic
4132
env: TRAVIS_PYTHON_VERSION=3.5 PYENV_VERSION=3.5.4

Makefile

Lines changed: 26 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ MODULE=cwltest
2626
# `SHELL=bash` doesn't work for some, so don't use BASH-isms like
2727
# `[[` conditional expressions.
2828
PYSOURCES=$(wildcard ${MODULE}/**.py tests/*.py) setup.py
29-
DEVPKGS=pycodestyle diff_cover autopep8 pylint coverage pydocstyle flake8 \
29+
DEVPKGS=pycodestyle diff_cover pylint coverage pydocstyle flake8 \
3030
pytest pytest-xdist isort
3131
DEBDEVPKGS=pep8 python-autopep8 pylint python-coverage pydocstyle sloccount \
3232
python-flake8 python-mock shellcheck
33-
VERSION=1.0.$(shell date +%Y%m%d%H%M%S --utc --date=`git log --first-parent \
34-
--max-count=1 --format=format:%cI`)
33+
VERSION=2.0.$(shell TZ=UTC git log --first-parent --max-count=1 \
34+
--format=format:%cd --date=format-local:%Y%m%d%H%M%S)
3535
mkfile_dir := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
3636

3737
## all : default task
@@ -74,47 +74,29 @@ clean: FORCE
7474
sort_imports:
7575
isort ${MODULE}/*.py tests/*.py setup.py
7676

77-
pep8: pycodestyle
78-
## pycodestyle : check Python code style
79-
pycodestyle: $(PYSOURCES)
80-
pycodestyle --exclude=_version.py --show-source --show-pep8 $^ || true
81-
82-
pep8_report.txt: pycodestyle_report.txt
83-
pycodestyle_report.txt: $(PYSOURCES)
84-
pycodestyle --exclude=_version.py $^ > $@ || true
85-
86-
diff_pep8_report: diff_pycodestyle_report
87-
diff_pycodestyle_report: pycodestyle_report.txt
88-
diff-quality --violations=pycodestyle $^
89-
9077
pep257: pydocstyle
9178
## pydocstyle : check Python code style
9279
pydocstyle: $(PYSOURCES)
93-
pydocstyle --ignore=D100,D101,D102,D103 $^ || true
80+
pydocstyle --add-ignore=D100,D101,D102,D103 $^ || true
9481

9582
pydocstyle_report.txt: $(PYSOURCES)
9683
pydocstyle setup.py $^ > $@ 2>&1 || true
9784

9885
diff_pydocstyle_report: pydocstyle_report.txt
99-
diff-quality --violations=pycodestyle $^
100-
101-
## autopep8 : fix most Python code indentation and formatting
102-
autopep8: $(PYSOURCES)
103-
autopep8 --recursive --in-place --ignore E309 $^
86+
diff-quality --violations=pycodestyle --fail-under=100 $^
10487

105-
# A command to automatically run astyle and autopep8 on appropriate files
106-
## format : check/fix all code indentation and formatting (runs autopep8)
107-
format: autopep8
108-
# Do nothing
88+
## format : check/fix all code indentation and formatting (runs black)
89+
format:
90+
black --exclude cwltool/schemas setup.py cwltest
10991

11092
## pylint : run static code analysis on Python code
11193
pylint: $(PYSOURCES)
11294
pylint --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" \
113-
$^ || true
95+
$^ -j0|| true
11496

11597
pylint_report.txt: ${PYSOURCES}
11698
pylint --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" \
117-
$^ > pylint_report.txt || true
99+
$^ -j0> $@ || true
118100

119101
diff_pylint_report: pylint_report.txt
120102
diff-quality --violations=pylint pylint_report.txt
@@ -156,37 +138,29 @@ list-author-emails:
156138
@echo 'name, E-Mail Address'
157139
@git log --format='%aN,%aE' | sort -u | grep -v 'root'
158140

159-
mypy2: ${PYSOURCES}
160-
rm -Rf typeshed/2.7/ruamel/yaml
161-
ln -s $(shell python -c 'from __future__ import print_function; import ruamel.yaml; import os.path; print(os.path.dirname(ruamel.yaml.__file__))') \
162-
typeshed/2.7/ruamel/yaml
163-
rm -Rf typeshed/2.7/schema_salad
164-
ln -s $(shell python -c 'from __future__ import print_function; import schema_salad; import os.path; print(os.path.dirname(schema_salad.__file__))') \
165-
typeshed/2.7/schema_salad
166-
MYPYPATH=typeshed/2.7:typeshed/2and3 mypy --py2 --disallow-untyped-calls \
167-
--warn-redundant-casts --warn-unused-ignores \
168-
${MODULE}
169-
170-
mypy3: ${PYSOURCES}
171-
rm -Rf typeshed/2and3/ruamel/yaml
172-
ln -s $(shell python3 -c 'from __future__ import print_function; import ruamel.yaml; import os.path; print(os.path.dirname(ruamel.yaml.__file__))') \
173-
typeshed/2and3/ruamel/yaml
174-
rm -Rf typeshed/2and3/schema_salad
175-
ln -s $(shell python3 -c 'from __future__ import print_function; import schema_salad; import os.path; print(os.path.dirname(schema_salad.__file__))') \
176-
typeshed/2and3/schema_salad
141+
mypy3: mypy
142+
mypy: ${PYSOURCES}
143+
if ! test -f $(shell python3 -c 'import ruamel.yaml; import os.path; print(os.path.dirname(ruamel.yaml.__file__))')/py.typed ; \
144+
then \
145+
rm -Rf typeshed/2and3/ruamel/yaml ; \
146+
ln -s $(shell python3 -c 'import ruamel.yaml; import os.path; print(os.path.dirname(ruamel.yaml.__file__))') \
147+
typeshed/2and3/ruamel/ ; \
148+
fi # if minimally required ruamel.yaml version is 0.15.99 or greater, than the above can be removed
177149
MYPYPATH=$$MYPYPATH:typeshed/3:typeshed/2and3 mypy --disallow-untyped-calls \
178150
--warn-redundant-casts \
179151
${MODULE}
180152

153+
release-test: FORCE
154+
git diff-index --quiet HEAD -- || ( echo You have uncommited changes, please commit them and try again; false )
155+
./release-test.sh
156+
181157
release: FORCE
182-
PYVER=2.7 ./release-test.sh
183158
PYVER=3 ./release-test.sh
184-
. testenv2.7_2/bin/activate && \
185-
testenv2.7_2/src/${MODULE}/setup.py sdist bdist_wheel
186-
. testenv2.7_2/bin/activate && \
159+
. testenv3_2/bin/activate && \
160+
testenv3_2/src/${MODULE}/setup.py sdist bdist_wheel
161+
. testenv3_2/bin/activate && \
187162
pip install twine && \
188-
twine upload testenv2.7_2/src/${MODULE}/dist/* \
189-
testenv3_2/src/${MODULE}/dist/*whl && \
163+
twine upload testenv3_2/src/${MODULE}/dist/*whl && \
190164
git tag ${VERSION} && git push --tags
191165

192166
FORCE:

appveyor.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
version: .{build}-{branch}
22

33
cache:
4-
- '%LOCALAPPDATA%\pip\Cache'
4+
- '%LOCALAPPDATA%\pip\Cache'
55

66
environment:
7+
78
SYSTEMROOT: "C:\\WINDOWS"
89

910
matrix:
10-
- PYTHON: "C:\\Python27-x64"
11-
PYTHON_VERSION: "2.7.x"
12-
PYTHON_ARCH: "64"
13-
1411
- PYTHON: "C:\\Python35-x64"
1512
PYTHON_VERSION: "3.5.x"
1613
PYTHON_ARCH: "64"
@@ -19,8 +16,16 @@ environment:
1916
PYTHON_VERSION: "3.6.x"
2017
PYTHON_ARCH: "64"
2118

19+
- PYTHON: "C:\\Python37-x64"
20+
PYTHON_VERSION: "3.7.x"
21+
PYTHON_ARCH: "64"
22+
23+
- PYTHON: "C:\\Python38-x64"
24+
PYTHON_VERSION: "3.8.x"
25+
PYTHON_ARCH: "64"
26+
2227
install:
23-
- "%PYTHON%\\python.exe -m pip install -U setuptools^>=20.3"
28+
- "%PYTHON%\\python.exe -m pip install -U pip setuptools^>=20.3"
2429
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
2530
# Note the use of a `^` to escape the `>`
2631

@@ -31,7 +36,7 @@ build_script:
3136
3237
test_script:
3338
- |
34-
%PYTHON%\\python.exe setup.py test --addopts "--verbose -p no:cacheprovider --junit-xml=tests.xml -n2"
39+
%PYTHON%\\python.exe setup.py test --addopts "--verbose -p no:cacheprovider --junit-xml=tests.xml"
3540
3641
on_finish:
3742
- ps: |

0 commit comments

Comments
 (0)