icesat2py / icepyx

Python tools for obtaining and working with ICESat-2 data
https://icepyx.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
213 stars 107 forks source link

transition icepyx to using earthaccess library for authentication #410

Closed JessicaS11 closed 1 year ago

JessicaS11 commented 1 year ago

The long awaited earthaccess (formerly earthdata) python library provides an easy interface for (among other things) authenticating with the NASA EarthData system. This PR remove internal handling of authentication through adoption of earthaccess. The user should see no changes, but this move greatly simplifies things behind the scenes and provides enhanced authentication capabilities for cloud data access.

This work is being done in collaboration with the earthaccess development team, and adoption by icepyx is helping find bugs and drive improvements there (e.g. https://github.com/nsidc/earthaccess/pull/214).

review-notebook-app[bot] commented 1 year ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

github-actions[bot] commented 1 year ago

Binder :point_left: Launch a binder notebook on this branch for commit 91e421a5ace3ed951a1baef080496072cc0874d8

I will automatically update this comment whenever this PR is modified

Binder :point_left: Launch a binder notebook on this branch for commit 5b5482b1beeeae9739a908855bc22a5661bc7aaa

Binder :point_left: Launch a binder notebook on this branch for commit d9aacc6bf2a7174aeba24881e9a820d0702edda0

Binder :point_left: Launch a binder notebook on this branch for commit 76ca9eda29e9af112604e349c055140e680d9576

Binder :point_left: Launch a binder notebook on this branch for commit 9a6218762a4dccd19e815b38d08adbaf975151a8

Binder :point_left: Launch a binder notebook on this branch for commit b453b775c18443d351d2907a26779e0ffccdf9a4

Binder :point_left: Launch a binder notebook on this branch for commit 75865261d912f6f0764796a3e74f652245f1ad2b

Binder :point_left: Launch a binder notebook on this branch for commit 71a39a88fc571214c4572b925cdebd99f02e8e76

Binder :point_left: Launch a binder notebook on this branch for commit a6970a050d01951fc898d0144d0e00a365114207

Binder :point_left: Launch a binder notebook on this branch for commit 145106e1635a69afb5cf64af30d2261fe0239cc4

Binder :point_left: Launch a binder notebook on this branch for commit bf8f0202c7f9098c3c1541f14adfc482d34dfbda

Binder :point_left: Launch a binder notebook on this branch for commit 48721c6210df6eb2b173e61358d8b1cfaa1e3ab1

Binder :point_left: Launch a binder notebook on this branch for commit e7e6297671a86ab6d5a696bc2792eb77219ffda8

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 42.42% and project coverage change: +1.54 :tada:

Comparison is base (4f64d48) 57.68% compared to head (e7e6297) 59.22%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## development #410 +/- ## =============================================== + Coverage 57.68% 59.22% +1.54% =============================================== Files 31 30 -1 Lines 2302 2259 -43 Branches 444 487 +43 =============================================== + Hits 1328 1338 +10 + Misses 890 839 -51 + Partials 84 82 -2 ``` | [Impacted Files](https://codecov.io/gh/icesat2py/icepyx/pull/410?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=icesat2py) | Coverage Δ | | |---|---|---| | [icepyx/core/granules.py](https://codecov.io/gh/icesat2py/icepyx/pull/410?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=icesat2py#diff-aWNlcHl4L2NvcmUvZ3JhbnVsZXMucHk=) | `38.96% <ø> (-0.19%)` | :arrow_down: | | [icepyx/core/is2ref.py](https://codecov.io/gh/icesat2py/icepyx/pull/410?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=icesat2py#diff-aWNlcHl4L2NvcmUvaXMycmVmLnB5) | `23.52% <ø> (ø)` | | | [icepyx/core/variables.py](https://codecov.io/gh/icesat2py/icepyx/pull/410?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=icesat2py#diff-aWNlcHl4L2NvcmUvdmFyaWFibGVzLnB5) | `10.37% <ø> (+0.85%)` | :arrow_up: | | [icepyx/tests/conftest.py](https://codecov.io/gh/icesat2py/icepyx/pull/410?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=icesat2py#diff-aWNlcHl4L3Rlc3RzL2NvbmZ0ZXN0LnB5) | `93.75% <ø> (-6.25%)` | :arrow_down: | | [icepyx/tests/test\_behind\_NSIDC\_API\_login.py](https://codecov.io/gh/icesat2py/icepyx/pull/410?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=icesat2py#diff-aWNlcHl4L3Rlc3RzL3Rlc3RfYmVoaW5kX05TSURDX0FQSV9sb2dpbi5weQ==) | `0.00% <0.00%> (ø)` | | | [icepyx/tests/test\_granules.py](https://codecov.io/gh/icesat2py/icepyx/pull/410?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=icesat2py#diff-aWNlcHl4L3Rlc3RzL3Rlc3RfZ3JhbnVsZXMucHk=) | `100.00% <ø> (ø)` | | | [icepyx/core/query.py](https://codecov.io/gh/icesat2py/icepyx/pull/410?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=icesat2py#diff-aWNlcHl4L2NvcmUvcXVlcnkucHk=) | `54.13% <18.18%> (+3.91%)` | :arrow_up: | | [icepyx/tests/test\_Earthdata.py](https://codecov.io/gh/icesat2py/icepyx/pull/410?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=icesat2py#diff-aWNlcHl4L3Rlc3RzL3Rlc3RfRWFydGhkYXRhLnB5) | `83.78% <85.71%> (+3.48%)` | :arrow_up: | ... and [8 files with indirect coverage changes](https://codecov.io/gh/icesat2py/icepyx/pull/410/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=icesat2py) Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=icesat2py). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=icesat2py)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

JessicaS11 commented 1 year ago

Noting that all tests and the doc build pass currently, but I am about to pin the version of earthaccess to the upcoming release (which thus doesn't yet exist on conda-forge), so they will begin failing because the environment won't be create-able.

JessicaS11 commented 1 year ago

One thing I'm probably missing is how Icepyx will work with ATL data in S3 buckets, especially subsetting.

You're missing it because it doesn't exist yet! This is one of the things I will tackle next. I'd like to think some more about how icepyx can further leverage earthaccess and/or Harmony in combination with the Variables module to (as you suggest) think about moving away from EGI. Some of these things will hopefully be a lot easier now that the ICESat-2 data is publicly available on s3, especially once all the cloud metadata is included in CMR (I noticed last week that for ATL15 the s3 urls were not yet available from the initial CMR query). I'm excited for the possibilities!