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:
parent
b6993d4a05
commit
1abbbe85e4
27 changed files with 835 additions and 3 deletions
28
tests/test_ingest.py
Normal file
28
tests/test_ingest.py
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
from pathlib import Path
|
||||
|
||||
from fin_hub.ingest.anthropic import parse_anthropic_billing_csv
|
||||
from fin_hub.ingest.cloud import parse_cloud_cost_csv
|
||||
from fin_hub.ingest.hosteurope import parse_hosteurope_csv
|
||||
|
||||
FIXTURES = Path(__file__).parent / "fixtures"
|
||||
|
||||
|
||||
def test_parse_cloud_cost_csv():
|
||||
rows = parse_cloud_cost_csv(FIXTURES / "cloud-costs.csv")
|
||||
assert len(rows) == 3
|
||||
assert rows[0].service == "state-hub"
|
||||
assert rows[0].amount == 42.5
|
||||
|
||||
|
||||
def test_parse_anthropic_billing_csv():
|
||||
rows = parse_anthropic_billing_csv(FIXTURES / "anthropic-billing.csv")
|
||||
assert len(rows) == 2
|
||||
assert rows[0].provider == "anthropic"
|
||||
assert rows[0].tokens_in == 12000
|
||||
|
||||
|
||||
def test_parse_hosteurope_csv():
|
||||
rows = parse_hosteurope_csv(FIXTURES / "hosteurope.csv")
|
||||
assert len(rows) == 2
|
||||
assert rows[0].service_id == "dedicated-server-m"
|
||||
assert rows[0].period_month == "2026-06"
|
||||
Loading…
Add table
Add a link
Reference in a new issue