Skip to content

Commit f9528cf

Browse files
authored
Merge pull request #48 from common-workflow-language/updates
New CLI options: which directory to output to, stop at upgrading to CWL v1.0
2 parents b1b620b + 5297cfb commit f9528cf

File tree

6 files changed

+373
-180
lines changed

6 files changed

+373
-180
lines changed

Makefile

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@
2020
# and documentation
2121
# make coverage-report to check coverage of the python scripts by the tests
2222

23-
MODULE=cwlupgrader
23+
MODULE=cwl-upgrader
24+
PACKAGE=cwlupgrader
2425

2526
# `SHELL=bash` doesn't work for some, so don't use BASH-isms like
2627
# `[[` conditional expressions.
2728
PYSOURCES=$(wildcard cwlupgrader/**.py tests/*.py) setup.py
2829
DEVPKGS=diff_cover black pylint coverage pep257 pytest-xdist \
29-
flake8-bugbear pytest isort flake8
30+
flake8 flake8-bugbear pyupgrade mypy
3031
DEBDEVPKGS=pylint python3-coverage sloccount \
3132
python3-flake8 shellcheck
3233
VERSION=1.0.$(shell date +%Y%m%d%H%M%S --utc --date=`git log --first-parent \
@@ -68,7 +69,7 @@ clean: FORCE
6869
# Linting and code style related targets
6970
## sorting imports using isort: https://github.com/timothycrosley/isort
7071
sort_imports:
71-
isort ${MODULE}/*.py tests/*.py setup.py
72+
isort ${PACKAGE}/*.py tests/*.py setup.py
7273

7374
pep257: pydocstyle
7475
## pydocstyle : check Python code style
@@ -79,7 +80,7 @@ pydocstyle_report.txt: $(PYSOURCES)
7980
pydocstyle setup.py $^ > $@ 2>&1 || true
8081

8182
diff_pydocstyle_report: pydocstyle_report.txt
82-
diff-quality --violations=pycodestyle --fail-under=100 $^
83+
diff-quality --compare-branch=main --violations=pycodestyle --fail-under=100 $^
8384

8485
## format : check/fix all code indentation and formatting (runs black)
8586
format:
@@ -95,7 +96,7 @@ pylint_report.txt: ${PYSOURCES}
9596
$^ -j0> $@ || true
9697

9798
diff_pylint_report: pylint_report.txt
98-
diff-quality --violations=pylint pylint_report.txt
99+
diff-quality --compare-branch main --violations=pylint pylint_report.txt
99100

100101
.coverage: testcov
101102

@@ -115,18 +116,18 @@ coverage-report: .coverage
115116
coverage report
116117

117118
diff-cover: coverage.xml
118-
diff-cover $^
119+
diff-cover --compare-branch main $^
119120

120121
diff-cover.html: coverage.xml
121-
diff-cover $^ --html-report $@
122+
diff-cover --compare-branch main $^ --html-report $@
122123

123124
## test : run the ${MODULE} test suite
124125
test: FORCE
125126
python setup.py test
126127

127128
## testcov : run the ${MODULE} test suite and collect coverage
128129
testcov: $(pysources)
129-
python setup.py test --addopts "--cov ${MODULE}"
130+
python setup.py test --addopts "--cov ${PACKAGE}"
130131

131132
sloccount.sc: ${PYSOURCES} Makefile
132133
sloccount --duplicates --wide --details $^ > $@
@@ -149,7 +150,10 @@ mypy: ${PYSOURCES}
149150
fi # if minimally required ruamel.yaml version is 0.15.99 or greater, than the above can be removed
150151
MYPYPATH=$$MYPYPATH:typeshed/3:typeshed/2and3 mypy --disallow-untyped-calls \
151152
--warn-redundant-casts \
152-
${MODULE}
153+
${PACKAGE}
154+
155+
pyupgrade: $(filter-out schema_salad/metaschema.py,${PYSOURCES})
156+
pyupgrade --exit-zero-even-if-changed --py36-plus $^
153157

154158
release: FORCE
155159
./release-test.sh

0 commit comments

Comments
 (0)