PYTHON = python3 PIP = $(PYTHON) -m pip VENV_DIR = .venv API_PORT = 8001 SHELL = /bin/bash .PHONY: all install lint format test run all: install lint test install: @echo "Installing dependencies..." $(PYTHON) -m venv $(VENV_DIR) source $(VENV_DIR)/bin/activate && $(PIP) install -e . lint: @echo "Running linter (ruff check)..." source $(VENV_DIR)/bin/activate && ruff check src/ format: @echo "Running formatter (ruff format)..." source $(VENV_DIR)/bin/activate && ruff format src/ test: @echo "Running tests (pytest)..." source $(VENV_DIR)/bin/activate && export PYTHONPATH=$(CURDIR):$(CURDIR)/src && pytest run: @echo "Starting FastAPI application..." source $(VENV_DIR)/bin/activate && uvicorn src.main:app --host 0.0.0.0 --port ${API_PORT} --reload clean: @echo "Cleaning up..." rm -rf $(VENV_DIR) find . -type f -name "*.pyc" -delete find . -type d -name "__pycache__" -delete rm -rf .pytest_cache .ruff_cache