-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
89 lines (63 loc) · 2.57 KB
/
Makefile
File metadata and controls
89 lines (63 loc) · 2.57 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
# PlutosAI Development Makefile
.PHONY: help install dev-setup test lint type-check clean docker-up docker-down
help: ## Show this help message
@echo 'Usage: make [target]'
@echo ''
@echo 'Targets:'
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " %-15s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
install: ## Install production dependencies
pip install -e .
dev-setup: ## Install development dependencies
pip install -e '.[dev]'
test: ## Run all tests
pytest -v
test-unit: ## Run unit tests only
pytest tests/ -k "not integration and not e2e" -v
test-integration: ## Run integration tests
pytest tests/integration/ -v
lint: ## Run linter
ruff check .
lint-fix: ## Run linter and auto-fix issues
ruff check --fix .
type-check: ## Run type checker
mypy shared/
format: ## Format code
ruff format .
security-scan: ## Run security scanning
bandit -r shared/ services/
test-all: lint type-check test ## Run all quality checks
clean: ## Clean up cache files
find . -type d -name "__pycache__" -exec rm -rf {} +
find . -type d -name "*.pyc" -delete
find . -type d -name ".pytest_cache" -exec rm -rf {} +
docker-up: ## Start all services with Docker Compose
cd infrastructure/docker && docker-compose up -d
docker-down: ## Stop all services
cd infrastructure/docker && docker-compose down
docker-logs: ## Show logs from all services
cd infrastructure/docker && docker-compose logs -f
run-client: ## Run client service locally
cd services/client-service && uvicorn src.api:app --reload --host 0.0.0.0 --port 8001
run-gateway: ## Run gateway service locally
cd services/gateway-service && uvicorn src.api:app --reload --host 0.0.0.0 --port 8000
setup: ## Complete development setup
@echo "Setting up PlutosAI development environment..."
python3.11 -m venv .venv
@echo "Created virtual environment. Run 'source .venv/bin/activate' to activate."
@echo "Then run 'make dev-setup' to install dependencies."
migrate-db: ## Run database migrations
@echo "Database migrations would be run here"
# alembic upgrade head
create-migration: ## Create new database migration
@echo "Create new migration here"
# alembic revision --autogenerate -m "migration message"
seed-db: ## Seed database with test data
@echo "Seeding database with test data..."
# python scripts/seed_database.py
docs: ## Generate API documentation
@echo "Generating API documentation..."
# pdoc --html --output-dir docs/api shared/
coverage: ## Generate test coverage report
pytest --cov=shared --cov=services --cov-report=html --cov-report=term-missing
security-audit: ## Run security audit on dependencies
pip-audit