-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (33 loc) · 1.08 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
SHELL := /bin/sh -e
.DEFAULT_GOAL := help
# Helper
.PHONY: help
help: ## Display this auto-generated help message
@grep -E '^[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
# Development
.PHONY: update clean format
update: ## Lock and install build dependencies
poetry update
clean: ## Clean project from temp files / dirs
rm -rf build dist
find src -type d -name __pycache__ | xargs rm -rf
format: ## Run auto-formatting linters
poetry run black src
poetry run isort src
# Deployment
.PHONY: install lint test package release
install: ## Install build dependencies from lock file
poetry install -E websocket
lint: ## Run python linters
poetry run black --check src
poetry run isort --check-only src
poetry run pydocstyle src
poetry run flake8 src
poetry run mypy src
test: ## Run pytest with all tests
poetry run pytest src/tests
package: ## Build project wheel distribution
poetry build
release: ## Publish wheel distribution to PyPi
poetry publish --build -u ${PYPI_USER} -p ${PYPI_TOKEN}