Makefile 1.37 KB
Newer Older
Florent Chehab's avatar
Florent Chehab committed
1
.PHONY: documentation
2

Florent Chehab's avatar
Florent Chehab committed
3
4
5
6
7
8
9
10
setup:
	bash envs/init.sh

clear_setup:
	rm envs/db.env
	rm envs/django.env

up: setup
Florent Chehab's avatar
Florent Chehab committed
11
	docker-compose up
12

Florent Chehab's avatar
Florent Chehab committed
13
14
docker-pull:
	docker-compose pull
Florent Chehab's avatar
Florent Chehab committed
15

Florent Chehab's avatar
Florent Chehab committed
16
17
up--build:
	docker-compose up --build
18

Florent Chehab's avatar
Florent Chehab committed
19
20
21
reformat_backend:
	docker-compose exec backend sh -c "cd backend && black ."

Florent Chehab's avatar
Florent Chehab committed
22
test_backend:
Florent Chehab's avatar
Florent Chehab committed
23
	docker-compose exec backend sh -c "cd backend && pytest --cov --cov-config .coveragerc --cov-report term   base_app/ backend_app/"
24

25
26
27
test_frontend:
	docker-compose exec frontend sh -c "cd frontend && npm run test"

Florent Chehab's avatar
Florent Chehab committed
28
check_backend:
Florent Chehab's avatar
Florent Chehab committed
29
30
31
32
33
34
35
36
37
38
	docker-compose exec backend sh -c "cd backend && ./manage.py check"

lint_backend:
	docker-compose exec backend sh -c "cd backend && flake8"

lint_frontend:
	docker-compose exec frontend sh -c "cd frontend && npm run lint"

build_frontend:
	docker-compose exec frontend sh -c "cd frontend && npm run build"
39

Florent Chehab's avatar
Florent Chehab committed
40
shell_backend:
41
	docker-compose exec backend sh -c "cd backend && bash"
42

Florent Chehab's avatar
Florent Chehab committed
43
shell_frontend:
44
45
46
47
	docker-compose exec frontend sh -c "cd frontend && sh"

django_shell:
	docker-compose exec backend sh -c "cd backend && ./manage.py shell"
48

Florent Chehab's avatar
Florent Chehab committed
49
# Create or update UML diagrams for the documentation
50
documentation:
Florent Chehab's avatar
Florent Chehab committed
51
52
	docker-compose exec backend bash -c "cd documentation && make extract_django"
	docker-compose exec gen_doc_uml bash -c "cd /usr/src/app/documentation && make convert_to_svg"
53

54
documentation_clean:
Florent Chehab's avatar
Florent Chehab committed
55
	docker-compose exec backend bash -c "cd documentation && make clean"