feat(signal_v2): foundation — config + state + requirements
- signal_v2/config.py: Settings dataclass loading web-ai/.env explicitly - signal_v2/state.py: PollState dataclass + module-level singleton - requirements.txt: httpx / fastapi / uvicorn / pytest-asyncio / respx - .gitignore: signal_v2/data/*.db (WAL/SHM) - empty tests/ marker Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
15
signal_v2/state.py
Normal file
15
signal_v2/state.py
Normal file
@@ -0,0 +1,15 @@
|
||||
"""PollState — process-wide singleton."""
|
||||
from dataclasses import dataclass, field
|
||||
|
||||
|
||||
@dataclass
|
||||
class PollState:
|
||||
portfolio: dict | None = None
|
||||
news_sentiment: dict | None = None
|
||||
screener_preview: dict | None = None
|
||||
last_updated: dict[str, str] = field(default_factory=dict)
|
||||
fetch_errors: dict[str, int] = field(default_factory=dict)
|
||||
|
||||
|
||||
# Process-wide singleton. Phase 3 imports: from signal_v2.state import state
|
||||
state = PollState()
|
||||
Reference in New Issue
Block a user