-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (41 loc) · 992 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
46
47
48
49
50
.PHONY: help dev lock test cover cover-html fmt type pre-commit
.DEFAULT: help
help:
@echo "make dev"
@echo " prepare development environment"
@echo "make lock"
@echo " lock requirements"
@echo "make test"
@echo " run tests"
@echo "make cover"
@echo " run tests and coverage"
@echo "make cover-html"
@echo " run tests, coverage and open HTML report"
@echo "make fmt"
@echo " run black code formatter"
@echo "make type"
@echo " run mypy static type checker"
@echo "make pre-commit"
@echo " run pre-commit hooks"
dev:
pipenv install --dev
pipenv run pre-commit install
lock:
pipenv lock
pipenv requirements > requirements.txt
pipenv requirements --dev > requirements-dev.txt
test:
pipenv run test
cover:
pipenv run coverage run -m unittest
pipenv run coverage report -m
cover-html:
pipenv run coverage run -m unittest
pipenv run coverage html
open htmlcov/index.html
fmt:
pipenv run black .
type:
pipenv run mypy zerolog
pre-commit:
pipenv run pre-commit