-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (40 loc) · 1.33 KB
/
Makefile
File metadata and controls
52 lines (40 loc) · 1.33 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
.PHONY: help lint format type-check precommit test migrate-create migrate-up migrate-down migrate-current migrate-history celery
help:
@echo "Available commands:"
@echo " make lint - Run ruff linter with auto-fix"
@echo " make format - Format code with ruff"
@echo " make type-check - Run ty type checker"
@echo " make precommit - Run pre-commit hooks on all files"
@echo " make test - Run pytest with stop on first failure"
@echo " make migrate-create - Create new migration (use MSG='message')"
@echo " make migrate-up - Apply all migrations"
@echo " make migrate-down - Rollback last migration"
@echo " make migrate-current- Show current migration"
@echo " make migrate-history- Show migration history"
@echo " make celery - Start Celery worker"
# Code Quality
lint:
uv run ruff check --fix .
format:
uv run ruff format .
type-check:
uv run ty check src/
precommit:
uv run pre-commit run --all-files
# Testing
test:
uv run pytest -x
# Database Migrations
migrate-create:
uv run alembic revision --autogenerate -m "$(MSG)"
migrate-up:
uv run alembic upgrade head
migrate-down:
uv run alembic downgrade -1
migrate-current:
uv run alembic current
migrate-history:
uv run alembic history --verbose
# Celery
celery:
uv run celery -A celery_config worker --loglevel=info