-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (45 loc) · 2.07 KB
/
Copy pathMakefile
File metadata and controls
60 lines (45 loc) · 2.07 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
.PHONY: setup pipeline clean dashboard api mlflow test docker-build docker-up
# ── Setup ──────────────────────────────────────────────
setup:
cp -n .env.example .env || true
pip install -r requirements.txt
@echo "✅ Setup complete. Drop online_retail_II.xlsx into data/raw/"
# ── Pipeline steps ─────────────────────────────────────
ingest:
python -m src.data.ingest
clean:
python -m src.data.clean
features:
python -m src.features.rfm
python -m src.features.time_features
models:
python -m src.models.segmentation
python -m src.models.forecasting
python -m src.models.churn
python -m src.models.inventory
pipeline: ingest clean features models
@echo "✅ Full pipeline complete"
# ── Serving ────────────────────────────────────────────
dashboard:
streamlit run dashboard/app.py --server.port 8501
api:
uvicorn api.main:app --host 0.0.0.0 --port 8000 --reload
mlflow:
mlflow ui --backend-store-uri mlruns --port 5000
# ── Testing ────────────────────────────────────────────
test:
pytest tests/ -v --cov=src --cov-report=term-missing
# ── Docker ─────────────────────────────────────────────
docker-build:
docker build -t retailpulse:latest -f docker/Dockerfile .
docker-up:
docker compose -f docker/docker-compose.yml up
docker-down:
docker compose -f docker/docker-compose.yml down
# ── Cleanup ────────────────────────────────────────────
clean-outputs:
rm -rf data/processed/* data/features/* models/*.joblib models/*.pkl
@echo "✅ Outputs cleaned (raw data preserved)"
clean-mlflow:
rm -rf mlruns/
@echo "✅ MLflow runs cleared"