forked from eskerda/pybikes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
48 lines (36 loc) · 1.09 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
T_FLAGS =
.PHONY: install
install:
python -m pip install --upgrade pip
pip install -r requirements.txt
.PHONY: test
test: install
pytest tests -m 'not update' $(T_FLAGS)
.PHONY: test-update
test-update: install
pytest tests -m update $(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/report.json:
pytest tests -m update --json-report --json-report-file=report/report.json $(T_FLAGS)
.PHONY: report
report: report/report.json
.PHONY: summary
summary: report/report.json
@./utils/report.py report/report.json
.PHONY: map
map: report/report.json
@./utils/report.py report/report.json --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/report.json
@./utils/report.py report/report.json --template utils/github-summary.tpl.md
.PHONY: clean
clean: clean-report
.PHONY: clean-report
clean-report:
rm -rf report/