Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
64 lines (49 loc) · 1.8 KB
/
Copy pathMakefile
File metadata and controls
64 lines (49 loc) · 1.8 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
# Unified entry points for a repo where each package has its own toolchain:
# three uv projects and one npm workspace, previously four different
# incantations to remember depending on what you had just touched.
#
# These targets run exactly what CI runs, so a green `make check` locally
# means a green pipeline.
PY_PACKAGES := packages/data-adapters packages/mcp-core packages/hf-space
WEB := packages/web
.DEFAULT_GOAL := help
.PHONY: help
help: ## Show this help
@grep -hE '^[a-z-]+:.*?## ' $(MAKEFILE_LIST) \
| awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-14s\033[0m %s\n", $$1, $$2}'
.PHONY: install
install: ## Install every package's dependencies
@for p in $(PY_PACKAGES); do echo "→ $$p"; (cd $$p && uv sync --extra dev); done
npm ci
.PHONY: test
test: test-py test-web ## Run every test suite
.PHONY: test-py
test-py: ## Python suites (data-adapters, mcp-core, hf-space)
@for p in $(PY_PACKAGES); do echo "→ $$p"; (cd $$p && uv run pytest -q) || exit 1; done
.PHONY: test-web
test-web: ## Web suite
cd $(WEB) && npm run test
.PHONY: lint
lint: lint-py lint-web ## Lint everything
.PHONY: lint-py
lint-py: ## ruff check + format check
uvx ruff check $(PY_PACKAGES)
uvx ruff format --check $(PY_PACKAGES)
.PHONY: lint-web
lint-web: ## Typecheck + the lint budget CI enforces
cd $(WEB) && npm run typecheck && npm run lint:budget
.PHONY: fmt
fmt: ## Apply Python formatting
uvx ruff format $(PY_PACKAGES)
uvx ruff check --fix $(PY_PACKAGES)
.PHONY: build
build: ## Production build of the web app
cd $(WEB) && npm run build
.PHONY: check
check: lint test build ## Everything CI runs, in one command
.PHONY: dev
dev: ## Vite dev server
cd $(WEB) && npm run dev
.PHONY: mcp
mcp: ## Local MCP server over stdio, for a client on this machine
cd packages/mcp-core && uv run python scripts/run_local.py