-
-
Notifications
You must be signed in to change notification settings - Fork 35
/
Makefile
46 lines (38 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
SHELL := /bin/bash
setup:
python3 -m venv venv
source venv/bin/activate && ( \
pip install -r requirements.txt; \
pip install -r tests/requirements.txt; \
pip install black isort flake8 pylint pytype mypy; \
)
test:
python3 -m pytest tests --cov=zero --cov-report=term-missing --cov-config=.coveragerc -vv --durations=10 --timeout=280
docker-test:
docker build -t zero-test -f Dockerfile.test.py38 .
docker run --rm zero-test
docker rmi zero-test
docker build -t zero-test -f Dockerfile.test.py39 .
docker run --rm zero-test
docker rmi zero-test
docker build -t zero-test -f Dockerfile.test.py310 .
docker run --rm zero-test
docker rmi zero-test
format:
isort . --profile black -l 99
black .
install-lint:
python -m pip install --upgrade pip
pip install -r requirements.txt # needed for pytype
pip install black isort flake8 pylint pytype mypy
lint:
flake8 ./zero
pylint ./zero
pytype ./zero
mypy ./zero
build-package:
pip install -U setuptools wheel
python3 setup.py sdist bdist_wheel
dist-package:
pip install -U twine
python3 -m twine upload dist/*