.PHONY: install test lint format format-check typecheck check build clean run

install:
	.venv/bin/pip install -e ".[dev,cli]"

test:
	.venv/bin/pytest -q

lint:
	.venv/bin/ruff check src/ tests/

format:
	.venv/bin/ruff format src/ tests/

format-check:
	.venv/bin/ruff format --check src/ tests/

typecheck:
	.venv/bin/mypy

check: lint format-check typecheck test

build:
	rm -rf dist build
	.venv/bin/pip install -q build
	.venv/bin/python -m build -w
	rm -rf build

clean:
	rm -rf dist build .pytest_cache
	find . -name __pycache__ -not -path "./.venv/*" -exec rm -rf {} +

run:
	.venv/bin/rubriq $(ARGS)
