Spaces:
Runtime error
Runtime error
Commit History
-
fix: two-layer cache to eliminate Yahoo Finance rate limits
EymenLayer 1 — requests-cache (SQLite on /tmp/finsight_http_cache): - Intercepts ALL HTTP calls made by yfinance transparently - 10-min TTL, stale_if_error=True (serves cached data on network failure) - Persists across Streamlit reruns (SQLite file survives rerun) - Added requests-cache>=1.2.0 to requirements.txt Layer 2 — in-memory TTLCache: - Avoids even SQLite disk lookups within a session - clear_cache() now clears both SQLite AND in-memory simultaneously Effect: After first successful fetch, subsequent loads are instant even if Yahoo rate-limits. Refresh button clears both layers.a3c7eeb -
fix(llm): rewrite streaming with create(stream=True) — SDK-version agnostic
Eymenfeat(ui): full Bloomberg Terminal × Stripe design system overhaul Streaming fix: - Replace messages.stream() context manager with messages.create(stream=True) - Iterate raw content_block_delta events directly — works on SDK 0.20+ to 0.84+ - Remove temperature=0.2 — newer model versions handle temperature as Omit by default - Pin anthropic>=0.84.0 to ensure consistent behavior on Streamlit Cloud UI overhaul: - Full Bloomberg Terminal × Stripe 2026 design system via CSS injection - JetBrains Mono for all numeric/ticker data, Inter for prose - Metric cards with gradient accent bar + monospace values - Animated status indicator in sidebar - Tabs on chart page (Price + Fundamentals) - Custom plotly theme: hovertemplate, unified hover, SVG export button - RSI OB/OS zone shading + annotations - MACD histogram dynamic green/red coloring - Signal badges with CSS classes (bullish/bearish/neutral/mixed) - Bento grid cards with per-card accent gradient on home page - Ticker header with name + sy…9a610b2 -
refactor: principal engineer audit — full production-grade rewrite
EymenArchitecture: - @st.cache_resource replaces session_state singletons (process-level, not rerun-level) - Strict SoC: UI layer contains zero business logic - Pure functions in technical.py easy to unit-test in isolation - Prompt engineering isolated in claude_client.py (_build_analysis_prompt, _inject_context) Error handling: - Specific exception catching at every callsite (RateLimitError, TickerNotFoundError, LLMRateLimitError, DocumentParseError, DocumentLoadError, IndexNotFoundError) - Zero bare 'except Exception' in UI layer - All errors map to user-friendly messages with actionable guidance Typing & Docs: - Google-style docstrings on all public classes and functions - Full type annotations including return types, args, raises - MessageList type alias for clarity Logging: - stdlib logging throughout (no print, no structlog dependency) - configure_logging() called once at app startup - Noisy third-party loggers suppressed Caching: - @st.cache_resource for StockClient, ClaudeClient…7dcad13 -
refactor: Principal Engineer audit — production-grade rewrite
EymenCore changes: - exceptions.py: full hierarchy (RateLimitError, NetworkTimeoutError, LLMRateLimitError, DocumentParseError, ContextWindowExceededError) with __init__ args, docstrings, and no string-matching required by callers - logger.py: stdlib-only (no structlog dep), colourised dev / key=value prod, noisy third-party loggers silenced, idempotent bootstrap - settings.py: field_validator for log_level and chunk_overlap, typed properties with full docstrings, Pydantic v2 compatible - stock_client.py: _classify_error() maps raw exceptions to typed domain errors; _fetch_with_retry() handles RateLimitError specifically vs NetworkTimeoutError vs DataFetchError; StockInfo dataclass documented; UA rotation; configurable TTL/retry/timeout from settings - technical.py: _validate_ohlcv() guard, _safe() helper prevents NaN comparison crashes, SignalMap type alias, full Google-style docstrings - claude_client.py: _create_with_retry() catches specific anthropic exception types (R…2b13db0 -
fix: yfinance rate limit — retry backoff, UA rotation, 10min cache, better error UI
Eymene8ec288 -
fix: remove LangChain (Python 3.14 conflict), rewrite RAG + full 2026 UI redesign
Eymen- LangChain completely removed (pydantic v1 incompatible with Python 3.14) - RAG rebuilt from scratch: pypdf + faiss-cpu + hash embeddings, zero external deps - UI: 2026 design system — dark mode, bento grid, gradient mesh bg, glassmorphism cards - Inter font, JetBrains Mono for code, spatial depth via box shadows - Animated nav buttons, metric cards, signal dashboard, streaming AI panel - session_state navigation (no st.switch_page / st.page_link)f05649a -
feat: initial FinSight MVP — stock analysis, RAG, conversational chat
Eymenfa77b99