.PHONY: lint format typecheck test install build clean publish

# Standard targets (per CLAUDE.md convention)

lint: format typecheck
	uv run ruff check .

format:
	uv run ruff format .
	uv run ruff check --fix .

typecheck:
	uv run mypy mistralai

test:
	uv run pytest

install:
	uv sync

# Build and publish targets

clean:
	rm -rf dist/

build: clean
	uv build

publish: build
	@if [ -z "$$GEMFURY_USERNAME" ] || [ -z "$$GEMFURY_PASSWORD" ]; then \
		echo "Error: GEMFURY_USERNAME and GEMFURY_PASSWORD must be set"; \
		exit 1; \
	fi
	uv publish --publish-url https://push.fury.io/mistralai/ --username $$GEMFURY_USERNAME --password $$GEMFURY_PASSWORD
