-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (41 loc) · 984 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
.PHONY: test version tests build dist release
ifndef VERBOSE
.SILENT:
endif
default:
@echo "Usage:"
@echo "- make test | run tests"
@echo "- make black | run black -l 120"
@echo "- make release | upload dist and push tag"
pytest:
PYTHONPATH=. poetry run pytest --cov-report term-missing --cov=beautiful tests/
flake8:
poetry run flake8 beautiful/ tests/
mypy:
poetry run mypy beautiful/
version:
poetry version `python beautiful/__version__.py`
black:
poetry run black beautiful/ tests/
isort:
poetry run isort beautiful/ tests/
build:
rm -rf dist/
poetry build
release:
make pytest
make flake8
make mypy
make version
make build
poetry publish
git add pyproject.toml beautiful/__version__.py
git commit -m "Bumped version" --allow-empty
git tag -a `python beautiful/__version__.py` -m `python beautiful/__version__.py`
git push
git push --tags
test: pytest flake8 mypy
tests: test
dist: build
lint: flake8 mypy
pylint: flake8 mypy