-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (29 loc) · 891 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
#!/usr/bin/make -f
include Makefile.msg
help:
$(call amsg,Available targets are:)
$(call amsg,)
$(call amsg,- install)
$(call amsg,- lint)
$(call amsg,- build)
$(call amsg,- test)
$(call amsg,- clean)
install:
$(call bmsg,Installing poetry and dependencies.)
$(call qcmd,pip install -U poetry)
$(call qcmd,poetry install)
lint:
$(call bcmd,pre-commit,run,-poetry run pre-commit run --all-files)
build:
$(call bcmd,poetry build,.,poetry build)
test:
$(call qcmd,rm -rf htmlcov)
$(call bcmd,pytest,--cov, \
poetry run pytest $(O) $(SPECIFIC_TESTS))
$(call bmsg,HTML coverage is available under the following directory:)
$(call bmsg,file://$(realpath .)/htmlcov/index.html)
clean:
$(call rmsg,Cleaning build and cache directories.)
$(call qcmd,rm -rf build .coverage htmlcov .mypy_cache .pytest_cache)
.PHONY: help install lint build test clean
.PHONY: check-exports