.PHONY: install test lint format check ci wiki

ENV := PolyGateway

install:
	conda run -n $(ENV) pip install -e ".[redis,postgres,structured,dev]"

test:
	conda run -n $(ENV) pytest tests/ --cov=src/polygateway --cov-report=term-missing

lint:
	conda run -n $(ENV) ruff check src/ tests/ --fix
	conda run -n $(ENV) lint-imports

format:
	conda run -n $(ENV) ruff format src/ tests/

check:
	conda run -n $(ENV) ruff format --check src/ tests/
	conda run -n $(ENV) ruff check src/ tests/
	conda run -n $(ENV) lint-imports

ci: check test

wiki:
	conda run -n $(ENV) python3 .claude/tools/research_wiki.py rebuild_index research-wiki/
