Makefile 1.24 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

18 19 20
test_frontend:
	docker-compose exec frontend sh -c "cd frontend && npm run test"

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

Florent Chehab's avatar
Florent Chehab committed
33
shell_backend:
34
	docker-compose exec backend sh -c "cd backend && bash"
35

Florent Chehab's avatar
Florent Chehab committed
36
shell_frontend:
37 38 39 40
	docker-compose exec frontend sh -c "cd frontend && sh"

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

42
# Create or update UML diagrams for the documentation
43
documentation:
44 45
	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"
46

47
documentation_clean:
48
	docker-compose exec backend bash -c "cd documentation && make clean"