Edwin Salguero
Enhanced FRED ML with improved Reports & Insights page, fixed alignment analysis, and comprehensive analytics improvements
2469150
#!/usr/bin/env python3 | |
""" | |
Test script to verify the app is displaying advanced features | |
""" | |
import requests | |
import json | |
import time | |
def test_app_features(): | |
"""Test if the app is displaying advanced features""" | |
print("π Testing app features...") | |
# Test 1: Check if app is running | |
try: | |
response = requests.get("http://localhost:8501/_stcore/health", timeout=5) | |
if response.status_code == 200: | |
print("β App is running and healthy") | |
else: | |
print(f"β App health check failed: {response.status_code}") | |
return False | |
except Exception as e: | |
print(f"β App not accessible: {e}") | |
return False | |
# Test 2: Check if analytics are loading | |
try: | |
# Import the app module to check analytics status | |
import sys | |
import os | |
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) | |
import frontend.app as app | |
# Check analytics availability | |
if hasattr(app, 'ANALYTICS_AVAILABLE') and app.ANALYTICS_AVAILABLE: | |
print("β Advanced analytics are available") | |
else: | |
print("β Advanced analytics are not available") | |
return False | |
except Exception as e: | |
print(f"β Analytics check failed: {e}") | |
return False | |
# Test 3: Check if nonfarm payroll indicator is included | |
try: | |
from config.settings import DEFAULT_SERIES_LIST | |
if 'PAYEMS' in DEFAULT_SERIES_LIST: | |
print("β Nonfarm payroll indicator (PAYEMS) is included") | |
else: | |
print("β Nonfarm payroll indicator not found") | |
return False | |
except Exception as e: | |
print(f"β Series list check failed: {e}") | |
return False | |
# Test 4: Check if advanced visualizations are available | |
try: | |
from src.analysis.comprehensive_analytics import ComprehensiveAnalytics | |
print("β Advanced analytics module is available") | |
except Exception as e: | |
print(f"β Advanced analytics module not available: {e}") | |
return False | |
print("\nπ All tests passed! The app should be displaying:") | |
print("- Advanced analytics and visualizations") | |
print("- Nonfarm payroll indicator (PAYEMS)") | |
print("- Real-time economic data") | |
print("- Mathematical fixes and enhanced UI") | |
return True | |
if __name__ == "__main__": | |
print("π§ͺ Testing App Features") | |
print("=" * 50) | |
success = test_app_features() | |
if success: | |
print("\nβ Your app is running with all the advanced features!") | |
print("π Open http://localhost:8501 in your browser to see:") | |
print(" - Executive Dashboard with real-time data") | |
print(" - Advanced Analytics with mathematical fixes") | |
print(" - Economic Indicators including nonfarm payroll") | |
print(" - Enhanced visualizations and insights") | |
else: | |
print("\nβ οΈ Some features may not be working properly.") |