-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
61 lines (49 loc) · 1.11 KB
/
Makefile
File metadata and controls
61 lines (49 loc) · 1.11 KB
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
all: check coverage mutants
module = distdens
codecov_token = eae768b1-8c32-40a8-89fd-6b7589f9efa8
define lint
pylint \
--disable=bad-continuation \
--disable=missing-class-docstring \
--disable=missing-function-docstring \
--disable=missing-module-docstring \
${1}
endef
.PHONY: \
all \
check \
clean \
coverage \
format \
init \
install \
linter \
mutants \
tests
check:
black --check --line-length 100 ${module}
black --check --line-length 100 tests
flake8 --max-line-length 100 ${module}
flake8 --max-line-length 100 tests
clean:
rm --force .mutmut-cache
rm --recursive --force ${module}.egg-info
rm --recursive --force ${module}/__pycache__
rm --recursive --force test/__pycache__
rm --recursive --force mutants
coverage: install
pytest --cov=${module} --cov-report=xml --verbose && \
codecov --token=${codecov_token}
format:
black --line-length 100 ${module}
black --line-length 100 tests
init: install tests
install:
pip install --editable .
linter:
$(call lint, ${module})
$(call lint, tests)
mutants: install
mutmut run
tests:
pytest --verbose