.PHONY: sync fmt test check

sync:
	uv sync

fmt:
	uv run ruff check --fix .
	uv run ruff format .

# 不花钱、不需要 GPU 的测试；make test 和 make check 共用。
FREE_TESTS = not live and not gpu

test:
	uv run pytest -m "$(FREE_TESTS)"

# 每行单独执行；任何一步非零退出，make 就停止。
check:
	uv run ruff check .
	uv run ruff format --check .
	uv run pyright
	uv run lint-imports
	uv run pytest -m "$(FREE_TESTS)"
