feat: Add Streamlit dashboard with Blueprint compliance (v2.1.0)
Dashboard Features: - 8 navigation sections: Overview, Outcomes, Poor CX, FCR, Churn, Agent, Call Explorer, Export - Beyond Brand Identity styling (colors #6D84E3, Outfit font) - RCA Sankey diagram (Driver → Outcome → Churn Risk flow) - Correlation heatmaps (driver co-occurrence, driver-outcome) - Outcome Deep Dive (root causes, correlation, duration analysis) - Export functionality (Excel, HTML, JSON) Blueprint Compliance: - FCR: 4 categories (Primera Llamada/Rellamada × Sin/Con Riesgo de Fuga) - Churn: Binary view (Sin Riesgo de Fuga / En Riesgo de Fuga) - Agent: Talento Para Replicar / Oportunidades de Mejora - Fixed FCR rate calculation (only FIRST_CALL counts as success) Technical: - Streamlit + Plotly for interactive visualizations - Light theme configuration (.streamlit/config.toml) - Fixed Plotly colorbar titlefont deprecation Documentation: - Updated PROJECT_CONTEXT.md, TODO.md, CHANGELOG.md - Added 4 new technical decisions (TD-014 to TD-017) - Created TROUBLESHOOTING.md with 10 common issues Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
53
tests/conftest.py
Normal file
53
tests/conftest.py
Normal file
@@ -0,0 +1,53 @@
|
||||
"""
|
||||
CXInsights - Pytest Configuration and Fixtures
|
||||
"""
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
# Set test environment
|
||||
os.environ["TESTING"] = "true"
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def project_root() -> Path:
|
||||
"""Return the project root directory."""
|
||||
return Path(__file__).parent.parent
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def fixtures_dir(project_root: Path) -> Path:
|
||||
"""Return the fixtures directory."""
|
||||
return project_root / "tests" / "fixtures"
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def sample_audio_dir(fixtures_dir: Path) -> Path:
|
||||
"""Return the sample audio directory."""
|
||||
return fixtures_dir / "sample_audio"
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def sample_transcripts_dir(fixtures_dir: Path) -> Path:
|
||||
"""Return the sample transcripts directory."""
|
||||
return fixtures_dir / "sample_transcripts"
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def config_dir(project_root: Path) -> Path:
|
||||
"""Return the config directory."""
|
||||
return project_root / "config"
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def taxonomy_path(config_dir: Path) -> Path:
|
||||
"""Return the RCA taxonomy file path."""
|
||||
return config_dir / "rca_taxonomy.yaml"
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def settings_path(config_dir: Path) -> Path:
|
||||
"""Return the settings file path."""
|
||||
return config_dir / "settings.yaml"
|
||||
Reference in New Issue
Block a user