-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
95 lines (76 loc) · 2.19 KB
/
Makefile
File metadata and controls
95 lines (76 loc) · 2.19 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
# Trading System CI - Makefile
.PHONY: help build up down logs clean test lint format install dev
help:
@echo "Trading System CI - Available Commands"
@echo "========================================"
@echo ""
@echo "Development:"
@echo " make build - Build all Docker containers"
@echo " make up - Start all services"
@echo " make down - Stop all services"
@echo " make logs - View logs from all services"
@echo " make dev - Start services in development mode"
@echo ""
@echo "Testing & Quality:"
@echo " make test - Run all tests"
@echo " make lint - Run linters on all Python code"
@echo " make format - Format code with Black"
@echo ""
@echo "Individual Services:"
@echo " make rebate - Start only the rebate service"
@echo " make strategy - Run strategy generator"
@echo " make lean - Start only the Lean engine"
@echo ""
@echo "Utilities:"
@echo " make clean - Remove containers and volumes"
@echo " make install - Install local dependencies"
@echo " make backtest - Run interactive backtest menu"
build:
docker compose build
up:
docker compose up -d
dev:
docker compose up
down:
docker compose down
logs:
docker compose logs -f
clean:
docker compose down -v --remove-orphans
docker system prune -f
test:
@echo "Running strategy generator tests..."
cd services/strategy && python -m pytest tests/ -v
@echo ""
@echo "All tests passed!"
lint:
@echo "Linting rebate service..."
flake8 services/rebate --max-line-length=120
@echo "Linting strategy service..."
flake8 services/strategy --max-line-length=120
@echo "Linting algorithms..."
flake8 algorithms --max-line-length=120
@echo ""
@echo "All linting passed!"
format:
black services/rebate
black services/strategy
black algorithms
install:
pip install -r services/rebate/requirements.txt
pip install -r services/strategy/requirements.txt
pip install flake8 black pytest
rebate:
docker compose up rebate
strategy:
docker compose run --rm strategy
lean:
docker compose up lean
backtest:
./scripts/backtest_menu.sh
prod-up:
docker compose -f docker-compose.prod.yml up -d
prod-down:
docker compose -f docker-compose.prod.yml down
prod-logs:
docker compose -f docker-compose.prod.yml logs -f