-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
67 lines (47 loc) · 1.34 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
64
65
66
67
.PHONY: clean build local debug annotate dist docs style mypy ruff style-check lint test quicktest coverage
PYTHON?=python
all: local
clean:
pip uninstall -y asynctnt
rm -rf asynctnt/*.c asynctnt/*.h asynctnt/*.cpp
rm -rf asynctnt/*.so asynctnt/*.html
rm -rf asynctnt/iproto/*.c asynctnt/iproto/*.h
rm -rf asynctnt/iproto/*.so asynctnt/iproto/*.html asynctnt/iproto/requests/*.html
rm -rf build *.egg-info .eggs dist
find . -name '__pycache__' | xargs rm -rf
rm -rf htmlcov
rm -rf __tnt*
rm -rf tests/__tnt*
build:
$(PYTHON) -m pip install -e '.[test,docs]'
local:
$(PYTHON) -m pip install -e .
debug: clean
ASYNCTNT_DEBUG=1 $(PYTHON) -m pip install -e '.[test]'
annotate:
cython -3 -a asynctnt/iproto/protocol.pyx
dist:
$(PYTHON) -m build .
docs: build
$(MAKE) -C docs html
style:
$(PYTHON) -m black .
$(PYTHON) -m isort .
mypy:
$(PYTHON) -m mypy --enable-error-code ignore-without-code .
ruff:
$(PYTHON) -m ruff check .
style-check:
$(PYTHON) -m black --check --diff .
$(PYTHON) -m isort --check --diff .
lint: style-check ruff
test: lint
PYTHONASYNCIODEBUG=1 $(PYTHON) -m pytest
$(PYTHON) -m pytest
USE_UVLOOP=1 $(PYTHON) -m pytest
quicktest:
$(PYTHON) -m pytest
coverage:
$(PYTHON) -m pytest --cov
./scripts/run_until_success.sh $(PYTHON) -m coverage report -m
./scripts/run_until_success.sh $(PYTHON) -m coverage html