feat: competitive intelligence & historical pattern matching layer

This commit is contained in:
Celes Renata
2026-04-14 19:42:48 +00:00
parent b478022ba3
commit f7a11d14ea
203 changed files with 20155 additions and 97 deletions
+6 -1
View File
@@ -48,6 +48,7 @@ SOURCE_BUCKET_MAP: dict[str, str] = {
"filings_api": "stonks-raw-filings",
"web_scrape": "stonks-raw-news",
"broker": "stonks-raw-market",
"macro_news": "stonks-raw-news",
}
# Map artifact type to content type and file extension
@@ -75,10 +76,14 @@ def build_artifact_path(
"""Build a MinIO object path following the design convention.
Pattern: {source_type}/{ticker}/{yyyy}/{mm}/{dd}/{document_id}/{artifact_name}.{ext}
For macro_news sources, uses macro/ prefix instead of ticker:
macro/{yyyy}/{mm}/{dd}/{document_id}/{artifact_name}.{ext}
"""
ts = timestamp or datetime.now(timezone.utc)
# Macro sources use macro/ prefix instead of ticker (Requirement 1.1)
path_prefix = "macro" if source_type == "macro_news" else f"{source_type}/{ticker}"
return (
f"{source_type}/{ticker}/"
f"{path_prefix}/"
f"{ts.year}/{ts.month:02d}/{ts.day:02d}/"
f"{document_id}/{artifact_name}.{ext}"
)