-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
45 lines (35 loc) · 1013 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
44
45
package_name = wise_pizza
coverage_target = 70
max_line_length = 88
venv_name = venv
venv_activate_path := ./$(venv_name)/bin/activate
cov_args := --cov $(package_name) --cov-fail-under=$(coverage_target) --cov-report=term-missing
not_slow = -m "not slow"
.PHONY: clean venv update lint test slowtest cov slowcov
clean:
rm -rf ./$(venv_name)
venv:
python3 -m venv $(venv_name) ;\
. $(venv_activate_path) ;\
pip install --upgrade pip setuptools wheel ;\
pip install --upgrade -r requirements-dev.txt ;\
pip install --upgrade -r requirements.txt
update:
. $(venv_activate_path) ;\
pip install --upgrade -r requirements-dev.txt ;\
pip install --upgrade -r requirements.txt
lint:
. $(venv_activate_path) ;\
flake8 --max-line-length=$(max_line_length)
test:
. $(venv_activate_path) ;\
py.test $(not_slow) --disable-warnings
slowtest:
. $(venv_activate_path) ;\
py.test
cov:
. $(venv_activate_path) ;\
py.test $(cov_args) $(not_slow)
slowcov:
. $(venv_activate_path) ;\
py.test $(cov_args)