feat: competitive intelligence & historical pattern matching layer
This commit is contained in:
@@ -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}"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user