-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
88 lines (67 loc) · 3.61 KB
/
Makefile
File metadata and controls
88 lines (67 loc) · 3.61 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
# Makefile — shortcuts for common Trading-Crab tasks.
# Run `make help` to see all available targets.
.PHONY: help setup setup-dev install install-dev test lint run run-full run-steps clean-checkpoints clean-all
# ── default ────────────────────────────────────────────────────────────────────
help:
@echo ""
@echo "Trading-Crab — available make targets"
@echo "--------------------------------------"
@echo " make setup Set up .venv + install runtime deps (interactive)"
@echo " make setup-dev Set up .venv + install dev deps (tests + notebooks)"
@echo " make install pip install -r requirements.txt into active env"
@echo " make install-dev pip install -r requirements-dev.txt into active env"
@echo ""
@echo " make test Run the full test suite"
@echo " make test-fast Run tests, stop at first failure"
@echo ""
@echo " make run Steps 3-7 from cached data (fast, no re-scraping)"
@echo " make run-full Full pipeline — re-scrape + recompute + plots"
@echo " make run-cluster Re-cluster only (step 3) with plots"
@echo " make dashboard Print current dashboard (step 7 only)"
@echo " make notebooks Launch JupyterLab"
@echo ""
@echo " make clean-outputs Remove generated plots and reports"
@echo " make clean-models Remove saved models"
@echo " make clean-all Remove all generated files (keep raw checkpoints)"
@echo ""
# ── setup ──────────────────────────────────────────────────────────────────────
setup:
bash scripts/setup.sh
setup-dev:
bash scripts/setup.sh --dev
# Install into whatever environment is currently active (no venv management)
install:
pip install -r requirements.txt
install-dev:
pip install -r requirements-dev.txt
# ── testing ────────────────────────────────────────────────────────────────────
test:
pytest tests/ -v
test-fast:
pytest tests/ -x -q
# ── pipeline ───────────────────────────────────────────────────────────────────
# Steps 3-7 from cached checkpoints — fast day-to-day run
run:
python run_pipeline.py --steps 3,4,5,6,7 --plots --market-code grok
# Re-scrape everything from scratch and recompute
run-full:
python run_pipeline.py --refresh --recompute --plots --market-code grok --save-market-code
# Re-cluster only (useful after editing settings.yaml)
run-cluster:
python run_pipeline.py --steps 3,4 --plots --recompute --market-code grok
# Just print the dashboard
dashboard:
python pipelines/07_dashboard.py
# Launch notebooks
notebooks:
jupyter lab notebooks/
# ── cleanup ────────────────────────────────────────────────────────────────────
clean-outputs:
rm -f outputs/plots/*.png outputs/plots/*.pdf
rm -f outputs/reports/*.csv
clean-models:
rm -f outputs/models/*.pkl outputs/models/*.joblib
clean-all: clean-outputs clean-models
rm -f data/processed/*.parquet
rm -f data/regimes/*.parquet data/regimes/*.yaml
@echo "Kept data/raw/ and data/checkpoints/ — run 'make run' to regenerate"