-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
143 lines (106 loc) · 3.99 KB
/
Makefile
File metadata and controls
143 lines (106 loc) · 3.99 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
# QuantumFlow HFT Paper Trading - Makefile
# Orchestrates build, test, and deployment for all components
.PHONY: all build test clean dev deploy rust-build ocaml-build python-install
# Default target
all: build
# ============================================================================
# Build targets
# ============================================================================
build: rust-build ocaml-build python-install
@echo "All components built successfully"
rust-build:
@echo "Building Rust market-data component..."
cd market-data && cargo build --release
ocaml-build:
@echo "Building OCaml core component..."
cd core && dune build
python-install:
@echo "Installing Python strategy component..."
cd strategy && pip install -e .
# ============================================================================
# Test targets
# ============================================================================
test: rust-test ocaml-test python-test
@echo "All tests passed"
rust-test:
@echo "Running Rust tests..."
cd market-data && cargo test
ocaml-test:
@echo "Running OCaml tests..."
cd core && dune test
python-test:
@echo "Running Python tests..."
cd strategy && pytest tests/ -v
# ============================================================================
# Lint targets
# ============================================================================
lint: rust-lint ocaml-lint python-lint
@echo "All lints passed"
rust-lint:
cd market-data && cargo clippy -- -D warnings
ocaml-lint:
cd core && dune build @fmt
python-lint:
cd strategy && ruff check src/ tests/
cd strategy && mypy src/
# ============================================================================
# Development targets
# ============================================================================
dev:
@echo "Starting development environment..."
docker-compose up --build
dev-rust:
cd market-data && cargo watch -x run
dev-python:
cd strategy && uvicorn src.api.main:app --reload --port 8000
# ============================================================================
# Benchmark targets
# ============================================================================
bench:
cd market-data && cargo bench
# ============================================================================
# Deployment targets
# ============================================================================
deploy:
fly deploy
deploy-staging:
fly deploy --config fly.staging.toml
# ============================================================================
# Utility targets
# ============================================================================
clean:
cd market-data && cargo clean
cd core && dune clean
cd strategy && rm -rf .pytest_cache __pycache__ *.egg-info
rm -rf data/*.db
setup-dev:
./scripts/setup-dev.sh
download-history:
python scripts/download-history.py
generate-report:
python reports/generate.py
# ============================================================================
# Docker targets
# ============================================================================
docker-build:
docker build -t quantumflow-hft .
docker-run:
docker run -d --name quantumflow -v $(PWD)/data:/data quantumflow-hft
docker-stop:
docker stop quantumflow && docker rm quantumflow
# ============================================================================
# Help
# ============================================================================
help:
@echo "QuantumFlow HFT Paper Trading - Available targets:"
@echo ""
@echo " build - Build all components"
@echo " test - Run all tests"
@echo " lint - Run all linters"
@echo " dev - Start development environment with docker-compose"
@echo " bench - Run Rust benchmarks"
@echo " deploy - Deploy to Fly.io"
@echo " clean - Clean all build artifacts"
@echo " setup-dev - Setup development environment"
@echo " generate-report - Generate performance report"
@echo " help - Show this help message"