-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
52 lines (39 loc) · 1.18 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
check:
python -m flake8 --max-complexity 10 declxml.py
python -m flake8 --max-complexity 10 tests/
python -m pydocstyle --add-ignore=D105 declxml.py
coverage:
python -m coverage run tests/run_tests.py --junit-xml=test-results.xml
# A few lines only run depending on whether it is Python 2 or Python 3
python -m coverage xml --fail-under=99 -o coverage.xml
python -m coverage html
python -m coverage report
docbuild:
$(MAKE) -C docs html
doccheck: docbuild
doc8 docs/*.rst
html-coverage:
python -m coverage run tests/run_tests.py
python -m coverage html
rm -rf /tmp/htmlcov && mv htmlcov /tmp/
open /tmp/htmlcov/index.html
html-doc: docbuild
open docs/_build/html/index.html
install:
python -m pip install pipenv
python -m pipenv install --dev --skip-lock
lint: check pylint typecheck
mutation-test:
cosmic-ray init cosmic-ray.yml session
cosmic-ray --verbose exec session
cosmic-ray dump session | cr-report
package:
python setup.py sdist
prcheck: check pylint doccheck coverage package
pylint:
python -m pylint --rcfile .pylintrc declxml.py
test:
python -m pytest -vv --junit-xml=test-results.xml
typecheck:
python -m mypy declxml.py
python -m mypy --py2 declxml.py