Repository navigation
Preserve calendar intent in versioned time contracts - #35
Merged
Merged
Conversation
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.
Problem and behavior
Legacy feed metadata collapses omitted calendar and explicit null, and
with_overrides(calendar=None)cannot disable a declared calendar. Opt-in temporal contract version 2 preserves the distinction through JSON/YAML, nested market-data artifacts, copies and feed projections. Its resolver uses explicitcalendarargument, declared metadata, then NYSE. ExplicitNonedisables calendar handling.Version 1 remains the default because old null payloads cannot reveal the producer's intent. Canonical serializers preserve their existing wire fields. Version 2 adds explicit bar-grid origin, timestamp side and partial-interval policy, plus distinct observation/expected-bar/session/elapsed unit values. Specs does not compute schedules or annualization. Existing consumers must adopt the resolver and canonical serializers before claiming conformance;
dataclasses.asdictis not the version-2 wire format.Closes #34.
Validation
ed74a25: the public metadata workflow preserves CME_Equity after a null override; omitted and null feeds compare equal. Initial regression checkpoint362cbe7produced 30 failures and one passing control, including missing new APIs, not 30 separate numerical defects.ee125aa: 422 tests pass with 100% statement/branch coverage; Ruff, formatting, ty and commit hooks pass.AI assistance was used for design, implementation, tests and this description. The diff and executed behavior were reviewed directly; maintainers remain accountable for the change.