-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
75 lines (59 loc) · 1.91 KB
/
Makefile
File metadata and controls
75 lines (59 loc) · 1.91 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
.PHONY: help install build up down restart logs health clean test lint format type-check check all
PYTHON := python3
VENV := .venv
PIP := $(VENV)/bin/pip
PYTEST := $(VENV)/bin/pytest
RUFF := $(VENV)/bin/ruff
MYPY := $(VENV)/bin/mypy
help:
@echo "SipForge - Development Commands"
@echo "========================================"
@echo "make install - Create venv and install dev deps"
@echo "make build - Build all Docker images"
@echo "make up - Start all services"
@echo "make down - Stop all services"
@echo "make restart - Restart all services"
@echo "make logs - View logs from all services"
@echo "make health - Check health of all services"
@echo "make clean - Remove all containers and volumes"
@echo "make test - Run test suite"
@echo "make test-cov - Run tests with coverage"
@echo "make lint - Run ruff linter"
@echo "make format - Auto-fix linting and format code"
@echo "make type-check - Run mypy type checker"
@echo "make check - Run lint + type-check + test"
install:
$(PYTHON) -m venv $(VENV)
$(PIP) install -e ".[dev]"
build:
@echo "Building Docker images..."
docker-compose build
up:
@echo "Starting services..."
./scripts/start.sh
down:
@echo "Stopping services..."
docker-compose down
restart: down up
logs:
docker-compose logs -f
health:
@./scripts/health-check.sh
clean:
@echo "Cleaning up..."
docker-compose down -v
docker system prune -f
@echo "Cleanup complete"
test:
$(PYTEST) tests/ -v
test-cov:
$(PYTEST) tests/ --cov=orchestrator --cov=chatbots --cov=shared --cov-report=html --cov-report=term
lint:
$(RUFF) check orchestrator/ chatbots/ shared/ --ignore B008
format:
$(RUFF) check orchestrator/ chatbots/ shared/ --ignore B008 --fix
$(RUFF) format orchestrator/ chatbots/ shared/
type-check:
$(MYPY) orchestrator/ chatbots/ shared/ --ignore-missing-imports
check: lint type-check test
@echo "All checks passed!"