-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (44 loc) · 1.06 KB
/
Makefile
File metadata and controls
52 lines (44 loc) · 1.06 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
52
.DEFAULT_GOAL := all
package_name = scaffold_implementation
extra_folders =
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:
pip3 install -U pip setuptools wheel
pip3 install -r requirements/dev.txt
pip3 install -r requirements/requirements.txt
pip3 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:
python -m coverage run -m pytest tests
python -m coverage report
python -m 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