-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (41 loc) · 1.39 KB
/
Makefile
File metadata and controls
51 lines (41 loc) · 1.39 KB
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
.DEFAULT_GOAL := help
.PHONY: help
help:
@echo "Please use 'make <target>' where <target> is one of:"
@echo ""
@echo " format-check Formatting tools: only checks for errors"
@echo " format-fix Formatting tools: fixes errors where possible"
@echo " lint-check Linting tools: only checks for errors"
@echo " type-check Static type checker: only checks for errors"
@echo " docstring-check Docstring checker: checks missing doctrings"
@echo " static-check Runs format-check, lint and typing"
@echo " static-fix Runs format-fix, lint and typing"
@echo " unit-test Runs the unit tests"
@echo " run-examples runs the examples in the example folder."
.PHONY: format-check
format-check:
black --check examples/ src/ tests/
isort --check-only --profile black examples/ src/ tests/
.PHONY: format-fix
format-fix:
black examples/ src/ tests/
isort --profile black examples/ src/ tests/
.PHONY: lint-check
lint-check:
flake8 examples/ src/ tests/
.PHONY: type-check
type-check:
mypy examples/ src/ tests/
.PHONY: docstring-check
docstring-check:
pydocstyle examples/ src/ tests/
.PHONY: static-check
static-check: format-check lint-check type-check
.PHONY: static-fix
static-fix: format-fix lint-check type-check
.PHONY: unit-test
unit-test:
pytest --cov-report term-missing --cov=src/ -vv -W ignore::DeprecationWarning
.PHONY: run-examples
run-examples:
examples/run_examples.sh