.PHONY: install test lint typecheck fmt clean build all

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

test:
	pytest -q --cov=slopguard --cov-report=term-missing

lint:
	ruff check slopguard/ tests/
	ruff format --check slopguard/ tests/

typecheck:
	mypy --strict slopguard/

fmt:
	ruff format slopguard/ tests/
	ruff check --fix slopguard/ tests/

clean:
	rm -rf build/ dist/ *.egg-info .pytest_cache .mypy_cache .ruff_cache .coverage htmlcov coverage.xml

build:
	python -m build

all: lint typecheck test
