-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
60 lines (47 loc) · 1.16 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
all: check coverage tests
module = running_analysis
define checkDirectories
mkdir --parents $(@D)
endef
data/processed/half_marathon_ensenada.csv: setup
$(checkDirectories)
running-analysis write-csv "tests/data/medio_maraton_ensenada.gpx" "data/processed/half_maraton_ensenada.csv"
.PHONY: \
check \
clean \
coverage \
format \
mutants \
setup \
tests
check:
black --check --line-length 100 src
black --check --line-length 100 tests
black --check --line-length 100 ${module}
flake8 --max-line-length 100 src
flake8 --max-line-length 100 tests
flake8 --max-line-length 100 ${module}
mypy src
mypy tests
mypy ${module}
clean:
rm --force --recursive .*_cache
rm --force --recursive tests/__pycache__
rm --force .mutmut-cache
rm --force coverage.xml
rm --force data/processed/*.csv
coverage: setup
pytest --cov=${module} --cov-report=term-missing --verbose
format:
black --line-length 100 src
black --line-length 100 tests
black --line-length 100 ${module}
mutants: setup tests
mutmut run --paths-to-mutate src
mutmut run --paths-to-mutate ${module}
init: setup tests
setup: clean install
install:
pip install --editable .
tests:
pytest --verbose