.PHONY: help install install-dev format lint test test-cov clean build check

help:
	@echo "Available commands:"
	@echo "  make install      Install package"
	@echo "  make install-dev  Install package with dev dependencies"
	@echo "  make format       Format code with Ruff"
	@echo "  make lint         Lint code with Ruff"
	@echo "  make test         Run tests"
	@echo "  make test-cov     Run tests with coverage"
	@echo "  make clean        Remove build/cache files"
	@echo "  make build        Build package"
	@echo "  make check        Check built package with Twine"

install:
	pip install -e .

install-dev:
	pip install -e ".[dev]"

format:
	ruff format .

lint:
	ruff check . --fix

test:
	pytest

test-cov:
	pytest --cov=fastvia --cov-report=term-missing

clean:
	rm -rf dist build *.egg-info
	rm -rf .pytest_cache .ruff_cache .mypy_cache htmlcov
	find . -type d -name "__pycache__" -prune -exec rm -rf {} +
	find . -type f -name "*.pyc" -delete

build: clean
	python -m build

check:
	twine check dist/*