forked from xaralis/ksicht
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
59 lines (39 loc) · 1 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
init-env:
python3 -m venv .env
install:
pip install pip-tools && pip install --upgrade -r requirements.txt && npm install
install-test:
pip install --upgrade -r requirements-test.txt
install-dev:
pip install --upgrade -r requirements-dev.txt
run:
DEBUG=1 DEBUG_TOOLBAR=1 ./node_modules/.bin/concurrently -r -k "python manage.py runserver 8080" "./node_modules/.bin/webpack --config webpack.config.js --mode development --watch"
dep-freeze:
pip-compile requirements.in
test:
pytest
migrate:
DEBUG=1 python manage.py migrate
build:
docker build -t xaralis/ksicht:latest .
push:
docker push xaralis/ksicht:latest
release:
make build
make push
# --- code checks ---
MODULES ?= ksicht tests
ALL_MODULES ?= $(MODULES)
.PHONY: code-checks
code-checks: pylint black isort
PYLINT_ARGS ?=
.PHONY: pylint
pylint: ## lint code
pylint $(PYLINT_ARGS) $(ALL_MODULES)
BLACK_ARGS ?=
.PHONY: black
black: ## check code formating
black $(BLACK_ARGS) $(ALL_MODULES)
.PHONY: isort
isort:
isort -rc $(ALL_MODULES)