.PHONY: install lint fmt typecheck test cov up down logs ps

install:
	uv sync

lint:
	uv run ruff check .
	uv run ruff format --check .
	uv run mypy

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

test:
	uv run pytest -q

cov:
	uv run pytest -q --cov --cov-report=term

up:
	@test -f .env || { cp .env.example .env; echo "created .env from .env.example — fill in the secrets"; }
	docker compose up -d --build

down:
	docker compose down

logs:
	docker compose logs -f --tail=100 bot

ps:
	docker compose ps
