Contribution to the documentation#
About documentation#
yfinance documentation is written in reStructuredText (rst) and built using Sphinx.
The documentation file is in doc/source/...
Most of the notes under API References read from class and methods docstrings. These documentations, found in doc/source/reference/api is autogenerated by Sphinx and not included in git.
Building documentation locally#
To build the documentation locally, follow these steps:
Install Required Dependencies:
Make sure Sphinx and any other dependencies are installed. If a requirements.txt file is available, you can install dependencies by running:
pip install -r requirements.txt
Build with Sphinx:
After dependencies are installed, use the sphinx-build command to generate HTML documentation.
Go to doc/ directory Run:
make clean && make html
View Documentation Locally:
Open doc/build/html/index.html in the browser to view the generated documentation.
Building documentation on main#
The documentation updates are built on merge to main branch. This is done via GitHub Actions workflow based on /yfinance/.github/workflows/deploy_doc.yml.
Reivew the changes locally and push to dev.
When dev gets merged to main, GitHub Actions workflow is automated to build documentation.