-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
59 lines (43 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.PHONY: install dev_install upgrade_dependencies
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
upgrade_dependencies: dev_install
pip install pip-tools
pip-compile --upgrade --output-file ./requirements.txt requirements.in
pip-compile --upgrade --output-file ./dev_requirements.txt dev_requirements.in
coverage:
coverage run --source='.' manage.py test tests/
#
# Code Checks
#
.PHONY: pre-commit check semgrep
pre-commit:
pre-commit run -a
check: pre-commit coverage
#
# Extended Reports
#
.PHONY: smells security complexity check-advanced check-extended
smells:
semgrep --config=p/r2c-ci --config=p/python
security:
bandit -r apps pxapi
complexity:
wily build apps pxapi
wily report apps
wily report pxapi
doc-style:
pydocstyle --match-dir="[^(\.|migrations)].*" apps pxapi
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 apps pxapi tests *.py