-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Makefile
58 lines (39 loc) · 957 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
51
52
53
54
55
56
57
58
cython-file := streaming_form_data/_parser.pyx
clean:
rm -rf build/
rm -rf dist/
rm -rf streaming_form_data.egg-info
# development
annotate:
cython -a $(cython-file) -o build/annotation.html
compile:
cython $(cython-file)
pip-compile:
pip-compile requirements.in > requirements.txt
pip-sync:
pip-sync requirements.txt
# lint
fmt-black:
black streaming_form_data/*.py tests/ utils/ examples/**/*.py
lint-black:
black --check streaming_form_data/*.py tests/ utils/ examples/**/*.py
lint-ruff:
ruff --select=B,C4,C9,E,F,PLC,PLE,PLW,W .
lint-mypy:
mypy streaming_form_data/
lint: lint-ruff lint-black lint-mypy
# test
test-pytest:
py.test tests/
test: test-pytest
# utils
profile:
python utils/profile.py --data-size 17555000 -c binary/octet-stream
speed-test:
python utils/speedtest.py
.PHONY: clean \
annotate compile \
pip-compile pip-sync \
lint-black lint-flake8 lint-mypy lint \
test-pytest test \
speed-test profile