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

Add harmony-py as a dependency #627

Draft
wants to merge 13 commits into
base: harmony
Choose a base branch
from
Draft

Add harmony-py as a dependency #627

wants to merge 13 commits into from

Conversation

trey-stafford
Copy link
Contributor

WIP to add harmony-py and remove references to UAT. IS2 collections are now enabled for harmony in prod - we just haven't started advertising this widely yet.

Copy link

github-actions bot commented Oct 31, 2024

Binder 👈 Launch a binder notebook on this branch for commit d74e5c8

I will automatically update this comment whenever this PR is modified

Binder 👈 Launch a binder notebook on this branch for commit b49389a

Binder 👈 Launch a binder notebook on this branch for commit 8349a61

Binder 👈 Launch a binder notebook on this branch for commit 77ad92c

Binder 👈 Launch a binder notebook on this branch for commit 6d9a660

Binder 👈 Launch a binder notebook on this branch for commit 192cee2

Binder 👈 Launch a binder notebook on this branch for commit e7ff043

Binder 👈 Launch a binder notebook on this branch for commit 6ce0013

Binder 👈 Launch a binder notebook on this branch for commit e7e966e

Binder 👈 Launch a binder notebook on this branch for commit 4d6430b

Binder 👈 Launch a binder notebook on this branch for commit b5024dd

Binder 👈 Launch a binder notebook on this branch for commit d80a4ce

Binder 👈 Launch a binder notebook on this branch for commit 98709d7

Binder 👈 Launch a binder notebook on this branch for commit a83fc62

Binder 👈 Launch a binder notebook on this branch for commit bc4afc0

Binder 👈 Launch a binder notebook on this branch for commit 5ad82cf

Binder 👈 Launch a binder notebook on this branch for commit 2cacbd7

Binder 👈 Launch a binder notebook on this branch for commit 0da719f

Binder 👈 Launch a binder notebook on this branch for commit efbc411

Binder 👈 Launch a binder notebook on this branch for commit 6e6fa92

Binder 👈 Launch a binder notebook on this branch for commit fb2a9a7

Binder 👈 Launch a binder notebook on this branch for commit b7b76aa

@trey-stafford trey-stafford changed the title Add harmony-py as a dependency Add harmony-py as a dependency and remove UAT-specific code Oct 31, 2024
@trey-stafford trey-stafford changed the title Add harmony-py as a dependency and remove UAT-specific code Add harmony-py as a dependency Oct 31, 2024
@trey-stafford trey-stafford changed the base branch from harmony to remove-uat October 31, 2024 22:34
Base automatically changed from remove-uat to harmony October 31, 2024 23:30
Comment on lines 8 to 10
# TODO: This will work if the user has a .netrc file available but the other
# auth options might fail. We might need to add harmony client auth to the
# icepyx auth package.
Copy link
Member

Choose a reason for hiding this comment

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

icepyx.auth is a mixin for earthaccess, so it is easily made available wherever credentials are needed. I poked around harmony-py a bit and it looks like they don't allow you to just pass in a valid session, but I think earthaccess lets you just grab the username and password, so if we have the existing auth object we should be able to authenticate with harmony.Client that way.

@trey-stafford trey-stafford force-pushed the use-harmony-py branch 3 times, most recently from 4d6430b to b5024dd Compare November 12, 2024 21:31
Subset orders can now be submitted and the job completes. Some next steps:

* Support downloads from harmony
* Support non-subset downloads. This might be a little more complicated, as it
does not appear that the harmony API can support non-subset orders (it always
uses spatial/temporal constraints to do subsetting,  not just filtering). So we
may need to use `earthaccess` to download our granule list instead.
* Remove code supporting variable subsetting. This is not supported by Harmony,
but could be in the future.
The handling of various parameters is VERY confusing. What is necessary for CMR
vs subsetting/ordering is not clear and conifg is mutated by various parts of
the code, making it difficult to track down where values come from/get set/overridden
Makes it more clear that non-subset orders are not working right now.
There can be more than one job submitted by a user. Make it easy to track all of
the submitted jobs by initializing to a empty list and then appending to it as necessary
Comment on lines +42 to +45
TODO/Question: it looks like this code will always use the provided
parameters to do subsetting. Are there cases where we just want the data
downloaded as whole granules? If so, we may need to use another API to
do so?
Copy link
Member

Choose a reason for hiding this comment

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

Interesting. The current icepyx default is to subset automatically for spatial and temporal (and then users could add any other available subsetting/reformatting options - it's probably best explained in the example notebooks for access and subsetting). In ipx.query, the order/download functions accept subset=False (would want to verify I have the kwarg right), so that would probably be the best way to trigger a non-subsetted download. I'm looking at transitioning that functionality over to earthaccess (with the ultimate goal of retiring ipx.Query entirely in favor of earthaccess), so we can work this case in there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback! I'm planning on using earthaccess to fill the gaps that harmony can't handle (non-subset orders).

LOTS more changes incoming :) Note that you don't need to keep up with this PR. I'm really just "going at it" and learning/breaking a lot as I go. My primary goal right now is assessing how much work it is going to be for us to implement harmony support, and we may need to revisit (or completely re-write) large chunks later.

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

Successfully merging this pull request may close these issues.

2 participants