-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (42 loc) · 1.03 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
SERVICE_NAME=aqara_msg_push
IMAGE_NAME=${SERVICE_NAME}
TEST_IMAGE_NAME=${IMAGE_NAME}:test
PROD_IMAGE_NAME=${IMAGE_NAME}:prod
MYPY_FLAGS=--namespace-packages \
--ignore-missing-imports \
--no-implicit-reexport \
--python-version 3.10 \
--warn-unreachable \
--warn-redundant-casts \
--warn-incomplete-stub \
--no-warn-no-return \
--no-implicit-optional \
--disallow-untyped-defs \
--disallow-untyped-calls \
--check-untyped-defs \
--strict-equality \
--disallow-untyped-decorators \
--disallow-incomplete-defs \
--disallow-any-generics \
--show-error-codes \
--pretty \
--follow-imports=normal \
--allow-redefinition \
--no-incremental
isort:
isort ${SERVICE_NAME} -w 120 -m 5 -j 4
mypy:
python -m mypy ${SERVICE_NAME} ${MYPY_FLAGS}
flake8:
python -m flake8 ${SERVICE_NAME} --max-line-length 120
pylint:
python -m pylint ${SERVICE_NAME} --rcfile=ci/.pylint.cfg
fmt: isort
lint: mypy pylint flake8
echo "Tests passed!"
build:
python setup.py bdist_wheel --universal
clear:
rm -rf build dist
push:
twine upload dist/*