.PHONY: help install install-dev test test-cov test-watch lint format clean dev run
# Default target
help:
@echo "MCP FHIR Server - Available Commands"
@echo "====================================="
@echo ""
@echo "Setup Commands:"
@echo " make install Install production dependencies"
@echo " make install-dev Install development dependencies (includes test tools)"
@echo ""
@echo "Testing Commands:"
@echo " make test Run all tests"
@echo " make test-cov Run tests with coverage report"
@echo " make test-watch Run tests in watch mode (reruns on file changes)"
@echo ""
@echo "Development Commands:"
@echo " make dev Run server in development mode (with auto-reload)"
@echo " make run Run server in production mode"
@echo ""
@echo "Code Quality Commands:"
@echo " make lint Run linter (ruff check)"
@echo " make format Format code (ruff format)"
@echo " make check Run both lint and format check"
@echo ""
@echo "Cleanup Commands:"
@echo " make clean Remove cache files and build artifacts"
@echo ""
# Installation
install:
uv sync
install-dev:
uv sync --extra dev
# Testing
test: install-dev
uv run pytest
test-cov: install-dev
uv run pytest --cov=. --cov-report=term-missing --cov-report=html
test-watch: install-dev
uv run pytest-watch
# Development
dev:
uv run fastmcp dev server.py
run:
uv run fastmcp run server.py
# Code Quality
lint: install-dev
uv run ruff check .
format: install-dev
uv run ruff format .
check: install-dev
uv run ruff check .
uv run ruff format --check .
# Cleanup
clean:
rm -rf __pycache__
rm -rf .pytest_cache
rm -rf .ruff_cache
rm -rf htmlcov
rm -rf .coverage
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type f -name "*.pyc" -delete