Import trading_calendar from alpha-engine-lib (single source of truth)#49
Merged
Merged
Conversation
Closes the loop on the de-bloat split regression. collectors/universe_returns.py was importing `from trading_calendar import is_trading_day`, which broke when #43 moved the file out of this repo. Rather than restore a local copy (the patchwork approach in the now-closed #48), import from alpha_engine_lib.trading_calendar — a single source of truth shared across all Alpha Engine modules. - collectors/universe_returns.py: `from alpha_engine_lib.trading_calendar ...` - requirements.txt: bump alpha-engine-lib pin @v0.1.1 → @v0.1.3 Requires cipher813/alpha-engine-lib#4 merged + tagged v0.1.3 first. Spots pip-install from the git tag, so the new module appears at install time without any other plumbing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
557574a to
7e145f6
Compare
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 1 of the architecturally-correct fix for the trading_calendar issue. Closes the regression #43 introduced and supersedes the patchwork #48 (now closed).
`collectors/universe_returns.py` imports `trading_calendar` at the top-level, which broke when #43 moved that file out of the repo. Rather than restore a duplicate local copy (the approach in now-closed #48), this PR imports from `alpha_engine_lib.trading_calendar` — single source of truth across all Alpha Engine modules.
Changes
```diff
```
```diff
```
Sequencing
Phase 2 (separate session, roadmap)
Remove the duplicate `trading_calendar.py` from alpha-engine-dashboard and update the Step Function `CheckTradingDay` SSM command to `python -m alpha_engine_lib.trading_calendar`. Requires first adding `AE_LIB_TOKEN` SSM fetch + git `insteadOf` setup to alpha-engine-dashboard's `boot-pull.sh` and pinning the lib in its requirements.txt. Keeping the dashboard copy in place tonight so Saturday's CheckTradingDay step keeps working.
🤖 Generated with Claude Code