-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
83 lines (61 loc) · 2.38 KB
/
Copy pathMakefile
File metadata and controls
83 lines (61 loc) · 2.38 KB
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
75
76
77
78
79
80
81
82
.PHONY: all help translate test clean update compass collect rebuild
# target: all - Default target. Does nothing.
all:
@echo "Hello $(LOGNAME), nothing to do by default"
@echo "Try 'make help'"
# target: help - Display callable targets.
help:
@egrep "^# target:" [Mm]akefile
# target: test - calls the "test" django command
test:
docker-compose exec backend pytest
coverage: # Run tests, generate coverage report, and open it
docker-compose exec backend coverage run -m pytest
docker-compose exec backend coverage html
open backend/htmlcov/index.html
# target: bash
bash:
docker-compose exec backend bash
# target: test - calls the "test" django command
shell:
docker-compose exec backend python manage.py shell
# target: update - install (and update) pip requirements
update:
docker-compose exec backend pip install -r requirements/local.txt
# target: collect - calls the "collectstatic" django command
collect:
docker-compose exec backend python manage.py collectstatic --noinput
# target: collect - calls the "makemigrations" django command
migrations:
docker-compose exec backend python manage.py makemigrations
# target: collect - calls the "migrate" django command
migrate:
docker-compose exec backend python manage.py migrate
# target: rebuild - clean, update, collect, then rebuild all data
rebuild: clean update collect
docker-compose exec backend python manage.py flush
docker-compose exec backend python manage.py makemigrations
docker-compose exec backend python manage.py migrate
loadfixtures:
docker-compose exec backend python manage.py loaddata fixtures/users
docker-compose exec backend python manage.py loaddata fixtures/events
docker-compose exec backend python manage.py loaddata fixtures/participants
createsuperuser: # Create django super user
docker-compose exec backend python manage.py createsuperuser
swagger:
docker-compose exec backend python manage.py generate_swagger swagger.yaml -o -f yaml
# Linting #######################################################################
flake8:
docker-compose exec backend flake8
isort:
docker-compose exec backend isort .
black:
docker-compose exec backend black .
lint:
docker-compose exec backend flake8 --exit-zero
docker-compose exec backend isort .
docker-compose exec backend black --check .
frontendformat:
docker-compose exec frontend npm run format
frontendlint:
docker-compose exec frontend npm run lint