forked from adeptex/whispers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
69 lines (54 loc) · 1.53 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
68
69
install:
pip3 install -e .
install-dev:
pip3 install -e ".[dev]"
flake8-lint:
flake8 whispers/ tests/
isort-lint:
isort --check-only whispers/ tests/
black-lint:
black --check whispers/ tests/
lint: isort-lint black-lint flake8-lint
format:
autoflake --in-place --recursive --remove-all-unused-imports whispers/ tests/
autopep8 --in-place --recursive --aggressive --aggressive whispers/ tests/
isort whispers/ tests/
black whispers/ tests/
unit:
pytest --show-capture=all -v tests/
coverage:
coverage run --source=whispers/ --branch -m pytest tests/ --junitxml=build/test.xml -v
coverage xml -i -o build/coverage.xml
coverage report
coverage-badge -f -o coverage.svg
test:
make lint coverage
build-image:
python3 -m build
docker build -t=whispers --rm=true .
# docker rmi -f $$(docker images --filter "dangling=true" -q --no-trunc)
freeze:
CUSTOM_COMPILE_COMMAND="make freeze" \
pip-compile \
--no-emit-index-url \
--output-file requirements.txt \
--no-annotate \
--strip-extras \
--no-allow-unsafe \
setup.py
freeze-upgrade:
CUSTOM_COMPILE_COMMAND="make freeze-upgrade" \
pip-compile \
--no-emit-index-url \
--output-file requirements.txt \
--no-annotate \
--strip-extras \
--no-allow-unsafe \
--upgrade \
setup.py
publish:
python3 setup.py sdist bdist_wheel
twine upload --skip-existing dist/*
test-pip:
python3 -m pip install --index-url https://test.pypi.org/simple/ --no-deps whispers
.PHONY: install install-dev isort-lint black-lint flake8-lint format lint unit coverage test publish build-image