-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
184 lines (161 loc) · 6.44 KB
/
Copy pathMakefile
File metadata and controls
184 lines (161 loc) · 6.44 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
.PHONY: help install dev build test lint format security clean docker-build docker-up docker-down git-setup
.PHONY: start-google-mcp start-jira-mcp start-google-agents start-jira-agents start-workflows start-registry start-all stop-all
# Default target
help:
@echo "MeetingActions Development Commands"
@echo "=================================="
@echo "Development:"
@echo " install - Install dependencies and setup"
@echo " dev - Set up development environment"
@echo " git-setup - Setup Git hooks"
@echo ""
@echo "Code Quality:"
@echo " lint - Run all linting checks"
@echo " format - Auto-format code"
@echo " security - Run security checks"
@echo " test - Run all tests"
@echo " test-cov - Run tests with coverage"
@echo ""
@echo "Services:"
@echo " start-google-mcp - Start Google MCP server"
@echo " start-jira-mcp - Start JIRA MCP server"
@echo " start-jira-agent - Start Jira agent server"
@echo " start-google-agents - Start Google agent server"
@echo " start-workflows - Start workflow server"
@echo " start-registry - Start agent registry service"
@echo " start-all - Start all servers"
@echo " stop-all - Stop all running servers"
@echo ""
@echo "Docker:"
@echo " docker-build - Build Docker images"
@echo " docker-up - Start services with Docker"
@echo " docker-down - Stop Docker services"
@echo ""
@echo "Utilities:"
@echo " clean - Clean up artifacts and containers"
@echo " health-check - Check service health"
@echo " verify-setup - Verify development setup"
# Start MCP servers
start-google-mcp:
@echo "Starting Google MCP server..."
UVICORN_PORT=8100 python -m src.services.mcp.google_tools_mcp
start-jira-mcp:
@echo "Starting JIRA MCP server..."
UVICORN_PORT=8101 python -m src.services.mcp.jira_tools_mcp
# Start agent servers
start-google-agent:
@echo "Starting Google agent..."
UVICORN_PORT=8001 python -m src.core.agents.google_agent
start-jira-agent:
@echo "Starting Jira agent..."
UVICORN_PORT=8000 python -m src.core.agents.jira_agent
# Start workflow server
start-workflow:
@echo "Starting workflow server..."
UVICORN_PORT=8002 python -m src.core.workflow_servers.action_items_server
# Start registry service
start-registry:
@echo "Starting agent registry service..."
UVICORN_PORT=8003 python -m src.services.registry.registry_service
# Start all servers
start-all:
@echo "Starting all servers..."
@echo "Starting agent registry service..."
python -m src.services.registry.registry_service &
@echo "Starting Google MCP server..."
python -m src.services.mcp.google_tools_mcp &
@echo "Starting JIRA MCP server..."
python -m src.services.mcp.jira_tools_mcp &
@echo "Starting Jira agent..."
UVICORN_PORT=8000 python -m src.core.agents.jira_agent &
@echo "Starting Google agent..."
UVICORN_PORT=8001 python -m src.core.agents.google_agent &
@echo "Starting workflow server..."
UVICORN_PORT=8002 python -m src.core.workflow_servers.action_items_server &
@echo "All servers started!"
# Stop all servers
stop-all:
@echo "Stopping all servers..."
pkill -f "python -m src.services.registry.registry_service" || true
pkill -f "python -m src.core.agents.jira_agent" || true
pkill -f "python -m src.core.agents.google_agent" || true
pkill -f "python -m src.core.workflow_servers.action_items_server" || true
pkill -f "python -m src.services.mcp.google_tools_mcp" || true
pkill -f "python -m src.services.mcp.jira_tools_mcp" || true
@echo "All servers stopped!"
# Installation and Setup
install:
@echo "Installing Python dependencies..."
pip install -r requirements.txt
@echo "Installing pre-commit hooks..."
pre-commit install || echo "Pre-commit not available"
@echo "Setup complete!"
dev:
@echo "Setting up development environment..."
python -m venv .venv
@echo "Activate virtual environment with: source .venv/bin/activate"
@echo "Then run: make install"
git-setup:
@echo "Setting up Git configuration..."
pre-commit install
@echo "Git hooks installed!"
# Code Quality
lint:
@echo "Running code quality checks..."
black --check --diff src/
isort --check-only --diff src/
flake8 src/ --max-line-length=88 --extend-ignore=E203,W503
mypy src/ --ignore-missing-imports || echo "mypy check completed"
@echo "Linting checks complete!"
format:
@echo "Formatting code..."
black src/
isort src/
@echo "Code formatted!"
security:
@echo "Running security checks..."
bandit -r src/ -f json -o bandit-report.json || true
@echo "Security checks complete!"
# Testing
test:
@echo "Running tests..."
pytest tests/ -v --tb=short || echo "Tests completed"
test-cov:
@echo "Running tests with coverage..."
pytest tests/ --cov=src/ --cov-report=html --cov-report=term-missing || echo "Coverage tests completed"
# Docker Operations
docker-build:
@echo "Building Docker images..."
docker-compose build || podman-compose build
docker-up:
@echo "Starting services with Docker..."
docker-compose up -d || podman-compose up -d
@echo "Services started!"
docker-down:
@echo "Stopping Docker services..."
docker-compose down || podman-compose down
# Utilities
health-check:
@echo "Checking service health..."
@curl -f http://localhost:8000/health 2>/dev/null && echo "✅ Jira Agent: Healthy" || echo "❌ Jira Agent: Down"
@curl -f http://localhost:8001/health 2>/dev/null && echo "✅ Google Agent: Healthy" || echo "❌ Google Agent: Down"
@curl -f http://localhost:8002/health 2>/dev/null && echo "✅ Workflows: Healthy" || echo "❌ Workflows: Down"
@curl -f http://localhost:8003/health 2>/dev/null && echo "✅ Registry: Healthy" || echo "❌ Registry: Down"
@curl -f http://localhost:8100/health 2>/dev/null && echo "✅ Google MCP: Healthy" || echo "❌ Google MCP: Down"
@curl -f http://localhost:8101/health 2>/dev/null && echo "✅ JIRA MCP: Healthy" || echo "❌ JIRA MCP: Down"
verify-setup:
@echo "Verifying development setup..."
python --version
pip --version
git --version
@echo "Testing imports..."
python -c "import src; print('✅ Source imports work')" || echo "❌ Import issues found"
# Clean up Docker containers and volumes
clean:
@echo "Cleaning up..."
find . -type f -name "*.pyc" -delete
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
rm -rf htmlcov/ .coverage coverage.xml bandit-report.json
@echo "Cleaning up Docker containers and volumes..."
podman compose down -v || docker-compose down -v
podman system prune -f || docker system prune -f