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

Feature/issue 357 #358

Merged
merged 5 commits into from
Nov 22, 2023
Merged

Feature/issue 357 #358

merged 5 commits into from
Nov 22, 2023

Conversation

danielfromearth
Copy link
Collaborator

Addresses #357.

Description

This change adds a hits() method to the DataGranule class, which uses the authenticated session. This overrides the hits() method from the Query base class, which does not use an authenticated session.

The reason for this change is to enable earthaccess to correctly determine and report the number of granules for "restricted" datasets, which are collections that only permit access if a user's authenticated Earthdata login (EDL) belongs to an Access Control List (ACL).

Local test steps

Ran earthaccess.search() on a TEMPO data collection that is not public but for which my EDL belonged to an ACL, and confirmed that an appropriate non-zero number of granules was returned. And I was able to subsequently work with the data via earthaccess.open() and xarray functions.

Copy link

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

I will automatically update this comment whenever this PR is modified

@MattF-NSIDC MattF-NSIDC requested a review from betolink November 21, 2023 23:03
Copy link
Member

@betolink betolink left a comment

Choose a reason for hiding this comment

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

Really nice! Thanks for the PR @danielfromearth !

@betolink betolink merged commit a0a58aa into nsidc:main Nov 22, 2023
6 checks passed
@danielfromearth danielfromearth deleted the feature/issue-357 branch November 22, 2023 15:41
@mfisher87 mfisher87 linked an issue Nov 23, 2023 that may be closed by this pull request
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.

Zero granules are being reported for datasets with restricted access
2 participants