-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (39 loc) · 1.14 KB
/
Makefile
File metadata and controls
47 lines (39 loc) · 1.14 KB
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
# http://postd.cc/auto-documented-makefile/
.DEFAULT_GOAL := help
help: FORCE ## Show this help
@grep -E '^[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
| awk 'BEGIN {FS = ":.*?## "}; {printf "%-30s %s\n", $$1, $$2}'
docs: FORCE ## Generate docs through pdoc
poetry run pdoc --html message_channel
rm -rf docs
mv html/message_channel docs
rmdir html
lint: FORCE ## Run lint with fixer
poetry run black .
poetry run isort --atomic .
poetry run autoflake \
-r --in-place \
--exclude ".venv" \
--remove-all-unused-imports \
--remove-unused-variables \
.
poetry run flake8
lint-nofix: FORCE ## Run lint without fixer
poetry run black --check .
poetry run isort --check .
poetry run autoflake \
-r --check \
--exclude ".venv" \
--remove-all-unused-imports \
--remove-unused-variables \
.
poetry run flake8
type: FORCE ## Run type test
poetry run mypy ${ARGS} .
type-nocache: FORCE ## Run type test without cache
make ARGS=--no-incremental type
test: FORCE ## Run unit test
poetry run pytest ${ARGS} -vv --ff
test-nocache: FORCE ## Run unit test without cache
make ARGS=--cache-clear test
FORCE: