-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (38 loc) · 1.11 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
help:
@echo "Usage:"
@echo " make help prints this help."
@echo " make fix fix formatting and import sort ordering."
@echo " make format run the format checker (black)."
@echo " make lint run the linter (flake8)."
@echo " make setup set up/update the local dev env."
@echo " make sort run the sort checker (isort)."
@echo " make test run the test suite."
.PHONY: fix
fix:
poetry run black -l 79 bindicator tests
poetry run isort .
.PHONY: format
format:
@echo "Running black" && poetry run black -l 79 --check bindicator tests || exit 1
.PHONY: lint
lint:
@echo "Running flake8" && poetry run flake8 bindicator tests || exit 1
.PHONY: setup
setup:
poetry install
poetry run pre-commit install
.PHONY: sort
sort:
@echo "Running Isort" && poetry run isort . --check-only --diff || exit 1
.PHONY: check
check:
@echo "Running MyPy" && poetry run mypy bindicator || exit 1
.PHONY: test
test:
poetry run py.test tests
.PHONY: repl
repl:
poetry run bpython
.PHONY: run
run:
poetry run python bindicator/main.py