[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. |
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