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

Florent Chehab's avatar
Florent Chehab committed
3 4
up:
	docker-compose up
5

Florent Chehab's avatar
Florent Chehab committed
6 7
docker-pull:
	docker-compose pull
Florent Chehab's avatar
Florent Chehab committed
8

Florent Chehab's avatar
Florent Chehab committed
9 10
up--build:
	docker-compose up --build
11

Florent Chehab's avatar
Florent Chehab committed
12 13 14
reformat_backend:
	docker-compose exec backend sh -c "cd backend && black ."

Florent Chehab's avatar
Florent Chehab committed
15
test_backend:
Florent Chehab's avatar
Florent Chehab committed
16
	docker-compose exec backend sh -c "cd backend && pytest base_app/ backend_app/"
17

Florent Chehab's avatar
Florent Chehab committed
18
check_backend:
Florent Chehab's avatar
Florent Chehab committed
19 20 21 22 23 24 25 26 27 28
	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"
29

Florent Chehab's avatar
Florent Chehab committed
30
shell_backend:
31
	docker-compose exec backend sh -c "cd backend && bash"
32

Florent Chehab's avatar
Florent Chehab committed
33
shell_frontend:
34 35 36 37
	docker-compose exec frontend sh -c "cd frontend && sh"

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

Florent Chehab's avatar
Florent Chehab committed
39
# Create or update UML diagrams for the documentation
40
documentation:
Florent Chehab's avatar
Florent Chehab committed
41 42
	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"
43

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