Open bastiencyr opened 1 year ago
Hi @bastiencyr!
Thank you for the suggestion! GEE is not a dev dep. But I understand what you are saying, and it makes sense. However, it is then unclear where to draw the line (or how many lines to draw, aka multiple extras). Someone using just rasterio would say that they don't need xarray in the deps.
I will keep it simple for now and leave them in deps, satisfying all possible needs. Nevertheless, if it causes trouble, please feel free to reopen this issue!
Best,
David
Hey, You're right, GEE is indeed used in the code and I didn't see this: https://github.com/awesome-spectral-indices/spyndex/blob/main/spyndex/spyndex.py
However, ee and eemont are very heavy (~100Mb). Docker images built with spyndex take space. We can create profile and install spyndex with the right option. For example, pip install spyndex[all]
to install all depedencies or pip install spyndex[ee]
to install spyndex only with ee support. It can be done with the following configuration:
extras_require={
"all": ["spyndex[ee]", "spyndex[rasterio]"},
"ee": ["earthengin-api", "eemont>=0.3.6"],
"rasterio": [...],
},
I didn't test this configuration.
We can renamed this issue in "Create optional dependencies list to lighten the size of spyndex package" , and thus, I don't think this issue has to be closed.
This is exactly what I wanted to avoid. But I understand you. I will keep this Issue open (and see what others thinks) and will think and work on it later on ;)
Hello,
The current dependencies management includes dev packages like earthengine-api. earthengine-api is heavy and users of spyndex don't necessary need it. So it's better to mark this dependency as a dev dependency. You can for example use the extras_require key in setup.py file. It would looks like this :
You can then install the regular version of this package with
pip install .
or the dev version withpip install .[dev]
Thanks !