-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
41 lines (31 loc) · 978 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
.PHONY: all
all: install
.PHONY: test
test: pre-commit pytest
.venv/bin/pip:
python3 -m venv .venv
.PHONY: install
install: .venv/bin/pip
./.venv/bin/pip install -IU pip
./.venv/bin/pip install -IU .[development,test]
./.venv/bin/pip install -e .
requirements := $(wildcard requirements-dev.txt requirements.d/*.txt)
.venv/bin/pre-commit: $(requirements)
make install
.venv/bin/pytest: $(requirements)
make install
.PHONY: pre-commit
pre-commit: .venv/bin/pre-commit
./.venv/bin/pre-commit install
./.venv/bin/pre-commit run --all
.PHONY: pytests
pytest: .venv/bin/pytest
./.venv/bin/pytest
.PHONY: htmlreport
htmlreport: .venv/bin/pytest
./.venv/bin/pytest --cov-report html
.PHONY: requirements
requirements: .venv/bin/pip
./.venv/bin/pip install -Ue .[development,test]
./.venv/bin/pip freeze --all|egrep -v '^(pip|pkg-resources|wheel|-e|-f)' > requirements.d/requirements-dev.txt
@git difftool -y -x "colordiff -y" requirements.d/requirements-dev.txt