|
|
|
|
|
""" |
|
|
Debug script to test analytics import |
|
|
""" |
|
|
|
|
|
import sys |
|
|
import os |
|
|
|
|
|
|
|
|
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) |
|
|
|
|
|
def test_imports(): |
|
|
"""Test all the imports that the analytics need""" |
|
|
print("π Testing imports...") |
|
|
|
|
|
|
|
|
print("\n1. Testing config import...") |
|
|
try: |
|
|
from config.settings import Config |
|
|
print("β
Config import successful") |
|
|
config = Config() |
|
|
print(f"β
Config.get_fred_api_key() = {config.get_fred_api_key()}") |
|
|
except Exception as e: |
|
|
print(f"β Config import failed: {e}") |
|
|
|
|
|
|
|
|
print("\n2. Testing analytics import...") |
|
|
try: |
|
|
from src.analysis.comprehensive_analytics import ComprehensiveAnalytics |
|
|
print("β
ComprehensiveAnalytics import successful") |
|
|
except Exception as e: |
|
|
print(f"β ComprehensiveAnalytics import failed: {e}") |
|
|
|
|
|
|
|
|
print("\n3. Testing Enhanced FRED Client import...") |
|
|
try: |
|
|
from src.core.enhanced_fred_client import EnhancedFREDClient |
|
|
print("β
EnhancedFREDClient import successful") |
|
|
except Exception as e: |
|
|
print(f"β EnhancedFREDClient import failed: {e}") |
|
|
|
|
|
|
|
|
print("\n4. Testing Economic Forecasting import...") |
|
|
try: |
|
|
from src.analysis.economic_forecasting import EconomicForecaster |
|
|
print("β
EconomicForecaster import successful") |
|
|
except Exception as e: |
|
|
print(f"β EconomicForecaster import failed: {e}") |
|
|
|
|
|
|
|
|
print("\n5. Testing Economic Segmentation import...") |
|
|
try: |
|
|
from src.analysis.economic_segmentation import EconomicSegmentation |
|
|
print("β
EconomicSegmentation import successful") |
|
|
except Exception as e: |
|
|
print(f"β EconomicSegmentation import failed: {e}") |
|
|
|
|
|
|
|
|
print("\n6. Testing Statistical Modeling import...") |
|
|
try: |
|
|
from src.analysis.statistical_modeling import StatisticalModeling |
|
|
print("β
StatisticalModeling import successful") |
|
|
except Exception as e: |
|
|
print(f"β StatisticalModeling import failed: {e}") |
|
|
|
|
|
if __name__ == "__main__": |
|
|
test_imports() |