-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
52 lines (44 loc) · 1.04 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
44
45
46
47
48
49
50
51
52
.DEFAULT_GOAL := all
package_name = deepdrivemd
extra_folders = tests/ examples/
isort = isort $(package_name) $(extra_folders)
black = black --target-version py37 $(package_name) $(extra_folders)
flake8 = flake8 $(package_name)/ $(extra_folders)
pylint = pylint $(package_name)/ $(extra_folders)
pydocstyle = pydocstyle $(package_name)/
run_mypy = mypy --config-file setup.cfg
.PHONY: install
install:
pip install -U pip setuptools wheel
pip install -r requirements/dev.txt
pip install -r requirements/requirements.txt
pip install -e .
.PHONY: format
format:
$(isort)
$(black)
.PHONY: lint
lint:
$(black) --check --diff
$(flake8)
#$(pylint)
#$(pydocstyle)
.PHONY: mypy
mypy:
$(run_mypy) --package $(package_name)
$(run_mypy) $(package_name)/
$(run_mypy) $(extra_folders)
.PHONY: coverage
coverage:
coverage run -m pytest tests
coverage report
coverage html
open htmlcov/index.html
.PHONY: pygount
pygount:
pygount --format=summary $(package_name)
.PHONY: radon
radon:
radon cc $(package_name) -a
.PHONY: all
all: format lint # mypy