.PHONY: bootstrap db-upgrade db-downgrade db-reset test lint typecheck ci test-unit test-integration test-replay

bootstrap:
	pip install -e ".[dev]"

db-upgrade:
	alembic upgrade head

db-downgrade:
	alembic downgrade -1

db-reset:
	alembic downgrade base
	alembic upgrade head

test-unit:
	pytest -m unit -v --cov=libs --cov=apps --cov-report=term-missing

test-integration:
	pytest -m integration -v

test-replay:
	pytest -m replay -v

test:
	pytest -v --cov=libs --cov=apps --cov-report=term-missing

lint:
	ruff check libs/ apps/ tests/
	ruff format --check libs/ apps/ tests/

typecheck:
	mypy libs/ apps/

ci: lint typecheck test-unit

format:
	ruff format libs/ apps/ tests/
	ruff check --fix libs/ apps/ tests/
