Implement fin-hub T24-T26: ingest, runway, coupling, RaaS packaging

Add CSV importers, runway calculator, budget alerts, cross-hub coupling
emitters, finhub CLI, and raas-mvp-packaging docs with full test coverage.
This commit is contained in:
tegwick 2026-07-08 00:59:39 +02:00
parent b6993d4a05
commit 1abbbe85e4
27 changed files with 835 additions and 3 deletions

16
tests/test_runway.py Normal file
View file

@ -0,0 +1,16 @@
from fin_hub.services.alerts import evaluate_budget_alerts
from fin_hub.services.runway import compute_runway
def test_compute_runway_below_threshold():
runway = compute_runway(current_balance=6000, monthly_burns=[2000, 2200, 2100], alert_threshold_months=3.0)
assert runway.months_remaining < 3.0
assert runway.below_threshold is True
def test_budget_alerts_include_runway_and_utilisation():
runway = compute_runway(current_balance=6000, monthly_burns=[2000, 2200, 2100])
alerts = evaluate_budget_alerts(runway=runway, allocated=10000, spent=8500)
codes = {alert.code for alert in alerts}
assert "runway_below_threshold" in codes
assert "budget_pressure" in codes