.PHONY: install test build publish lint format clean docs

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

test:
	pytest tests/ -v --ignore=tests/test_server.py --cov=step_distill --cov-report=xml --cov-report=term-missing
	pytest tests/test_server.py -v --cov=step_distill --cov-append --cov-report=xml --cov-report=term-missing

build:
	python -m build

publish:
	twine upload dist/*

lint:
	ruff check step_distill/ && black --check step_distill/

format:
	black step_distill/ && isort step_distill/

clean:
	rm -rf dist/ build/ *.egg-info __pycache__ .pytest_cache
	find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
	find . -type d -name "*.egg-info" -exec rm -rf {} + 2>/dev/null || true

docs:
	mkdocs serve
