-
Notifications
You must be signed in to change notification settings - Fork 96
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (36 loc) · 1.17 KB
/
Makefile
File metadata and controls
44 lines (36 loc) · 1.17 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
.PHONY: help install runserver migrate migrations fmt check test ci
help:
@echo "Available commands:"
@echo " make install - Install dependencies with uv"
@echo " make runserver - Run Django development server"
@echo " make migrate - Apply database migrations"
@echo " make migrations - Create new migrations"
@echo " make fmt - Run code formatter"
@echo " make check - Run Django checks and type checking"
@echo " make test - Run tests"
@echo " make ci - Short for fmt + check + test"
install:
uv sync
uv run prek install
runserver:
uv run python manage.py runserver_plus
migrate:
uv run python manage.py migrate
migrations:
files=$$(uv run python manage.py makemigrations --scriptable) && \
if [ -n "$$files" ]; then \
uv run prek run --files $$files; \
fi
fmt:
uv run prek run --all-files
check:
uv run python manage.py check
uv run python manage.py validate_templates
uv run python manage.py makemigrations --check --dry-run
uv run pyright .
test:
uv run pytest -n auto --cov --cov-report=term-missing --cov-report=lcov:coverage/lcov.info
ci:
make fmt
make check
make test