-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
40 lines (30 loc) · 1.01 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
.PHONY: help
help:
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
PACKAGES?=socketio_emitter tests
.venv: pyproject.toml poetry.lock
@poetry install
install: ## Install the project
@poetry install
test-lint: ## Run lints in the check mode (useful for CI)
@poetry run isort $(PACKAGES) -c
@poetry run black --check $(PACKAGES)
@poetry run flake8 $(PACKAGES)
@poetry run mypy --pretty $(PACKAGES)
lint: ## Lint the source code
@poetry run isort $(PACKAGES)
@poetry run black $(PACKAGES)
@poetry run flake8 $(PACKAGES)
@poetry run mypy --pretty $(PACKAGES)
test: ## Run the test suite
@poetry run pytest tests -v
coverage: ## Generate Test Coverage
@poetry run coverage run -m pytest tests
coverage-report: ## Generate Coverage Report
@poetry run coverage html
build: ## Pack the library into a distributable way
@poetry build
clean: ## Clean project
@rm -rf .mypy_cache
@rm -rf .pytest_cache
@rm -rf .coverage htmlcov