-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
94 lines (77 loc) · 2.56 KB
/
Makefile
File metadata and controls
94 lines (77 loc) · 2.56 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
# Doc-Builder-MCP Makefile
# Quick commands for development and deployment
.PHONY: help install setup dev test lint format clean neo4j-up neo4j-down server
# Default target
help:
@echo "Doc-Builder-MCP Development Commands"
@echo ""
@echo "Setup:"
@echo " make install - Install dependencies"
@echo " make setup - Run interactive setup wizard"
@echo " make dev - Install with dev dependencies"
@echo ""
@echo "Database:"
@echo " make neo4j-up - Start Neo4j container"
@echo " make neo4j-down - Stop Neo4j container"
@echo ""
@echo "Server:"
@echo " make server - Run MCP server (HTTP mode)"
@echo " make server-stdio - Run MCP server (STDIO mode)"
@echo ""
@echo "Development:"
@echo " make test - Run tests"
@echo " make lint - Run linter"
@echo " make format - Format code"
@echo " make clean - Clean build artifacts"
# Installation
install:
cd server && python -m venv .venv && \
. .venv/bin/activate && \
pip install --upgrade pip && \
pip install -e .
dev:
cd server && python -m venv .venv && \
. .venv/bin/activate && \
pip install --upgrade pip && \
pip install -e ".[dev]"
setup:
cd server && . .venv/bin/activate && doc-mcp-setup
# Database commands
neo4j-up:
docker compose up -d neo4j
@echo "Waiting for Neo4j to be ready..."
@sleep 15
@echo "Neo4j should be ready at bolt://localhost:7688"
neo4j-down:
docker compose down
neo4j-logs:
docker compose logs -f neo4j
# Server commands
server:
cd server && . .venv/bin/activate && doc-mcp --transport http
server-stdio:
cd server && . .venv/bin/activate && doc-mcp --transport stdio
# Development commands
test:
cd server && . .venv/bin/activate && pytest tests/ -v
test-cov:
cd server && . .venv/bin/activate && pytest tests/ --cov=doc_builder --cov-report=html
lint:
cd server && . .venv/bin/activate && ruff check src/ tests/
format:
cd server && . .venv/bin/activate && ruff check --fix src/ tests/
typecheck:
cd server && . .venv/bin/activate && mypy src/
# Cleanup
clean:
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name ".pytest_cache" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name ".mypy_cache" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name "*.egg-info" -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete 2>/dev/null || true
rm -rf server/htmlcov server/.coverage 2>/dev/null || true
# Full development setup
full-setup: install neo4j-up
@echo ""
@echo "✓ Full setup complete!"
@echo "Run 'make server' to start the MCP server"