-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathMakefile
More file actions
68 lines (52 loc) · 2.12 KB
/
Copy pathMakefile
File metadata and controls
68 lines (52 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
VENV := .venv
PYTHON := $(VENV)/bin/python
PIP := $(VENV)/bin/pip
RUFF := $(VENV)/bin/ruff
RUMDL := $(VENV)/bin/rumdl
MYPY := $(VENV)/bin/mypy
DEEPEVAL := $(VENV)/bin/deepeval
TARGETS := help install install-test install-tools clean lint format typecheck test test-unit test-eval cursor-install cursor-uninstall
.PHONY: $(TARGETS)
help: ## Show this help message
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}'
$(VENV):
python3 -m venv $(VENV)
$(PIP) install --upgrade pip
install: install-test install-tools ## Set up everything (venv + deps)
install-test: $(VENV) ## Install test dependencies (deepeval)
$(PIP) install --upgrade pip
$(PIP) install -e ".[test]"
install-tools: $(VENV) ## Install linting/formatting tools (ruff)
$(PIP) install --upgrade pip
$(PIP) install -e ".[tools]"
clean: ## Remove virtual environment and local Cursor install
-$(PYTHON) scripts/cursor.py uninstall
rm -rf $(VENV) node_modules
cursor-install: $(VENV) ## Install this plugin into a local Cursor for development
$(PYTHON) scripts/cursor.py install
cursor-uninstall: $(VENV) ## Uninstall this plugin from the local Cursor install
$(PYTHON) scripts/cursor.py uninstall
lint: ## Run linter checks (ruff for Python, rumdl for Markdown)
$(RUFF) check .
$(RUMDL) check .
format: ## Auto-format code (ruff for Python, rumdl for Markdown)
$(RUFF) format .
$(RUFF) check --fix .
$(RUMDL) check --fix .
typecheck: ## Run mypy static type checks
$(MYPY)
test: ## Run all tests (set testdir=<path> to route to the matching runner)
ifdef testdir
@if echo "$(testdir)" | grep -q "tests/eval"; then \
$(MAKE) test-eval testdir="$(testdir)"; \
else \
$(MAKE) test-unit testdir="$(testdir)"; \
fi
else
@$(MAKE) test-unit
@$(MAKE) test-eval
endif
test-unit: ## Run structural/unit validation tests (set testdir=<path> to target specific files)
$(PYTHON) -m pytest $(or $(testdir),tests/unit/) -v
test-eval: ## Run LLM-judged tests (requires GEMINI_API_KEY & SLACK_MCP_TOKEN; set testdir=<path> to target specific files)
$(DEEPEVAL) test run $(or $(testdir),tests/eval/) -v