-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (33 loc) · 984 Bytes
/
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
TESTS=tests/unit
MODULE=aws_aad_creds/
PE?=pipenv run
PY?=$(PE) python
clean:
-rm -rf build/*
-rm -rf tools/sphinx
-rm -rf tools/pygments
-rm -rf tools/jinja2
-rm -rf tools/docutils
-rm -f coverage.xml
check:
###### FLAKE8 #####
# No unused imports, no undefined vars
$(PE) flake8 --ignore=E731,W503 --exclude compat.py --max-complexity 10 $(MODULE)
$(PE) flake8 $(TESTS)
# Proper docstring conventions according to pep257
# $(PE) pydocstyle --add-ignore=D100,D101,D102,D103,D104,D105,D204,D301 $(MODULE)
pylint:
$(PE) pylint --rcfile .pylintrc $(MODULE)
test:
$(PE) pytest -v $(TESTS)
coverage:
$(PE) pytest --cov $(MODULE) --cov-report term-missing $(TESTS) --cov-report=xml
htmlcov:
$(PE) pytest --cov $(MODULE) --cov-report html $(TESTS)
rm -rf /tmp/htmlcov && mv htmlcov /tmp/
open /tmp/htmlcov/index.html
prcheck: check pylint test
build:
$(PY) setup.py sdist bdist_wheel
publish:
$(PE) twine upload dist/*