fja05680 / pinkfish

A backtester and spreadsheet library for security analysis.
https://fja05680.github.io/pinkfish
MIT License
264 stars 60 forks source link

updating dependency versions in requests.txt #77

Closed tombohub closed 6 months ago

tombohub commented 7 months ago

Hi, it seems lot of dependencies are older versions in requests.txt. Because all of them are pinned to exact version number we cannot install pinkfish using poetry, unless we downgrade packages installed before we installed pinkfish.

Error message poetry:

Because no versions of pinkfish match >1.16.0,<2.0.0
 and pinkfish (1.16.0) depends on requests (2.28.1), pinkfish (>=1.16.0,<2.0.0) requires requests (2.28.1).
So, because stock-analytics depends on both requests (^2.31.0) and pinkfish (^1.16.0), version solving failed.

which means I get requests v2.31.0 installed , but pinkfish requires exact 2.28.1 version.

How do we go with updating dependencies to at lease using carrots: ^2.28.1 ?

fja05680 commented 7 months ago

Hi, I tried doing this once, setting a minimum version but this doesn't work. These packages don't always maintain backward compatibility. So you have to pin a specific version. The way around this is creating a virtual environment for pinkfish. In my opinion this is the proper approach for any Python project. I'm not familiar with the tool that you mentioned, but I assume it's capable of dealing with virtual Python environments. I suggest that you search that out, and use a virtual environment.

On Sun, Dec 10, 2023, 9:35 AM tombohub @.***> wrote:

Hi, it seems lot of dependencies are older versions in requests.txt. Because all of them are pinned to exact version number we cannot install pinkfish using poetry, unless we downgrade packages installed before we installed pinkfish.

Error message poetry:

Because no versions of pinkfish match >1.16.0,<2.0.0 and pinkfish (1.16.0) depends on requests (2.28.1), pinkfish (>=1.16.0,<2.0.0) requires requests (2.28.1). So, because stock-analytics depends on both requests (^2.31.0) and pinkfish (^1.16.0), version solving failed.

How do we go with updating dependencies to at lease using carrots: ^2.31.0 ?

— Reply to this email directly, view it on GitHub https://github.com/fja05680/pinkfish/issues/77, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACD3KHW5BMWOG46ELUVYHN3YIXJDZAVCNFSM6AAAAABAOUVUBSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGAZTINBRHE3DSMA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

fja05680 commented 7 months ago

Over the Christmas break, I'll try to update everything so that you were versions get pulled in. But even then, the best approach is using a Python virtual environment for pinkfish.

On Sun, Dec 10, 2023, 9:35 AM tombohub @.***> wrote:

Hi, it seems lot of dependencies are older versions in requests.txt. Because all of them are pinned to exact version number we cannot install pinkfish using poetry, unless we downgrade packages installed before we installed pinkfish.

Error message poetry:

Because no versions of pinkfish match >1.16.0,<2.0.0 and pinkfish (1.16.0) depends on requests (2.28.1), pinkfish (>=1.16.0,<2.0.0) requires requests (2.28.1). So, because stock-analytics depends on both requests (^2.31.0) and pinkfish (^1.16.0), version solving failed.

How do we go with updating dependencies to at lease using carrots: ^2.31.0 ?

— Reply to this email directly, view it on GitHub https://github.com/fja05680/pinkfish/issues/77, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACD3KHW5BMWOG46ELUVYHN3YIXJDZAVCNFSM6AAAAABAOUVUBSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGAZTINBRHE3DSMA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

tombohub commented 7 months ago

Hi, yes I use pinfish in venv. The thing is I use it as a part of my bigger application which also uses pandas, requests, seaborn on it's own. There comes the dependency conflict.

fja05680 commented 7 months ago

Oh I see. I'll get it updated over the Christmas break so that newer versions are called out in requirements.txt

On Mon, Dec 11, 2023, 9:18 AM tombohub @.***> wrote:

Hi, yes I use pinfish in venv. The thing is I use it as a part of my bigger application which also uses pandas, requests, seaborn on it's own. There comes the dependency conflict.

— Reply to this email directly, view it on GitHub https://github.com/fja05680/pinkfish/issues/77#issuecomment-1850287001, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACD3KHQXU364AAI57RZK6G3YI4P2TAVCNFSM6AAAAABAOUVUBSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJQGI4DOMBQGE . You are receiving this because you commented.Message ID: @.***>

fja05680 commented 6 months ago

Hi, I updated everything to newer versions and removed dependency to TA-Lib. I'll plan to do a new release in a couple of days. I closed your PR. I did incorporate your suggestion to .gitignore. I didn't change setup.py though because TA-Lib is no longer called out in requirements.txt.

fja05680 commented 6 months ago

Release 2.1.0 created. I looked at requirements.txt and there are is no longer a reference to talib or TA-Lib. Also v2.31.0 is called out for requests. I hope this solved the issue you were having. Please let me know.

tombohub commented 6 months ago

Hi, thank you. I was able to install without problems.

fja05680 commented 6 months ago

Glad to hear it!

On Sun, Dec 31, 2023, 3:23 PM tombohub @.***> wrote:

Hi, thank you. I was able to install without problems.

— Reply to this email directly, view it on GitHub https://github.com/fja05680/pinkfish/issues/77#issuecomment-1873032363, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACD3KHVNPPHK4V7SSTZONA3YMHCTJAVCNFSM6AAAAABAOUVUBSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZTGAZTEMZWGM . You are receiving this because you commented.Message ID: @.***>