generated from boot-sandre/django-spaninja
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile_devtools
73 lines (63 loc) · 1.88 KB
/
Makefile_devtools
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
clean-pycheck:
@echo ""
@printf "$(FORMATBLUE)$(FORMATBOLD)---> Cleaning Pycheck installation <---$(FORMATRESET)\n"
@echo ""
$(NPM) global remove @pycheck/cli
$(NPM) global remove @pycheck/ui
rm -Rf yarn.lock
rm -Rf package.json
rm -Rf node_modules
.PHONY: clean-pycheck
install-pycheck:
@echo ""
@printf "$(FORMATBLUE)$(FORMATBOLD)---> Installing Pycheck <---$(FORMATRESET)\n"
@echo ""
$(NPM) global add @pycheck/cli
$(NPM) global add @pycheck/ui
.PHONY: install-pycheck
check:
@echo ""
@printf "$(FORMATBLUE)$(FORMATBOLD)---> Run the manage check command <---$(FORMATRESET)\n"
@echo ""
$(DJANGO_MANAGE) check
.PHONY: check
black:
@echo ""
@printf "$(FORMATBLUE)$(FORMATBOLD)---> Run black in write mode <---$(FORMATRESET)\n"
@echo ""
$(BLACK) --extend-exclude='/*/migrations/*|setup.py' .
.PHONY: black
black-dry:
@echo ""
@printf "$(FORMATBLUE)$(FORMATBOLD)---> Run black in check only mode <---$(FORMATRESET)\n"
@echo ""
$(BLACK) --extend-exclude='/*/migrations/*|setup.py' --check .
.PHONY: black-dry
pycheck:
@echo ""
@printf "$(FORMATBLUE)$(FORMATBOLD)---> Pycheck <---$(FORMATRESET)\n"
@echo ""
pycheck --django
.PHONY: pycheck
flake:
@echo ""
@printf "$(FORMATBLUE)$(FORMATBOLD)---> Flake <---$(FORMATRESET)\n"
@echo ""
$(FLAKE) --statistics --show-source $(DJANGOPROJECT_DIR) apps/ skii/ tests/
.PHONY: flake
quality: check check-migrations flake black-dry pycheck
@echo ""
@echo "Running quality checks"
@echo ""
.PHONY: quality
shell_plus:
@echo ""
@printf "$(FORMATBLUE)$(FORMATBOLD)---> Open a Django shell plus <---$(FORMATRESET)\n"
@echo ""
$(DJANGO_MANAGE) shell_plus --settings=${DJANGO_SETTINGS}
.PHONY: shell_plus
ci: clean install quality test
@echo ""
@echo "Running install (venv+pip+migrate) + quality (check/check-migrations/pycheck(flake8/black/pycheck) + unittest to reproduce a usual continuous integration builder process"
@echo ""
.PHONY: ci