-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
63 lines (44 loc) · 1.07 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
57
58
59
60
61
62
63
.PHONY: install-requirements compile-requirements \
build-source build-wheel build \
publish-test publish release \
version-patch version-minor \
version-major fmt lint fmtl coverage open-coverage test
export CONFIG_FILE=/tmp/mailiness.ini
install-requirements:
pip install -r requirements/base.txt -r requirements/dev.txt
pip install -e .
compile-requirements:
pip-compile -o requirements/base.txt pyproject.toml
pip-compile --extra dev -o requirements/dev.txt pyproject.toml
build-source:
hatch build -t sdist
build-wheel:
hatch build -t wheel
build: build-source build-wheel
publish-test:
hatch publish -r testpypi
publish:
hatch publish
release: build publish
version-patch:
hatch version patch
version-minor:
hatch version minor
version-major:
hatch version major
fmt:
@black --exclude __pycache__ src tests
@isort --skip __pycache__ src tests
lint:
@flake8 src tests
fmtl: fmt lint
test:
python -m unittest
coverage:
@rm -rf htmlcov
@coverage run -m unittest discover
open-coverage:
@coverage html
@firefox htmlcov/index.html
clean:
hatch clean