-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
74 lines (61 loc) · 2.14 KB
/
Copy pathMakefile
File metadata and controls
74 lines (61 loc) · 2.14 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
69
70
71
72
73
74
# Volo — top-level developer shortcuts.
# All targets are idempotent. The Makefile is the contributor-facing entrypoint;
# deeper docs live in package READMEs.
.DEFAULT_GOAL := help
# ---------- meta ----------
.PHONY: help
help: ## Show this help.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z0-9_.-]+:.*?## / {printf " \033[36m%-18s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
# ---------- environment ----------
.PHONY: setup
setup: ## Install Python + JS toolchains (uv + pnpm), sync deps.
uv python install 3.12
uv sync --all-packages
corepack enable pnpm || true
pnpm install --frozen-lockfile || pnpm install
# ---------- dev ----------
.PHONY: dev
dev: ## Bring up the local dev stack (api + web).
@echo "→ start FastAPI + Next.js in parallel (Ctrl+C to stop both)"
@$(MAKE) -j 2 dev-api dev-web
.PHONY: dev-api
dev-api: ## Run the FastAPI service locally.
uv run --package volo-api uvicorn volo_api.main:app --reload --port 8080
.PHONY: dev-web
dev-web: ## Run the Next.js dashboard locally.
pnpm --filter web dev
# ---------- quality ----------
.PHONY: test
test: ## Run all Python and JS tests.
uv run pytest
pnpm -r --if-present test
.PHONY: lint
lint: ## Lint Python and JS.
uv run ruff check .
uv run ruff format --check .
pnpm -r --if-present lint
.PHONY: format
format: ## Auto-format Python and JS.
uv run ruff format .
uv run ruff check --fix .
pnpm -r --if-present format
.PHONY: typecheck
typecheck: ## Type-check Python (mypy) and JS (tsc).
uv run mypy
pnpm -r --if-present typecheck
# ---------- volo CLI ----------
.PHONY: volo
volo: ## Run the volo CLI (forward args: `make volo ARGS="record --help"`).
uv run volo $(ARGS)
# ---------- githooks ----------
.PHONY: githooks
githooks: ## Install repo-local git hooks (.githooks/) into git's hooks path.
git config core.hooksPath .githooks
chmod +x .githooks/pre-commit || true
@echo "→ hooks installed at .githooks/. Run a commit to verify."
# ---------- housekeeping ----------
.PHONY: clean
clean: ## Remove build + cache artifacts.
rm -rf .pytest_cache .ruff_cache .mypy_cache
rm -rf apps/web/.next apps/web/node_modules
find . -type d -name __pycache__ -prune -exec rm -rf {} +