-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (43 loc) · 1.43 KB
/
Makefile
File metadata and controls
59 lines (43 loc) · 1.43 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
# Use the first argument as the target and the rest as arguments
RUN_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
chown:
sudo chown -R $(USER):$(USER) .
clean:
@find . -name "*.DS_Store" | xargs rm -rf
@find . -name "*.pyc" | xargs rm -rf
@find . -name "*.pyo" | xargs rm -rf
@find . -name "__pycache__" -type d | xargs rm -rf
@find . -name ".swp" -type d | xargs rm -rf
@rm -f .coverage
@rm -rf htmlcov
@rm -f coverage.xml
@rm -f *.log
docker-up:
docker compose up $(RUN_ARGS)
docker-down:
docker container prune $(RUN_ARGS)
docker compose down --rmi local $(RUN_ARGS)
dep-install:
docker compose exec web uv add $(RUN_ARGS)
linter:
docker compose exec web uvx run ruff format .
exec:
docker compose exec $(RUN_ARGS)
exec-web:
docker compose exec web $(RUN_ARGS)
# App commands
shell:
docker compose exec web uv run python manage.py shell $(RUN_ARGS)
migrations:
docker compose exec web uv run python manage.py makemigrations $(RUN_ARGS)
migrate:
docker compose exec web uv run python manage.py migrate $(RUN_ARGS)
superuser:
docker compose exec web uv run python manage.py createsuperuser $(RUN_ARGS)
test: clean
docker compose exec web uv run python manage.py test $(RUN_ARGS)
test-cov: clean
docker compose exec web uv run coverage run --source="." manage.py test $(RUN_ARGS)
docker compose exec web uv run coverage report -m $(RUN_ARGS)
cov:
docker compose exec web uv run coverage report -m $(RUN_ARGS)