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

[FEAT] 1st example cannot be replicated because of missing utils.plot_image #296

Open
mkadunc opened this issue Jul 17, 2022 · 2 comments
Open

Comments

@mkadunc
Copy link
Member

mkadunc commented Jul 17, 2022

What is the problem? Please describe.

I tried to follow the first example provided in the documentation https://sentinelhub-py.readthedocs.io/en/latest/examples/process_request.html#Imports and got stuck when trying to render the downloaded image - the example notebook references utils.plot_image which I have no idea how to get to.

Here's the solution
?

Alternatives

@AleksMat
Copy link
Contributor

AleksMat commented Jul 17, 2022

For now you have to have utils.py script in the same folder as the notebook that you are running. Then the import should work.

But I agree, it is confusing for users and we got the same question a few times in the past. As suggested, we could:

  • Short-term: add a comment into notebooks explaining where the utility function is being imported from. ✔️
  • Long-term: add plotting functions into sentinelhub-py package. It is already on our internal list of issues but it requires some work. At the moment, matplotlib is not a dependency of sentinelhub-py and we would like to keep it this way. But we can make it an optional dependency if we structure plotting utilities as a package extension.

@mlubej
Copy link
Contributor

mlubej commented Mar 15, 2023

I think it might make more sense to add the plotting to each notebook. This would make the notebooks more standalone, and perhaps the users more commonly download and run notebooks without cloning/downloading repos.

Also, not sure how much sense it makes to add the matplotlib dependency, unless we have some other plans on how to use it, i.e. automatic batch status plot generation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants