-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (42 loc) · 990 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
##@ Testing
.PHONY: unit-tests
unit-tests:
@pytest
.PHONY: unit-tests-cov
unit-tests-cov:
@pytest --cov=src --cov-report term-missing --cov-report=html
.PHONY: unit-tests-cov-fail
unit-tests-cov-fail:
@pytest --cov=src --cov-report term-missing --cov-report=html --cov-fail-under=80 --junitxml=pytest.xml | tee pytest-coverage.txt
##@ Formatting
.PHONY: format-black
format-black:
@black .
.PHONY: format-isort
format-isort:
@isort .
.PHONY: format
format: format-black format-isort
##@ Linting
.PHONY: lint-black
lint_black:
@black . --check
.PHONY: lint-isort
lint-isort:
@isort . --check
.PHONY: lint-flake8
lint-flake8:
@flake8 .
.PHONY: lint-mypy
lint-mypy:
@mypy --config-file pyproject.toml .
.PHONY: lint-mypy-report
lint-mypy-report:
@mypy --config-file pyproject.toml . --html-report ./mypy_html
lint: lint-black lint-isort lint-flake8 lint-mypy
##@ Clean-up
clean-cov:
@rm -rf .coverage
@rm -rf htmlcov
@rm -rf pytest.xml
@rm -rf pytest-coverage.txt