diff --git a/HARMONY_MIGRATION_NOTES.md b/HARMONY_MIGRATION_NOTES.md index 50e964a2..3519cd93 100644 --- a/HARMONY_MIGRATION_NOTES.md +++ b/HARMONY_MIGRATION_NOTES.md @@ -15,10 +15,6 @@ Work in progress is on the `harmony` branch. This depends on the `low-hanging-refactors` branch being merged. A PR is open. -> [!IMPORTANT] -> Several commits establish communication with UAT instead of production. They will need -> to be reverted once Harmony is available in prod. - In addition to this work, refactoring, type checking, and type annotations have been added to the codebase to support the migration to Harmony. @@ -28,8 +24,7 @@ added to the codebase to support the migration to Harmony. * Check out this amazing notebook provided by Amy Steiker and Patrick Quinn: * Review the interactive API documentation: - (remember, remove UAT from URL if - Harmony is live with ICESat-2 products in early October 2024) + ### Getting started replacing ECS with Harmony @@ -94,9 +89,8 @@ The type annotations will help with this process! both CMR and Harmony queries without an intervening layer. E.g. 2. Broken assumption: "We can query with only short_name and version number". Harmony requires a unique identifier (concept ID or DOI). E.g.: - - (NOTE: UAT query using a collection from a test provider; we should be using - `NSIDC_CUAT` provider in real UAT queries and `NSIDC_CPRD` for real prod queries). + + . Since we want the user to be able to provide short_name and version, implementing the concept ID as a `@cached_property` on `Query` which asks CMR for the concept ID makes sense to me. @@ -109,30 +103,6 @@ The type annotations will help with this process! to better encapsulate validation code that's currently spread around. -## Testing with Harmony - -Harmony is available for testing in the UAT environment. - -> [!NOTE] -> ICESat-2 products will be available in production in early October 2024. If you're -> reading this after that time, please talk to Amy Steiker about Harmony's current -> status before investing time setting up to test with UAT. If prod is available, test -> with prod. - -We will need to interact with everything (CMR, Earthdata Login, Harmony itself) in UAT -for icepyx to work correctly. - -* URLs *temporarily* modified for UAT. -* You need a separate Earthdata Login registration for UAT - (). -* The UAT NSIDC provider name is `NSIDC_UAT` - (). -* To test in UAT (i.e. access data in `NSIDC_CUAT` provider), your Earthdata Login - account must be on an access control list. Ask NSIDC operations for help. - * The code *temporarily* uses `$EDL_TOKEN` envvar to authenticate with CMR. Populate - this envvar with your Earthdata Login token. - - ## Integrating with other ongoing Icepyx work Harmony is a major breaking change, so we'll be releasing it in Icepyx v2. diff --git a/icepyx/core/auth.py b/icepyx/core/auth.py index d94802c6..71b4393e 100644 --- a/icepyx/core/auth.py +++ b/icepyx/core/auth.py @@ -68,7 +68,7 @@ def auth(self): """ # Only login the first time .auth is accessed if self._auth is None: - auth = earthaccess.login(system=earthaccess.system.UAT) + auth = earthaccess.login() # check for a valid auth response if auth.authenticated is False: raise AuthenticationError( diff --git a/icepyx/core/cmr.py b/icepyx/core/cmr.py index 2e33c6e1..d50b871a 100644 --- a/icepyx/core/cmr.py +++ b/icepyx/core/cmr.py @@ -3,18 +3,13 @@ import requests from icepyx.core.urls import COLLECTION_SEARCH_BASE_URL -from icepyx.uat import EDL_ACCESS_TOKEN -CMR_PROVIDER: Final = "NSIDC_CUAT" -# CMR_PROVIDER: Final = "NSIDC_CPRD" +CMR_PROVIDER: Final = "NSIDC_CPRD" def get_concept_id(*, product: str, version: str) -> str: response = requests.get( COLLECTION_SEARCH_BASE_URL, - headers={ - "Authorization": f"Bearer {EDL_ACCESS_TOKEN}", - }, params={ "short_name": product, "version": version, diff --git a/icepyx/core/urls.py b/icepyx/core/urls.py index 88b821b4..643525cc 100644 --- a/icepyx/core/urls.py +++ b/icepyx/core/urls.py @@ -1,12 +1,12 @@ from typing import Final -# TODO: Not UAT! -CMR_BASE_URL: Final = "https://cmr.uat.earthdata.nasa.gov" +CMR_BASE_URL: Final = "https://cmr.earthdata.nasa.gov" GRANULE_SEARCH_BASE_URL: Final = f"{CMR_BASE_URL}/search/granules" COLLECTION_SEARCH_BASE_URL: Final = f"{CMR_BASE_URL}/search/collections.json" -# TODO: Not UAT! -HARMONY_BASE_URL: Final = "https://harmony.uat.earthdata.nasa.gov" +# TODO: the harmony base url and capabilities URL will be handled by +# `harmony-py`: remove these constants. +HARMONY_BASE_URL: Final = "https://harmony.earthdata.nasa.gov" CAPABILITIES_BASE_URL: Final = f"{HARMONY_BASE_URL}/capabilities" ORDER_BASE_URL: Final = f"{HARMONY_BASE_URL}/...?" DOWNLOAD_BASE_URL: Final = f"{HARMONY_BASE_URL}/...?" diff --git a/icepyx/uat.py b/icepyx/uat.py deleted file mode 100644 index 738cb0ad..00000000 --- a/icepyx/uat.py +++ /dev/null @@ -1,6 +0,0 @@ -import os -from typing import Final - -# HACK: For testing with UAT, we need a token to authorize ourselves to see the -# private collections we want to test with. -EDL_ACCESS_TOKEN: Final = os.environ["EDL_TOKEN"]