Repository navigation
Conversation
Upgrade the lock file to latest compatible dependency versions, pin astral-sh/setup-uv to its latest release, and bump the ruff-pre-commit hook to its latest release. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
exchange_calendars 4.13.3 adds two HKEX closures to the XHKG calendar (for a typhoon and a rainstorm, both in Sep 2023) and corrects the CMES calendar's close time, introducing a daily maintenance gap that CME globex sessions did not previously have. - pt.py: `PTIntraday.sessions` raised an unhandled IndexError, rather than assigning pd.NaT as documented, for a composite-calendar minute that does not fall within a session when `direction` is None. This was latent until the CMES correction introduced minutes that fall within this gap. - Remove two now-recognised-as-non-trading-day rows from the 9988.HK daily csv test resource (XHKG was closed on both dates). - Exclude ES=F from assertions that require a price table's indices to align exactly with the CMES calendar, consistent with the existing exclusion applied for the same reason in `test_daily_pt`. - Fix a typo in `PricesCsvIgnoredUnalignedIndicesWarning`'s message. `TestDownsampleIntraday::test_excess_row_handling_and_lengths` remains failing: it relies on CMES and XNYS sessions abutting with no gap, a premise the CMES correction invalidates for every date, so the test needs redesigning around a scenario that still exhibits a genuine overlap. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
The Generated by Claude Code |
|
All 6 build-and-test matrix jobs have completed, each failing on exactly the same single test ( I've opened #589 with the full investigation (cause, what I tried, suggested next steps) for this failure, since fixing it properly needs a design decision beyond what a dependency bump should make unilaterally. Nothing further for me to do here without that decision. Generated by Claude Code |
🤖 Generated by Claude Code (agent autonomy 5/5)
Summary
Routine dependency update. Upgrades
uv.lockto the latest compatible dependency versions, bumpsastral-sh/setup-uvand theruff-pre-commithook, and makes the revisions needed to support the new versions:exchange_calendars4.13.3 corrects two calendars: it adds two 2023 HKEX closures (typhoon, rainstorm) toXHKG, and fixesCMES's close time, which introduces a ~1 hour daily maintenance gap that CME globex sessions didn't previously have.PTIntraday.sessions: an unhandledIndexErrorinstead of the documentedpd.NaTfor a composite-calendar minute outside any session.One test remains failing (confirmed across all 6 CI matrix jobs):
TestDownsampleIntraday::test_excess_row_handling_and_lengths. It depends on CMES and XNYS sessions abutting with no gap — a premise the CMES correction invalidates for every date, not just a fixture-specific quirk. Fixing it needs a redesign around a different scenario that still produces a genuine overlap, which is a judgment call beyond a routine dependency bump. I've left it failing rather than skip or paper over it, and opened #589 with the full investigation and suggested next steps.Agent autonomy
This PR was raised by a scheduled, unattended run of the
dependencies-managementskill; no user steered the session, so I made every design and implementation decision myself.Contributor review
I have reviewed the (tick all that apply):
Claude Sonnet 5 Medium
Summary
uv.lock/requirements.txtviauv lock --upgrade.astral-sh/setup-uvfromv10.3.3tov10.4.0in all three workflow files (actions/checkoutandrelease-drafter/release-drafterwere already pinned to their latest major-version tags).ruff-pre-commitfromv0.17.4tov0.17.6viauv run pre-commit autoupdate.PTIntraday.sessions's composite-calendar branch: it indexed the result ofcalendar.minute_to_sessions(...)with[0]without checking for emptiness, raisingIndexErrorinstead of assigningpd.NaTas documented. This was latent until theCMESclose-time correction created non-trading minutes within the price table's session range.9988.HKdaily csv test resource for dates XHKG is now (correctly) recognised as closed.ES=FfromTestIndicesTradingStatus::test_intraday_pt,test_composite_intraday_ptandTestDownsampleIntraday::test_reindex_equivalence's exact-alignment assertions, consistent with the pre-existing exclusion intest_daily_pt("do not include ES=F as trading does not fully align with calendar").PricesCsvIgnoredUnalignedIndicesWarning's message ("...evaluated index and: have therefore..." → "...evaluated index and have therefore...") and the tests asserting on it.Known unresolved failure
TestDownsampleIntraday::test_excess_row_handling_and_lengthsbuilds aCompositeCalendar([cmes, xnys])and assertssession_cc_close == next_session_cc_openfor session"2021-12-21", i.e. that CME and XNYS sessions abut with zero gap, in order to exercisePTIntraday._consolidate_resampled_duplicates's overlap-handling logic. TheCMESclose-time fix moves close one hour earlier (16:00→ the real Chicago time), which now matches CME's genuine daily settlement/maintenance halt — confirmed against the underlying Yahoo price data, which has zero-volume, flat-price placeholder rows for exactly that hour. This gap is unconditional (close_times = ((None, time(16)),)), so no date escapes it, and I could not find a realistic alternative calendar pairing inexchange_calendarsthat still abuts with zero gap to substitute for this scenario. This failed identically across all 6 CI matrix jobs (ubuntu/macos/windows × Python 3.10/3.14), confirming it isn't an OS or Python-version quirk. Resolving this needs a decision on how to re-ground the test (e.g. a different calendar pair, or test infrastructure that constructs a synthetic calendar), which is beyond what a dependency bump should decide unilaterally — see #589 for the full investigation and suggested next steps.Also noticed in passing (not fixed, out of scope)
composite_intraday_pt's fixture docstring says it's recreated withsymbols = ["MSFT", "AZN.L", "BTC-USD"], but the actual resource's columns areMSFT,AZN.L,ES=F. The docstring looks stale.src/market_prices/prices/csv.pyhas about 100 pre-existingmypyerrors, unrelated to this change and spread throughout the file — this file does not currently type-check cleanly.Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com