Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest to loosen the dependency on yfinance #3

Open
Agnes-U opened this issue Dec 9, 2022 · 0 comments
Open

Suggest to loosen the dependency on yfinance #3

Agnes-U opened this issue Dec 9, 2022 · 0 comments

Comments

@Agnes-U
Copy link

Agnes-U commented Dec 9, 2022

Hi, your project dfinance requires "yfinance==0.1.69" in its dependency. After analyzing the source code, we found that some other versions of yfinance can also be suitable without affecting your project, i.e., yfinance 0.1.68. Therefore, we suggest to loosen the dependency on yfinance from "yfinance==0.1.69" to "yfinance>=0.1.68,<=0.1.69" to avoid any possible conflict for importing more packages or for downstream projects that may use dfinance.

May I pull a request to loosen the dependency on yfinance?

By the way, could you please tell us whether such dependency analysis may be potentially helpful for maintaining dependencies easier during your development?



For your reference, here are details in our analysis.

Your project dfinance(commit id: c532e4f) directly uses 2 APIs from package yfinance.

yfinance.multi.download, yfinance.multi.download

From which, 20 functions are then indirectly called, including 13 yfinance's internal APIs and 7 outsider APIs, as follows (neglecting some repeated function occurrences).

[/dkfreitag/dfinance]
+--yfinance.multi.download
|      +--yfinance.utils.is_isin
|      |      +--re.match
|      +--yfinance.utils.get_ticker_by_isin
|      |      +--yfinance.utils.get_all_by_isin
|      |      |      +--yfinance.utils.is_isin
|      +--yfinance.utils.ProgressBar.__init__
|      |      +--yfinance.utils.ProgressBar.__update_amount
|      +--multitasking.set_max_threads
|      +--yfinance.multi._download_one_threaded
|      |      +--yfinance.multi._download_one
|      |      |      +--yfinance.ticker.Ticker.__init__
|      |      |      |      +--yfinance.base.TickerBase.__init__
|      |      |      |      |      +--yfinance.utils.empty_df
|      |      |      |      |      |      +--pandas.DataFrame
|      |      |      |      |      +--yfinance.utils.is_isin
|      |      |      |      |      +--yfinance.utils.get_ticker_by_isin
|      +--time.sleep
|      +--yfinance.multi._download_one
|      +--yfinance.utils.ProgressBar.animate
|      |      +--sys.stdout.flush
|      |      +--yfinance.utils.ProgressBar.update_iteration
|      |      |      +--yfinance.utils.ProgressBar.__update_amount
|      +--multitasking.cpu_count
|      +--yfinance.utils.ProgressBar.completed
|      |      +--yfinance.utils.ProgressBar.update_iteration
|      |      +--sys.stdout.flush
|      +--pandas.concat
|      +--yfinance.multi._realign_dfs
|      |      +--pandas.concat
|      |      +--pandas.DataFrame
|      |      +--yfinance.utils.empty_df

We scan yfinance's versions among [0.1.68] and 0.1.69, the changing functions (diffs being listed below) have none intersection with any function or API we mentioned above (either directly or indirectly called by this project).

diff: 0.1.69(original) 0.1.68
['yfinance.base.TickerBase.history', 'yfinance.base.TickerBase']

As for other packages, the APIs of @outside_package_name are called by yfinance in the call graph and the dependencies on these packages also stay the same in our suggested versions, thus avoiding any outside conflict.

Therefore, we believe that it is quite safe to loose your dependency on yfinance from "yfinance==0.1.69" to "yfinance>=0.1.68,<=0.1.69". This will improve the applicability of dfinance and reduce the possibility of any further dependency conflict with other projects/packages.

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

No branches or pull requests

1 participant