-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (34 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
.DEFAULT_GOAL := help
.PHONY: help
help:
@echo "Please use 'make <target>' where target is one of:"
@echo ""
@echo " format-check runs the formatting tools, only checking for errors"
@echo " format-fix runs the formatting tools, fixing errors where possible"
@echo " lint runs the linting tools, only checking for errors"
@echo " typing runs the static type checker, only checking for errors"
@echo " static-check runs the following targets: format-check, lint and typing"
@echo " static-fix runs the following targets: format-fix, lint and typing"
@echo " unit-test runs the unit tests"
@echo ""
.PHONY: format-check
format-check:
black --check src/ tests/
isort --check-only --profile black src/ tests/
.PHONY: format-fix
format-fix:
black src/ tests/
isort --profile black src/ tests/
.PHONY: lint
lint:
flake8 --statistics src/ tests/
.PHONY: typing
typing:
mypy src/ tests/
.PHONY: static-check
static-check: format-check lint typing
.PHONY: static-fix
static-fix: format-fix lint typing
.PHONY: unit-test
unit-test:
pytest --cov-report term-missing --cov=src/ -v -W ignore::DeprecationWarning