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

Enable fetching external data from the Microsoft Planetary Computer #197

Merged
merged 3 commits into from
Sep 13, 2021

Conversation

lossyrob
Copy link
Member

@lossyrob lossyrob commented Sep 12, 2021

Before you submit a pull request, please fill in the following:

Description:
Allow external data from the Microsoft Planetary Computer.

The PC hosts data that allows for anonymous download, but URLs must be signed first by requesting a token from https://planetarycomputer.microsoft.com/api/sas/v1/sign?href={URL}. This PR allows external test data to be marked with "planetary_computer": True, and modifies the logic to sign the URL of that external data if that flag is present.

In addition, mypy is unpinned in this repository so upgraded to a post-0.9 release, which caused some fixes to be required. Mypy no longer holds stubs for common libraries and so the linting script is changed to account for this. Also mypy errors on a type issue it hadn't before for a local variable in the projection logic, and an Any is put in place to avoid that issue.

PR checklist:

  • Code is formatted (run scripts/format).
  • Code lints properly (run scripts/lint).
  • Tests pass (run scripts/test).
  • Documentation has been updated to reflect changes, if applicable.
  • Changes are added to the CHANGELOG.

@lossyrob lossyrob changed the title Feature/rde/pc data Enable fetching external data from the Microsoft Planetary Computer Sep 12, 2021
This commit allows external data to be fetched from Azure through the
Microsoft Planetary Compture. Data access requires an anonymous SAS
token be attached to the URL, which this code fetches and uses for any
external data marked with "planetary_computer": True.
@gadomski gadomski merged commit d24e2ec into main Sep 13, 2021
@gadomski gadomski deleted the feature/rde/pc-data branch September 13, 2021 16:51
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