-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
27 lines (23 loc) · 961 Bytes
/
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
.PHONY: setup
setup: ## Create a virtual environment for the project and installs all dependencies
poetry install
.PHONY: format
format: ## Automatically format the .py files with Black and Isort
poetry run isort .
poetry run black .
.PHONY: lint
lint: ## Check the .py files with Mypy, Flake8 and Black
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=88 --statistics
poetry run black --check .
poetry run mypy --ignore-missing-imports --disallow-untyped-defs .
.PHONY: tests
tests: ## Run tests with pytest and create the coverage report
PYTHONPATH=${PYTHONPATH}:. poetry run pytest --cov=./ --cov-report=xml
.SILENT: help
help: ## Shows all available commands
set -x
echo "Usage: make [target]"
echo ""
echo "Available targets:"
grep ':.* ##\ ' ${MAKEFILE_LIST} | awk '{gsub(":[^#]*##","\t"); print}' | column -t -c 2 -s $$'\t'| sort