Dmitry Beresnev commited on
Commit
253cc2c
·
1 Parent(s): a584bff

fix market intellegence and cache

Browse files
app/pages/05_Dashboard.py CHANGED
@@ -525,13 +525,18 @@ with st.spinner("Loading news from 8 sources..."):
525
  # Clear the status message after all sources complete
526
  status_placeholder.success(f"✅ Loaded {len(completed_sources)}/8 sources successfully")
527
 
528
- # Debug output (remove in production)
529
- if st.session_state.get('debug_mode', False):
530
  st.write("### Debug: News Fetch Results")
531
  st.write(f"- Twitter: {len(twitter_df)} items")
532
  st.write(f"- Reddit: {len(reddit_df)} items")
533
  st.write(f"- RSS: {len(rss_all_df)} items")
534
  st.write(f"- AI/Tech: {len(ai_tech_df)} items")
 
 
 
 
 
535
  if fetch_errors:
536
  st.write(f"- Errors: {len(fetch_errors)}")
537
  for err in fetch_errors:
 
525
  # Clear the status message after all sources complete
526
  status_placeholder.success(f"✅ Loaded {len(completed_sources)}/8 sources successfully")
527
 
528
+ # Debug output - temporarily enabled to diagnose new sources
529
+ if True: # st.session_state.get('debug_mode', False):
530
  st.write("### Debug: News Fetch Results")
531
  st.write(f"- Twitter: {len(twitter_df)} items")
532
  st.write(f"- Reddit: {len(reddit_df)} items")
533
  st.write(f"- RSS: {len(rss_all_df)} items")
534
  st.write(f"- AI/Tech: {len(ai_tech_df)} items")
535
+ st.write(f"- Predictions: {len(predictions_df)} items")
536
+ st.write(f"- Sectoral News: {len(sectoral_news_df)} items")
537
+ st.write(f"- Market Events: {len(market_events_df)} items")
538
+ st.write(f"- Economic Calendar: {len(economic_calendar_df)} items")
539
+ st.write(f"- Availability: Predictions={PREDICTIONS_AVAILABLE}, Sectoral={SECTORAL_AVAILABLE}, Events={EVENTS_AVAILABLE}, Calendar={CALENDAR_AVAILABLE}")
540
  if fetch_errors:
541
  st.write(f"- Errors: {len(fetch_errors)}")
542
  for err in fetch_errors:
app/utils/news_cache.py CHANGED
@@ -62,7 +62,7 @@ class NewsCacheManager:
62
  Returns:
63
  List of news items
64
  """
65
- if source not in ['twitter', 'reddit', 'rss', 'ai_tech']:
66
  logger.error(f"Invalid source: {source}")
67
  return []
68
 
 
62
  Returns:
63
  List of news items
64
  """
65
+ if source not in ['twitter', 'reddit', 'rss', 'ai_tech', 'predictions', 'sectoral_news', 'market_events', 'economic_calendar']:
66
  logger.error(f"Invalid source: {source}")
67
  return []
68