-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
73 lines (53 loc) · 2.01 KB
/
Copy pathMakefile
File metadata and controls
73 lines (53 loc) · 2.01 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
.PHONY: setup setup-credit credit seed train backtest analyze run test test-credit test-ci lint format migrate docker-up docker-down docker-prod clean
PYTHON := python
# Full stack: credit committee + equity pipeline + API + dashboard + dev tools.
setup:
pip install -e ".[equity,dev]"
pre-commit install
# Credit committee only — no ML/data stack (litellm + pyyaml + rich).
setup-credit:
pip install -e ".[dev]"
# Run the bundled credit committee example (needs an LLM key; see README).
credit:
$(PYTHON) -m examples.distressed.run run examples/distressed/situations/ati_2023.yaml
seed:
$(PYTHON) scripts/seed_data.py
train:
$(PYTHON) scripts/train_model.py
backtest:
$(PYTHON) scripts/run_backtest.py --output backtest_report.json
@echo "Report saved to backtest_report.json"
ablation:
$(PYTHON) scripts/run_ablation.py --ticker AAPL --type both --output ablation_report.json
@echo "Ablation report saved to ablation_report.json"
analyze:
$(PYTHON) -m notebooks.backtest_analysis
migrate:
alembic upgrade head
run:
uvicorn src.api.main:app --host 0.0.0.0 --port 8000 --reload
# Credit-only tests — run under the lightweight install (no ML stack needed).
test-credit:
pytest tests/test_distressed_credit.py tests/test_credit_correctness.py \
tests/test_credit_snapshot.py tests/test_credit_situation_loader.py \
tests/test_credit_tools_advanced.py tests/test_envision_2023.py -v --timeout=30
test:
pytest tests/ -v --cov=src --cov=examples --cov-report=term-missing --timeout=30
test-ci:
pytest tests/ -v --cov=src --cov=examples --cov-report=term-missing --cov-report=xml --timeout=30
lint:
ruff check src/ tests/
ruff format src/ tests/ --check
format:
ruff check src/ tests/ --fix
ruff format src/ tests/
docker-up:
docker compose up --build
docker-down:
docker compose down
docker-prod:
docker compose -f docker-compose.prod.yml up --build -d
clean:
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -name "*.pyc" -delete
rm -rf .pytest_cache htmlcov .coverage coverage.xml