generated from niesfutbol/template_py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
70 lines (56 loc) · 1.29 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
all: check coverage mutants
.PHONY: \
all \
check \
clean \
coverage \
format \
init \
install \
linter \
mutants \
setup \
tests
module = streamlit_nies
codecov_token = ba9f5840-913c-4257-a2e9-a2ab4eca1082
define lint
pylint \
--disable=bad-continuation \
--disable=missing-class-docstring \
--disable=missing-function-docstring \
--disable=missing-module-docstring \
${1}
endef
check:
black --check --line-length 100 ${module}
black --check --line-length 100 tests
black --check --line-length 100 .
flake8 --max-line-length 100 ${module}
flake8 --max-line-length 100 tests
mypy ${module}
mypy tests
clean:
rm --force --recursive .*_cache
rm --force --recursive ${module}.egg-info
rm --force --recursive ${module}/__pycache__
rm --force --recursive tests/__pycache__
rm --force .mutmut-cache
rm --force coverage.xml
coverage: setup
pytest --cov=${module} --cov-report=xml --verbose && \
coverage report --show-missing
format:
black --line-length 100 ${module}
black --line-length 100 tests
black --line-length 100 .
init: setup tests
install:
pip install --editable .
linter:
$(call lint, ${module})
$(call lint, tests)
mutants: setup
mutmut run --paths-to-mutate ${module}
setup: clean install
tests:
pytest --verbose