Repository navigation
sdk-sync: API 2.0.0+ffb34b7 → sdk-py (minor) - #175
marketdata-sdk-sync[bot] wants to merge 1 commit into
Conversation
tests: Added wire tests in test_options_chain.py for the four new `dte` forms the API now accepts (comma-separated list, closed range, `>=` and `<` operators), plus the pre-existing single-value int/str forms as regression, parametrizing `test_options_chain_input_days_to_expiration_forms_on_wire`. Added live integration tests in test_options_live.py (single-value narrowing, comma-list dedup against per-value ground truth, closed-range inclusive endpoints, `>=` and `<` boundary inclusion/exclusion), using module-scoped fixtures at dte 15/30/45 to anchor assertions in real data instead of server defaults. Wrote the compatibility probe calling `OptionsChainInput(symbol=..., dte=<int>)`, the only existing public member this delta touches. implement: Widened `OptionsChainInput.days_to_expiration` (alias `dte`) from `int | None` to `str | int | None`, since the API's `dte` query parameter now also reads a string expression (comma list, closed range, comparison operator), matching `strike`/`delta` syntax; a bare int is still sent unchanged. - Docs with example: updated `docs/options.md`'s `days_to_expiration` bullet and added a "Filter by days to expiration" example showing all four forms. - New member docstrings: none added; only the existing field's `Field(description=...)` was updated to state the new forms. - Wire test per new form: four phase-1 tests (comma list, closed range, `>=`, `<`) plus the regression single-value int/str case all pass against the new union type. - Validation of a new type on every construction path, empty/null handling: not applicable, no new type was introduced; the field stays a plain `str | int | None`, pass-through to the API as `strike`/`delta` already do. - Coverage: confirmed 100% (`--cov=marketdata`), no new branches added. - Examples/docs correctness: re-checked `README.md` and `examples/`, neither mentions `days_to_expiration`/`dte`, so neither was touched. - Existing parameter keeps accepting its old type: `int` still type-checks and serializes identically (`dte=30`), confirmed by the full suite; the phase-1 probe (which only used today's `int`) has since been removed from the checkout by the pipeline, as expected. - No disagreement between live API and documentation to report; I could not run the live suite here, and the new docs/tests only restate the API's own published description of `dte`. Files named in the brief but left unchanged, with reason: `src/marketdata/output_types/options_chain.py` and `options_quotes.py` (the response's `dte` field is still `list[int]`, unaffected — this delta is request-side only); `src/marketdata/resources/options/chain.py` and `lookup.py` (matched on the word "options", not `dte`); `README.md`, the `stocks_news` fixtures, `test_fan_out_retry.py`, `test_client.py`, `test_response_meta*.py`, `test_status_mapping.py`, `test_money_decimal.py`, `test_options_expirations.py`, `test_options_lookup.py`, `test_options_quotes.py` (all match on unrelated "options"/"dte-as-response-field" content, none on the request parameter). Outside my limits and left as-is: `CHANGELOG.md` (pipeline writes the entry), `.github/BUG_FINDING.md`, `.github/ISSUE_WORKFLOW.md`, `.github/ISSUE_TEMPLATE/bug.yml` — none describe this parameter, so nothing there is left incorrect by this change. review fix 1: Fixed the major finding: the `days_to_expiration` field description in src/marketdata/input_types/options.py claimed the comparison-operator form is inclusive, which contradicts the API's own `<`/`>` semantics and the live test that proves `<bound` excludes the bound. Reworded it to scope "inclusive" to the closed range only and describe the comparison operator as a one-sided bound, inclusive with `>=`/`<=` and exclusive with `>`/`<` — matching `filters.py`'s existing strike/delta wording and the already-correct phrasing in `docs/options.md`, which needed no change. The disagreement to name for the API team: its description reads "(>=30, <45) returns every expiration whose dte falls within the bounds, inclusive", but a live `<45` call excludes dte=45; the SDK's docs now state only the operator-symbol semantics both sides agree on, not the blanket "inclusive" claim. Resolved the first minor finding: deleted the now-redundant pre-existing `test_options_chain_input_days_to_expiration_alias_on_wire` in src/tests/test_options_chain.py, since its one assertion (`dte=30` sent, `days_to_expiration` absent) is exactly the `single_int` case of the new parametrized test. Left the second minor finding (a checked `DteFilter` builder, parallel to `StrikeFilter`/`DeltaFilter`) unresolved, as the reviewer offered no fix and flagged it as a maintainer decision, not a defect in this change. Re-ran the full suite and lint: 2169 passed (one fewer than before, from the deletion), coverage still 100% (3297/3297), ruff check and format both clean. changelog: Added changelog entry under `### Added` documenting `OptionsChainInput.days_to_expiration` (alias `dte`) parameter type widening from `int | None` to `str | int | None` to accept comma-separated days, closed ranges, and comparison operators matching the `strike` and `delta` syntax (API release 2.0.0), with `int` forms unchanged.
🧾 Job log — sdk-syncsdk-auto-sync job log
Changes in the API surface1. testsCoder (35 turns, US$ 1.22, 6 min 20 s):
Gates:
2. implementCoder (31 turns, US$ 1.04, 4 min 52 s):
Gates:
3. review 1Reviewer (11 turns, US$ 1.44, 3 min 36 s): 1 blocking finding(s)
4. review fix 1Findings sent back to the coder:
Minor findings sent along, as optional:
Coder (13 turns, US$ 0.46, 2 min 13 s):
Gates:
5. review 2Reviewer (4 turns, US$ 0.38, 39 s): approved
6. securitySecurity (3 turns, US$ 0.30, 18 s): approved
7. assessAnalyst (4 turns, US$ 0.13, 17 s) — public surface:
Computed by the pipeline: minor; changelog entry written 8. changelogCoder (7 turns, US$ 0.12, 1 min 07 s):
Gates:
Totals
Agent runs
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #175 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 62 62
Lines 3297 3297
=========================================
Hits 3297 3297
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
✅ Ready — Code reviewVersion impact: minor. Public surface comparison: Rating patch 6/6 (exemplary) · proof 6/6 (comprehensive) · overall 6/6 Reviewed |
|
Closing to re-run the SDK sync for API 2.0.0 together with sdk-java. |
Generated by sdk-auto-sync for API release 2.0.0 (commit
ffb34b7).Changes in the API surface
Snapshots
ae2b047c8f6f→c2a31e277345:What the agent did
tests: Added wire tests in test_options_chain.py for the four new
dteforms the API now accepts (comma-separated list, closed range,>=and<operators), plus the pre-existing single-value int/str forms as regression, parametrizingtest_options_chain_input_days_to_expiration_forms_on_wire. Added live integration tests in test_options_live.py (single-value narrowing, comma-list dedup against per-value ground truth, closed-range inclusive endpoints,>=and<boundary inclusion/exclusion), using module-scoped fixtures at dte 15/30/45 to anchor assertions in real data instead of server defaults. Wrote the compatibility probe callingOptionsChainInput(symbol=..., dte=<int>), the only existing public member this delta touches.implement: Widened
OptionsChainInput.days_to_expiration(aliasdte) fromint | Nonetostr | int | None, since the API'sdtequery parameter now also reads a string expression (comma list, closed range, comparison operator), matchingstrike/deltasyntax; a bare int is still sent unchanged.docs/options.md'sdays_to_expirationbullet and added a "Filter by days to expiration" example showing all four forms.Field(description=...)was updated to state the new forms.>=,<) plus the regression single-value int/str case all pass against the new union type.str | int | None, pass-through to the API asstrike/deltaalready do.--cov=marketdata), no new branches added.README.mdandexamples/, neither mentionsdays_to_expiration/dte, so neither was touched.intstill type-checks and serializes identically (dte=30), confirmed by the full suite; the phase-1 probe (which only used today'sint) has since been removed from the checkout by the pipeline, as expected.dte.Files named in the brief but left unchanged, with reason:
src/marketdata/output_types/options_chain.pyandoptions_quotes.py(the response'sdtefield is stilllist[int], unaffected — this delta is request-side only);src/marketdata/resources/options/chain.pyandlookup.py(matched on the word "options", notdte);README.md, thestocks_newsfixtures,test_fan_out_retry.py,test_client.py,test_response_meta*.py,test_status_mapping.py,test_money_decimal.py,test_options_expirations.py,test_options_lookup.py,test_options_quotes.py(all match on unrelated "options"/"dte-as-response-field" content, none on the request parameter).Outside my limits and left as-is:
CHANGELOG.md(pipeline writes the entry),.github/BUG_FINDING.md,.github/ISSUE_WORKFLOW.md,.github/ISSUE_TEMPLATE/bug.yml— none describe this parameter, so nothing there is left incorrect by this change.review fix 1: Fixed the major finding: the
days_to_expirationfield description in src/marketdata/input_types/options.py claimed the comparison-operator form is inclusive, which contradicts the API's own</>semantics and the live test that proves<boundexcludes the bound. Reworded it to scope "inclusive" to the closed range only and describe the comparison operator as a one-sided bound, inclusive with>=/<=and exclusive with>/<— matchingfilters.py's existing strike/delta wording and the already-correct phrasing indocs/options.md, which needed no change. The disagreement to name for the API team: its description reads "(>=30, <45) returns every expiration whose dte falls within the bounds, inclusive", but a live<45call excludes dte=45; the SDK's docs now state only the operator-symbol semantics both sides agree on, not the blanket "inclusive" claim.Resolved the first minor finding: deleted the now-redundant pre-existing
test_options_chain_input_days_to_expiration_alias_on_wirein src/tests/test_options_chain.py, since its one assertion (dte=30sent,days_to_expirationabsent) is exactly thesingle_intcase of the new parametrized test.Left the second minor finding (a checked
DteFilterbuilder, parallel toStrikeFilter/DeltaFilter) unresolved, as the reviewer offered no fix and flagged it as a maintainer decision, not a defect in this change.Re-ran the full suite and lint: 2169 passed (one fewer than before, from the deletion), coverage still 100% (3297/3297), ruff check and format both clean.
changelog: Added changelog entry under
### AddeddocumentingOptionsChainInput.days_to_expiration(aliasdte) parameter type widening fromint | Nonetostr | int | Noneto accept comma-separated days, closed ranges, and comparison operators matching thestrikeanddeltasyntax (API release 2.0.0), withintforms unchanged.Files
CHANGELOG.mddocs/options.mdsrc/marketdata/input_types/options.pysrc/tests/integration/test_options_live.pysrc/tests/test_options_chain.pyVersion
Public-surface change computed by the pipeline: minor
marketdata.input_types.options.OptionsChainInput.days_to_expiration— Annotation widened from int | None to str | int | None; OptionsChainInput(symbol=..., dte=30) and client.options.chain("AAPL", days_to_expiration=30) still type-check, and callers gain the new str form (e.g. "15,30,45", "0-45", ">=30").Live-API suite
src/tests/integration/test_options_live.pyFiles of this suite changed by this pull request. The pipeline ran the ones the change added or modified against the live API before the pull request, and they passed; this pull request's CI runs the whole suite.
Job log
The full record of this job — every phase, test and build result, review findings and how they were resolved, and each fix round after the PR was opened — is in the job log comment.
4 coder run(s) · 3 review(s) · 108 turns · 9,394,826 tokens · US$ 5.09 · item
1380e6e8-31e3-4322-a204-207422fcb4d5Agent runs