Skip to content

Conversation

gjmooney
Copy link
Collaborator

@gjmooney gjmooney commented Jun 11, 2025

Description

This adds a STAC browser implementing the GEODES API.

stacnewui

Checklist

  • PR has a descriptive title and content.
  • PR description contains references to any issues the PR resolves, e.g. Resolves #XXX.
  • PR has one of the labels: documentation, bug, enhancement, feature, maintenance
  • Checks are passing.
    Failing lint checks can be resolved with:
    • pre-commit run --all-files
    • jlpm run lint

📚 Documentation preview: https://jupytergis--753.org.readthedocs.build/en/753/
💡 JupyterLite preview: https://jupytergis--753.org.readthedocs.build/en/753/lite

Copy link
Contributor

Binder 👈 Launch a Binder on branch gjmooney/jupytergis/stac_browser_rebase

@gjmooney gjmooney mentioned this pull request Jun 11, 2025
4 tasks
Copy link
Contributor

github-actions bot commented Jun 11, 2025

Integration tests report: appsharing.space

@gjmooney gjmooney added the enhancement New feature or request label Jun 12, 2025
@gjmooney gjmooney force-pushed the stac_browser_rebase branch 3 times, most recently from 33532fc to 75d32d6 Compare June 18, 2025 16:05
@gjmooney gjmooney marked this pull request as ready for review June 18, 2025 16:30
@gjmooney gjmooney mentioned this pull request Jun 19, 2025
4 tasks
@gjmooney gjmooney force-pushed the stac_browser_rebase branch 2 times, most recently from 769def8 to 42461fe Compare June 20, 2025 07:32
Copy link
Member

@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I only tested it briefly for now, will dive deeper into the code later.

isLoading: boolean;
}

const API_URL = 'https://geodes-portal.cnes.fr/api/stac/search';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe for a future PR, we should think of making this user-provided. Maybe an input element in the UI to provide your endpoint for the STAC API. Or a setting.

We should also provide a way to add some API token if needed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking we could have a drop down in the UI to select which endpoint to use, or an option in the settings would be good too.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Being able to set a specific endpoint is very important in my view. I don't think it must be in this PR, but perhaps we could have a dropdown with many options from stacindex.org pre-populated for users who might not already have an endpoint in mind, but allow them to fallback to a custom endpoint.

Copy link
Member

@mfisher87 mfisher87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running this locally, I'm getting CORS failures and so results always shows as 0. My proxy URL is set by default to corsproxy.io; what might I be missing?

Perhaps we could add an error indicator to the UI when the requests are failing.

I'm not sure how I feel about the STAC browser being in the sidebar. Layers are always added by dialogs and I think we should go for consistency. Do you think it would be reasonable to move it into the layer browser dialog in this PR, or should that be separate? Or should we consider a completely separate dialog?

isLoading: boolean;
}

const API_URL = 'https://geodes-portal.cnes.fr/api/stac/search';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Being able to set a specific endpoint is very important in my view. I don't think it must be in this PR, but perhaps we could have a dropdown with many options from stacindex.org pre-populated for users who might not already have an endpoint in mind, but allow them to fallback to a custom endpoint.

@martinRenou
Copy link
Member

we could have a dropdown with many options

👍🏽 we had the exact same discussion with Greg yesterday. Greg is looking into adding such dropdown.

I'm getting CORS failures and so results always shows as 0. My proxy URL is set by default to corsproxy.io

I have the same. It works well in plain jupyterlab, but fails for the jupyterlite deployment.

@gjmooney
Copy link
Collaborator Author

I'm getting CORS failures and so results always shows as 0. My proxy URL is set by default to corsproxy.io

I have the same. It works well in plain jupyterlab, but fails for the jupyterlite deployment.

(This all only applies to Lab) Just for the record, because of how the fetchWithProxies function works (it loops over proxy strategies) it still prints the error messages from attempting to use corsproxy.io even though it's the internal proxy that's meant to work. I don't really like this behavior but I didn't want to mess up anything that relies on the fallbacks so I left it as is for now.

So if you're getting 0 results something else is happening. Did you select a start time? I have it defaulted to the start of yesterday, which might be too recent.

@martinRenou
Copy link
Member

I don't really like this behavior

Totally agreed. Instead of looping of the URLs and trying them all, I feel we should:

  • do direct fetch if on localhost
  • do fetch through the jupytergis-core proxy if not on localhost and not on lite
  • try the external CORS proxy if not on localhost and on lite.

@mfisher87
Copy link
Member

So if you're getting 0 results something else is happening. Did you select a start time? I have it defaulted to the start of yesterday, which might be too recent.

Hmm... yes, I tried to mimic the exact settings from your video recording! I'll try again today :)

@gjmooney
Copy link
Collaborator Author

So if you're getting 0 results something else is happening. Did you select a start time? I have it defaulted to the start of yesterday, which might be too recent.

Hmm... yes, I tried to mimic the exact settings from your video recording! I'll try again today :)

GEODES is down for maintenance until the 26th so you won't get any results today either 🙃
https://geodes.cnes.fr/infos-ops/

@martinRenou
Copy link
Member

One working API (not down today) one can try https://openveda.cloud/api/stac/search

@gjmooney gjmooney force-pushed the stac_browser_rebase branch 2 times, most recently from 72ea9be to 71966c3 Compare June 26, 2025 07:40
@gjmooney gjmooney changed the title Stac browser GEODES STAC API Search Jun 27, 2025
@mfisher87
Copy link
Member

Since new commits are still coming through, could we convert to draft until it's stable for review?

Copy link
Member

@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments/questions

@gjmooney gjmooney force-pushed the stac_browser_rebase branch 2 times, most recently from 7b851d5 to 49a1b8b Compare June 30, 2025 15:01
@gjmooney gjmooney force-pushed the stac_browser_rebase branch from 49a1b8b to 26ccb54 Compare July 2, 2025 09:55
Copy link
Member

@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!!! 💯 🥇

@martinRenou martinRenou merged commit 89fd8fb into geojupyter:main Jul 2, 2025
14 checks passed
@gjmooney gjmooney deleted the stac_browser_rebase branch July 2, 2025 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants