-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
58 lines (44 loc) · 1.3 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
.PHONY: init install-dev-deps coverage reset fixtures fmt lfmt services \
stop-services serve-django shell migrate
SHELL := /bin/bash
init: install-dev-deps
mkdir -p static/{js,css,images}
npm install
npm run build
poetry run python manage.py collectstatic --no-input
poetry run python manage.py test
poetry run python manage.py migrate
install-dev-deps:
poetry install --with dev
coverage:
rm -rf htmlcov
DJANGO_TEST=1 poetry run coverage run manage.py test
poetry run coverage html
firefox htmlcov/index.html
reset:
poetry run python manage.py reset_db
poetry run python manage.py migrate
fixtures:
poetry run python manage.py init_site
fmt:
@poetry run black --exclude __pycache__ config
@poetry run black --exclude __pycache__ --exclude migrations simple_django
@poetry run isort --skip migrations --skip __pycache__ simple_django
@poetry run isort --skip __pycache__ config
@poetry run djhtml templates/**/*.html
@npx prettier --write staticSrc/js
lint:
@poetry run flake8 config
@poetry run flake8 simple_django
@npm run js-lint
fmtl: fmt lint
services:
docker-compose up -d
stop-services:
docker-compose down
serve-django:
poetry run python manage.py runserver_plus --keep-meta-shutdown
shell:
poetry run python manage.py shell_plus
migrate:
poetry run python manage.py migrate