Developers - how to contribute #1084
Replies: 4 comments 5 replies
-
Just an FYI, download Pandas 2.1.0 and I started getting iloc warnings while using YFinance (utils.py). It's just a matter of adding iloc[x] to the code. I added it to the library and the warnings disappeared. I downgraded to 1.5.3 and all is good while the next version of YFinance is ready. Thanks for everything, love this library. |
Beta Was this translation helpful? Give feedback.
-
How to run tests to make sure I don't break anything? |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
superseded by https://github.com/ranaroussi/yfinance/blob/main/CONTRIBUTING.md |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Branches
To support rapid development without breaking stable versions, this project uses a two-layer branch model:

(inspiration)
Most of the time you want to target the dev branch, but default is main so remember to switch to dev.
Exception: can straight merge into main if:
I'm a GitHub newbie, how do I contribute code?
Sync fork
How to download & run a GitHub version of yfinance
Documentation website
The new docs website https://ranaroussi.github.io/yfinance/index.html is generated automatically from code.
When you fetch a branch or PR, probably it also has changes to docs - to generate and view this:
Unit tests
Tests have been written using the built-in Python module
unittest
. Examples:Run all price tests:
python -m unittest tests.test_prices
Run sub-set of price tests:
python -m unittest tests.test_prices.TestPriceRepair
Run a specific test:
python -m unittest tests.test_prices.TestPriceRepair.test_ticker_missing
Run all tests:
python -m unittest discover -s tests
Git stuff
commits
To keep the Git commit history and network graph compact please follow these two rules:
git commit -m "short sentence summary" -m "full commit message"
squash
tiny/negligible commits back with meaningful commits, or to combine successive related commits. Guide but basically it's:rebase
You might be asked to move your branch from
main
todev
. Make sure you have pulled all relevant branches then run:Beta Was this translation helpful? Give feedback.
All reactions