-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
56 lines (41 loc) · 1.04 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
SOURCE_GLOB=$(wildcard bin/*.py src/**/*.py tests/**/*.py examples/*.py)
#
IGNORE_PEP=E203,E221,E241,E272,E501,F811
# help scripts to find the right place of wechaty module
export PYTHONPATH=src/
.PHONY: lint
lint: pylint pycodestyle flake8 mypy
# disable: TODO list temporay
.PHONY: pylint
pylint:
pylint \
--load-plugins pylint_quotes \
--disable=W0511,R0801,cyclic-import,C4001 \
$(SOURCE_GLOB)
.PHONY: install
install:
pip3 install -r requirements.txt
pip3 install -r requirements-dev.txt
.PHONY: pytest
pytest:
pytest src/ tests/
.PHONY: test-unit
test-unit: pytest
.PHONY: test
test: pytest pylint
.PHONY: dist
dist:
python3 setup.py sdist bdist_wheel
.PHONY: publish
publish:
PATH=~/.local/bin:${PATH} twine upload dist/*
.PHONY: run
run:
python serving.py
.PHONY: build
build:
docker build -t antigen-classifier:0.1 .
.PHONY: run
run:
docker stop antigen-classifier && docker rm antigen-classifier
docker run -it -d -v $(PWD)/:/antigenclassifier/ -p 8089:8089 --restart=always --name=antigen-classifier antigen-classifier:0.1