studies/202602_AmazonConnect -> studies/202602_TEI_Amazon_Connect, rebuilt as pattern Variant 4 (TEI composite reproduction): - teicalc/ self-contained engine (stdlib-only): Forrester's tables as the never-edited verbatim anchor, NPV/ROI/payback + risk adjustment transplanted from core/calculations, ClientDrivers overlay (contacts/ agents/fixed driver map, growth re-base, identity at composite scale), scenario stress with core-identical semantics - one deliverable notebook (business_case.ipynb): widget-pair sidebar drivers, published-vs-overlay KPI columns, cash-flow/waterfall/scenario charts, verification gate, backstage JSON data appendix - gate + tests reproduce the published totals within PDF rounding: NPV $78.7M / ROI 342% / payback <6 months (engine $78,713,492 / 342.48% / 0.7 months); 27 study tests, headless nbconvert green, stage simulation leak-free, exports carry the appendix - old Athena workflow (00_provision..04_export, config.py, seed_data.py) deleted; git history preserves it; root test fixture repointed to teicalc.anchor - docs: study README rewritten; root README points new studies at template/MercuryNotebook; pattern doc stale ctm-token-calculator paths now cite studies/202607_CTM_GenesysCX; Variant 4 cites this study as its realized reference Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
38 lines
1.1 KiB
Python
38 lines
1.1 KiB
Python
"""Pytest fixtures for Palladium tests."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import os
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
ROOT = Path(__file__).resolve().parent.parent
|
|
if str(ROOT) not in sys.path:
|
|
sys.path.insert(0, str(ROOT))
|
|
|
|
|
|
@pytest.fixture(autouse=True)
|
|
def _env(monkeypatch):
|
|
"""Default test env vars so TEIClient() doesn't need a real .env."""
|
|
monkeypatch.setenv("ATHENA_BASE_URL", "https://athena.test")
|
|
monkeypatch.setenv("ATHENA_API_KEY", "test-key")
|
|
|
|
|
|
@pytest.fixture
|
|
def amazon_connect_seed():
|
|
"""Load the Amazon Connect study's verbatim anchor (post-migration the
|
|
study is self-contained; teicalc is stdlib-only, so importing it here
|
|
needs no study venv — the row shape matches the old seed_data)."""
|
|
from types import SimpleNamespace
|
|
|
|
sys.path.insert(0, str(ROOT / "studies" / "202602_TEI_Amazon_Connect"))
|
|
try:
|
|
from teicalc import anchor # type: ignore[import-not-found]
|
|
return SimpleNamespace(BENEFITS=anchor.BENEFITS_VERBATIM,
|
|
COSTS=anchor.COSTS_VERBATIM)
|
|
finally:
|
|
# Leave the path alone — many tests will use the seed
|
|
pass
|