Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 12 additions & 18 deletions executor/price_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,15 @@ def _open_universe_library(signals_bucket: str):
those live in the `macro` library; use ``_open_macro_library`` for
those.

Hard-fails on connection/library errors per feedback_no_silent_fails.
Thin wrapper over ``alpha_engine_lib.arcticdb.open_universe_lib`` —
the lib chokepoint (L2771) centralizes the S3 URI construction and
`get_library` error-wrapping across all alpha-engine consumers.
Kept as a local wrapper so the existing callers' import surface
stays unchanged and so the macOS allocator-prime invariant
(``import arcticdb`` at module top, BEFORE pandas) is preserved.
"""
adb = _arcticdb # already imported at module top for macOS allocator prime
region = os.environ.get("AWS_REGION", "us-east-1")
uri = (
f"s3s://s3.{region}.amazonaws.com:{signals_bucket}"
f"?path_prefix=arcticdb&aws_auth=true"
)
arctic = adb.Arctic(uri)
return arctic.get_library("universe")
from alpha_engine_lib.arcticdb import open_universe_lib
return open_universe_lib(signals_bucket)


def _open_macro_library(signals_bucket: str):
Expand All @@ -82,16 +81,11 @@ def _open_macro_library(signals_bucket: str):
and builders.backfill. SPY in particular is what the morning
freshness gate and EOD reconcile check.

Hard-fails on connection/library errors per feedback_no_silent_fails.
Thin wrapper over ``alpha_engine_lib.arcticdb.open_macro_lib`` —
see ``_open_universe_library`` above for the rationale.
"""
adb = _arcticdb
region = os.environ.get("AWS_REGION", "us-east-1")
uri = (
f"s3s://s3.{region}.amazonaws.com:{signals_bucket}"
f"?path_prefix=arcticdb&aws_auth=true"
)
arctic = adb.Arctic(uri)
return arctic.get_library("macro")
from alpha_engine_lib.arcticdb import open_macro_lib
return open_macro_lib(signals_bucket)


def load_price_histories(
Expand Down
Loading