-
Notifications
You must be signed in to change notification settings - Fork 169
/
Makefile
56 lines (42 loc) · 1.22 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
T_FLAGS =
R_FILE ?= report.json
.PHONY: install
install:
python -m pip install --upgrade pip
pip install -r requirements.txt
.PHONY: test
test: install
pytest tests -m 'not update and not changes' $(T_FLAGS)
.PHONY: test-update
test-update: install
pytest tests -m update $(T_FLAGS)
.PHONY: test-changes
test-changes: install
pytest tests -m changes $(T_FLAGS)
.PHONY: lint
lint:
flake8 pybikes tests --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 pybikes tests --count --exit-zero --max-complexity=10 --max-line-length=88 --statistics
report/$(R_FILE):
pytest tests -m update $(T_FLAGS) --json-report --json-report-file=report/$(R_FILE)
.PHONY: report
report: report/$(R_FILE)
.PHONY: report!
report!: clean report
.PHONY: summary
summary: report/$(R_FILE)
@./utils/report.py report/$(R_FILE)
.PHONY: map
map: report/$(R_FILE)
@./utils/report.py report/$(R_FILE) --template utils/map.tpl.html > report/map.html
@open report/map.html || xdg-open report/map.html
.PHONY: map!
map!: clean map
.PHONY: github-summary
github-summary: report/$(R_FILE)
@./utils/report.py report/$(R_FILE) --template utils/github-summary.tpl.md
.PHONY: clean
clean: clean-report
.PHONY: clean-report
clean-report:
rm -rf report/