Open-EO / openeo-processes-dask

Python implementations of many OpenEO processes, dask-friendly by default.
Apache License 2.0
19 stars 14 forks source link

Module openeo_processes_dask.specs has no attribute 'load_collection' #243

Closed jzvolensky closed 4 months ago

jzvolensky commented 5 months ago

How to reproduce:

  1. Clone the main branch with git clone git@github.com:Open-EO/openeo-processes-dask.git

  2. Follow the install instructions: poetry install --all-extras

  3. Add OpenEO Local Processing poetry add "openeo[localprocessing]"

  4. Try importing and running a script e.g. from openeo.local import LocalConnection

  5. Script fails with: AttributeError: module 'openeo_processes_dask.specs' has no attribute 'load_collection'

It is necessary to clone with --recurse-submodules: git clone --recurse-submodules git@github.com:Open-EO/openeo-processes-dask.git

This is currently not mentioned in the installation instructions and needs to be added. I can add it to the readme together with another fix currently in progress.

Thanks!

ValentinaHutter commented 5 months ago

Thanks for pointing this out!

In order to run openeo-processes-dask implementations or unit tests, you do not necessarily need the git submodule to be available - therefore, we only mentioned it at the bottom of the https://github.com/Open-EO/openeo-processes-dask?tab=readme-ov-file#specs if you want to make use of it in connection with the local processing, this needs to be available, so, I think it would also make sense to add a section on this in the local processing docs, what do you think, @clausmichele ?

clausmichele commented 4 months ago

Hi @ValentinaHutter, in my opinion the submodule should always be cloned, since the best way to develop new processes is using real process graphs, which facilitates a lot the testing of various scenarios when the process is chained with other ones.

@jzvolensky included a couple of lines in his PR here: https://github.com/Open-EO/openeo-processes-dask/pull/244/files

ValentinaHutter commented 4 months ago

Sure, we can include it in the openeo-processes-dask docs, looks fine! But wouldn't it also make sense to include this in the client side processing documentation? https://open-eo.github.io/openeo-python-client/cookbook/localprocessing.html#installation

clausmichele commented 4 months ago

@ValentinaHutter I opened a PR in the openeo-python-client docs to mention this!