.PHONY: run dev test lint clean install

install:
	pip install -r requirements.txt

run:
	hypercorn app:app --bind 0.0.0.0:8000

dev:
	hypercorn app:app --bind 0.0.0.0:8000 --reload

test:
	pytest tests/ -v

lint:
	ruff check src/ tests/ app.py
	ruff format --check src/ tests/ app.py

format:
	ruff check --fix src/ tests/ app.py
	ruff format src/ tests/ app.py

clean:
	find . -type d -name __pycache__ -exec rm -rf {} +
	find . -type f -name "*.pyc" -delete
	rm -rf .pytest_cache htmlcov .coverage

docker-build:
	docker build -t long-article-search-agent .

docker-run:
	docker run --rm --env-file .env -p 8000:8000 long-article-search-agent
