[codex] Bundle cookbook example data and remove yfinance#729
[codex] Bundle cookbook example data and remove yfinance#729whenpoem wants to merge 2 commits intoPyPortfolio:mainfrom
Conversation
atharvajoshi01
left a comment
There was a problem hiding this comment.
Makes sense to bundle the data, same thing sklearn does with load_iris etc. Notebooks should just work now without needing a live yfinance connection. One thing I'd double check is whether the bundled CSVs match what the original yfinance calls were returning, just so the notebook outputs stay consistent.
Thanks for the careful check.the first version bundled data that made the notebooks run offline, but it did not fully preserve the original yfinance ticker universes and outputs. |
Hi @atharvajoshi01, thanks again for the review. I pushed a follow-up commit addressing the bundled CSV consistency issue you mentioned. Could you please take another look when you have a chance and let me know if this resolves your concern? Also, the PR still seems blocked by pending workflow approvals / required review. If someone with write access could approve the workflows, that would be very helpful. Thanks! |
Summary
pypfopt.datamodule with loaders for bundled example prices, SPY prices, and Black-Litterman market capsyfinanceyfinancefrom thedevextra and add tests for the new data loadersWhy
Issue #716 tracks the cookbook notebooks' dependency on live
yfinancedownloads. That makes notebook CI depend on external network calls and changing upstream data. Bundling the example datasets keeps the notebooks reproducible and allowsnbmaketo run offline.Impact
yfinanceinstalled to run the notebook test suiteValidation
uv run --python .venv\Scripts\python.exe pytest ./testsuv run --python .venv\Scripts\python.exe pytest --reruns 3 --nbmake --nbmake-timeout=3600 -vv cookbookuv run --python .venv\Scripts\python.exe python -m build --sdist --wheel --outdir dist-check