-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (28 loc) · 1.03 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
.PHONY: black black_check coverage flake8 isort isort_check lint mypy safety unittests yamllint
help: ## display available commands with description
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
.DEFAULT_GOAL := help
black: ## run black
black .
black_check: ## run isort check
black . --check
coverage: ## create html coverage report and open it in the default browser
coverage html
xdg-open htmlcov/index.html
flake8: ## run flake8
flake8 .
integration: ## run integration tests
pytest tests/integration_tests.py -s -vv
isort: ## run isort
isort . -rc
isort_check: ## run isort check
isort . -rc --check
lint: mypy flake8 yamllint isort_check black_check ## run all linters
mypy: ## run mypy
mypy src --strict-optional
safety: ## run safety check
safety check -r requirements.txt -r requirements-dev.txt
unittests: ## run pytest with coverage and -s flag for debugging
pytest --cov=vater tests/ -s -vv
yamllint: ## run yamllint
yamllint .