-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
74 lines (53 loc) · 1.64 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
.PHONY: help Makefile
.PHONY: install dev_install upgrade_dependencies upgrade_batch_dependencies
cli_install:
pip install -e .
install:
pip install -r requirements.txt
dev_install: install
pip install -r dev_requirements.txt
pre-commit install
pre-commit install --hook-type commit-msg
docker_install:
pip install -r ./batch/docker/tensorflow_requirements.txt
pip install -r ./batch/docker/requirements.txt
upgrade_dependencies:
pip install pip-tools
pip-compile --upgrade --output-file ./requirements.txt requirements.in
pip-compile --upgrade --output-file ./dev_requirements.txt dev_requirements.in
upgrade_batch_dependencies:
pip-compile --upgrade --output-file ./batch/docker/tensorflow_requirements.txt ./batch/docker/tensorflow_requirements.in
pip-compile --upgrade --output-file ./batch/docker/requirements.txt ./batch/docker/requirements.in
#
# Code Checks
#
.PHONY: pre-commit check coverage
pre-commit:
pre-commit run -a
coverage:
python -m pytest --cov=pixels --cov-report term --cov-report html:reports/coverage-integration --cov-report term:skip-covered
check: pre-commit coverage
open-coverage:
xdg-open reports/coverage-integration/index.html
#
# Extended Reports
#
.PHONY: smells security complexity check-advanced check-extended
smells:
semgrep --config=p/r2c-ci --config=p/python
security:
bandit -r pixels
complexity:
wily build pixels
wily report pixels
doc-style:
pydocstyle batch/runpixels.py pixels
check-advanced: smells security
check-picky: complexity doc-style
check-extended: check check-advanced check-picky
#
# Code Checks auto-fix
#
.PHONY: black
black:
python -m black -tpy38 batch pixels tests *.py