pastas / pastastore

:spaghetti: :convenience_store: Tools for managing timeseries and Pastas models
https://pastastore.readthedocs.io
MIT License
15 stars 4 forks source link

Install Optional Dependencies Directly #64

Closed martinvonk closed 2 years ago

martinvonk commented 2 years ago

Allows for the direct installation of optional dependencies when installing Pastastore using: pip install pastastore[full] or pip install -e .[full] for Windows users and pip install pastastore[full,contextily] for MacOS and Linux users.

It might be useful to check if we can add Arctic and Snappy for ArcticConnector and PystoreConnector the same way as well.

dbrakenhoff commented 2 years ago

Pyproj is only required by contextily related code so I figured we could move that to the contextily label.

I update the readme installation section a bit to reflect that and make it a little clearer hopefully?

martinvonk commented 2 years ago

Pyproj is only required by contextily related code so I figured we could move that to the contextily label.

Maybe 'full' is then a bit of a weird keyword? If it only installs adjustText.

What dependencies are needed for arctic and pystore? Than maybe we can add those as well?

dbrakenhoff commented 2 years ago

Agreed, "full" promises more than it now provides...

Arctic hasnt updated its package on pip for a while so to install you need to clone from GitHub, which is what we do in the GitHub CI workflow:

https://github.com/pastas/pastastore/blob/27a70b667bbb5a6dc657004430f419a45e2a0ed1/.github/workflows/ci.yml#L44

I don't know if that works for setup.py. Also, arctic was still working on supporting newer versions of Pandas, which means installing arctic conflicts with pastas requirements for pandas. I haven't looked into this recently, i have seen some commits referencing these issues, but because of that it is probably more trouble than it is worth to add arctic as an optional dependency this way at the moment. I know we've gotten arctic working with newer versions of pandas but that still requires some manual tweaking...

For pystore the process is also challenging as it requires a non-Python dependency "snappy" to be installed first, before being able to install the python-snappy package, and subsequently pystore. Also, it now seems pystore is having trouble with the latest version of dask (2022.5.0), adding to the dependency challenges.

Summarizing:

So long story short, I wouldn't add those optional dependencies at this moment.

I'm also of half a mind to remove the PystoreConnector, as I don't think anyone is using it, and its turning out to be more trouble than it is worth.