Skip to content

Commit

Permalink
move provider string to constants and add a CHANGELOG entry
Browse files Browse the repository at this point in the history
  • Loading branch information
juliacollins committed Feb 25, 2025
1 parent 6980fea commit 245c21e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## Unreleased

* Adds support for Earthdata login and retrieval of collection-level metadata
from CMR. (Issue-15)

## v1.1.0

* Extend `ini` file to include values for attributes missing from a minimal,
Expand Down
5 changes: 5 additions & 0 deletions src/nsidc/metgen/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
# Logging
ROOT_LOGGER = "metgenc"

# Currently we support one CMR production cloud provider (NSIDC_CPRD) and one
# UAT cloud provider (NSIDC_CPRD).
CMR_PROD_PROVIDER = "NSIDC_CPRD"
CMR_UAT_PROVIDER = "NSIDC_CUAT"

# JSON schema locations and versions
CNM_JSON_SCHEMA = ("nsidc.metgen.json-schema", "cumulus_sns_schema.json")
CNM_JSON_SCHEMA_VERSION = "1.6.1"
Expand Down
6 changes: 5 additions & 1 deletion src/nsidc/metgen/metgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,11 @@ def edl_environment(environment):


def edl_provider(environment):
return "NSIDC_CPRD" if environment.lower() == "prod" else "NSIDC_CUAT"
return (
constants.CMR_PROD_PROVIDER
if environment.lower() == "prod"
else constants.CMR_UAT_PROVIDER
)


@cache
Expand Down

0 comments on commit 245c21e

Please sign in to comment.