forked from livekit/agents
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
100 lines (90 loc) Β· 3.21 KB
/
makefile
File metadata and controls
100 lines (90 loc) Β· 3.21 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
.PHONY: help install format format-check lint check type-check test test-unit test-docker clean build
# Colors for output
CYAN := \033[36m
GREEN := \033[32m
YELLOW := \033[33m
RED := \033[31m
RESET := \033[0m
BOLD := \033[1m
# Default target
.DEFAULT_GOAL := help
help: ## Show this help message
@echo "$(BOLD)$(CYAN)Available targets:$(RESET)"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " $(CYAN)%-20s$(RESET) %s\n", $$1, $$2}'
install: ## Install all dependencies with dev extras
@echo "$(BOLD)$(CYAN)Installing dependencies...$(RESET)"
@uv sync --all-extras --dev
@echo "$(BOLD)$(GREEN)β Dependencies installed$(RESET)"
format: ## Format code with ruff
@echo "$(BOLD)$(CYAN)Formatting code...$(RESET)"
@uv run ruff format .
@echo "$(BOLD)$(GREEN)β Code formatted$(RESET)"
format-check: ## Check code formatting without making changes
@echo "$(BOLD)$(CYAN)Checking code formatting...$(RESET)"
@if uv run ruff format --check .; then \
echo "$(BOLD)$(GREEN)β Code formatting is correct$(RESET)"; \
else \
echo "$(BOLD)$(RED)β Code formatting issues found. Run 'make format' to fix.$(RESET)"; \
exit 1; \
fi
lint: ## Run ruff linter
@echo "$(BOLD)$(CYAN)Running linter...$(RESET)"
@if uv run ruff check .; then \
echo "$(BOLD)$(GREEN)β No linting issues found$(RESET)"; \
else \
echo "$(BOLD)$(RED)β Linting issues found$(RESET)"; \
exit 1; \
fi
lint-fix: ## Run ruff linter and fix issues automatically
@echo "$(BOLD)$(CYAN)Running linter with auto-fix...$(RESET)"
@uv run ruff check --fix .
@echo "$(BOLD)$(GREEN)β Linting complete$(RESET)"
type-check: ## Run mypy type checker
@echo "$(BOLD)$(CYAN)Running type checker...$(RESET)"
@uv pip install pip 2>/dev/null || true
@if uv run mypy --install-types --non-interactive \
-p livekit.agents \
-p livekit.plugins.openai \
-p livekit.plugins.anthropic \
-p livekit.plugins.mistralai \
-p livekit.plugins.assemblyai \
-p livekit.plugins.aws \
-p livekit.plugins.azure \
-p livekit.plugins.bey \
-p livekit.plugins.bithuman \
-p livekit.plugins.cartesia \
-p livekit.plugins.clova \
-p livekit.plugins.deepgram \
-p livekit.plugins.elevenlabs \
-p livekit.plugins.fal \
-p livekit.plugins.gladia \
-p livekit.plugins.google \
-p livekit.plugins.groq \
-p livekit.plugins.hume \
-p livekit.plugins.minimal \
-p livekit.plugins.neuphonic \
-p livekit.plugins.nltk \
-p livekit.plugins.resemble \
-p livekit.plugins.rime \
-p livekit.plugins.silero \
-p livekit.plugins.speechify \
-p livekit.plugins.speechmatics \
-p livekit.plugins.tavus \
-p livekit.plugins.turn_detector \
-p livekit.plugins.hedra \
-p livekit.plugins.langchain \
-p livekit.plugins.baseten \
-p livekit.plugins.sarvam \
-p livekit.plugins.inworld \
-p livekit.plugins.simli \
-p livekit.plugins.anam \
-p livekit.plugins.ultravox \
-p livekit.plugins.fireworksai \
-p livekit.plugins.minimax; then \
echo "$(BOLD)$(GREEN)β Type checking passed$(RESET)"; \
else \
echo "$(BOLD)$(RED)β Type checking failed$(RESET)"; \
exit 1; \
fi
check: format-check lint type-check ## Run all checks (format, lint, type-check)
@echo "$(BOLD)$(GREEN)β All checks passed!$(RESET)"