forked from vitali87/code-graph-rag
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
65 lines (52 loc) · 2.52 KB
/
Makefile
File metadata and controls
65 lines (52 loc) · 2.52 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
.PHONY: help all install dev test test-parallel test-integration test-all test-parallel-all clean python build-grammars watch readme
help: ## Show this help message
@echo "Available targets:"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}'
all: ## Install everything for full development environment (deps, grammars, hooks, tests)
@echo "🚀 Setting up complete development environment..."
uv sync --all-extras
git submodule update --init --recursive --depth 1
uv run pre-commit install
uv run pre-commit install --hook-type commit-msg
@echo "🧪 Running tests in parallel to verify installation..."
uv run pytest -n auto
@echo "✅ Full development environment ready!"
@echo "📦 Installed: All dependencies, grammars, pre-commit hooks"
@echo "✓ Tests passed successfully"
install: ## Install project dependencies with full language support
uv sync --extra treesitter-full
python: ## Install project dependencies for Python only
uv sync
dev: ## Setup development environment (install deps + pre-commit hooks)
uv sync --extra treesitter-full --extra test --extra semantic --group dev
uv run pre-commit install
uv run pre-commit install --hook-type commit-msg
@echo "✅ Development environment ready!"
test: ## Run unit tests only (fast, no Docker)
uv run pytest -m "not integration"
test-parallel: ## Run unit tests in parallel (fast, no Docker)
uv run pytest -n auto -m "not integration"
test-integration: ## Run integration tests (requires Docker)
uv run pytest -m "integration" -v
test-all: ## Run all tests including integration and e2e (requires Docker)
uv run pytest -v
test-parallel-all: ## Run all tests in parallel including integration and e2e (requires Docker)
uv run pytest -n auto
clean: ## Clean up build artifacts and cache
rm -rf .pytest_cache/ .ty/ .ruff_cache/
find . -type d -name __pycache__ -exec rm -rf {} +
find . -name "*.pyc" -delete
build-grammars: ## Build grammar submodules
git submodule update --init --recursive --depth 1
@echo "Grammars built!"
watch: ## Watch repository for changes and update graph in real-time
@if [ -z "$(REPO_PATH)" ]; then \
echo "Error: REPO_PATH is required. Usage: make watch REPO_PATH=/path/to/repo"; \
exit 1; \
fi
.venv/bin/python realtime_updater.py $(REPO_PATH) \
--host $(or $(HOST),localhost) \
--port $(or $(PORT),7687) \
$(if $(BATCH_SIZE),--batch-size $(BATCH_SIZE),)
readme: ## Regenerate README.md from codebase
uv run python scripts/generate_readme.py