Skip to content

fix: delete probability in yfinance fetch#223

Open
nikbpetrov wants to merge 1 commit into
forecastingresearch:mainfrom
nikbpetrov:yfinance-del-probability
Open

fix: delete probability in yfinance fetch#223
nikbpetrov wants to merge 1 commit into
forecastingresearch:mainfrom
nikbpetrov:yfinance-del-probability

Conversation

@nikbpetrov

@nikbpetrov nikbpetrov commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Bug Fixes
    • Removed an obsolete probability field from Yfinance fetch/update results to match the current data contract.
    • Updated delisted ticker handling so resolved records remain consistent after the field removal.
    • Aligned test fixtures and assertions with the revised fetch output shape (including checks for freeze_datetime_value).

@nikbpetrov

nikbpetrov commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator Author

@houtanb note that this change means that there will be a stale probability fields across all files, should I provide a command for you to run against prod to remove that field across all files? very destructive action, and I will test ofc (and provide testing guidance for the dev project)

@houtanb

houtanb commented Jun 18, 2026

Copy link
Copy Markdown
Member

@nikbpetrov where else is the probability field perpetuated beyond the fetch file? Won't it be removed after one run?

@nikbpetrov

Copy link
Copy Markdown
Collaborator Author

yup, sorry, that's right -- my testing harness threw me off as it also surfaced errors on update() -- but that was a harness problem, not a PR problem

@nikbpetrov nikbpetrov force-pushed the yfinance-del-probability branch from b4ee9a3 to 563ac59 Compare June 30, 2026 11:43
@houtanb

houtanb commented Jul 8, 2026

Copy link
Copy Markdown
Member

@CodeRabbit full review

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e7f374d9-4ee7-4ed9-87b8-91b1366a4a26

📥 Commits

Reviewing files that changed from the base of the PR and between 563ac59 and a1368ad.

📒 Files selected for processing (4)
  • src/_schemas.py
  • src/sources/yfinance.py
  • src/tests/conftest.py
  • src/tests/test_yfinance.py
💤 Files with no reviewable changes (2)
  • src/tests/conftest.py
  • src/sources/yfinance.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/_schemas.py
  • src/tests/test_yfinance.py

📝 Walkthrough

Walkthrough

The yfinance fetch schema and implementation no longer use the transient probability field. Related test fixtures and assertions were updated to match the new row shape.

Changes

Probability Field Removal

Layer / File(s) Summary
Schema contract update
src/_schemas.py
YfinanceFetchFrame no longer declares probability, and its docstring reflects the remaining transient field.
Fetch and update logic
src/sources/yfinance.py
fetch() no longer sets probability for fetched or delisted rows, and update() no longer strips it before upserting.
Test fixtures and assertions
src/tests/conftest.py, src/tests/test_yfinance.py
Fixture defaults and yfinance tests drop probability expectations and assert the updated resolved-row fields.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: removing the probability field from yfinance fetch logic.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@houtanb houtanb force-pushed the yfinance-del-probability branch from e128d66 to 563ac59 Compare July 8, 2026 17:59
@houtanb houtanb force-pushed the yfinance-del-probability branch from 563ac59 to a1368ad Compare July 8, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants