.PHONY: help install install-dev test coverage format lint clean build publish example benchmark

help:  ## Show this help message
	@echo "Available commands:"
	@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "  \033[36m%-15s\033[0m %s\n", $$1, $$2}'

install:  ## Install package
	pip install -e .

install-dev:  ## Install package with development dependencies
	pip install -e ".[dev]"
	pip install -r requirements-dev.txt

test:  ## Run tests
	pytest tests/ -v

coverage:  ## Run tests with coverage report
	pytest tests/ -v --cov=taskmon --cov-report=html --cov-report=term

format:  ## Format code with black and isort
	black taskmon/ tests/ examples/
	isort taskmon/ tests/ examples/

lint:  ## Lint code with flake8 and mypy
	flake8 taskmon/ tests/
	mypy taskmon/

clean:  ## Clean build artifacts
	rm -rf build/
	rm -rf dist/
	rm -rf *.egg-info
	rm -rf .pytest_cache
	rm -rf .coverage
	rm -rf htmlcov/
	find . -type d -name __pycache__ -exec rm -rf {} +
	find . -type f -name "*.pyc" -delete

build:  ## Build distribution packages
	python -m build

publish:  ## Publish to PyPI (requires credentials)
	python -m twine upload dist/*

example:  ## Run simple example
	python examples/simple_example.py

benchmark:  ## Run performance benchmark
	python examples/benchmark.py

demo:  ## Run comprehensive demo
	python examples/comprehensive_examples.py

space-demo:  ## Run space mission demo
	python examples/space_mission_example.py
