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

add obdaac s3-credential endpoint #516

Merged
merged 5 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions earthaccess/daac.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@
{
"short-name": "OBDAAC",
"name": "NASA's Ocean Biology Distributed Active Archive Center",
"homepage": "https://earthdata.nasa.gov/eosdis/daacs/obdaac",
"cloud-providers": [],
"homepage": "https://oceancolor.gsfc.nasa.gov/",
"cloud-providers": ["OB_CLOUD"],
"on-prem-providers": ["OB_DAAC"],
"s3-credentials": "",
"s3-credentials": "https://obdaac-tea.earthdatacloud.nasa.gov/s3credentials",
"eulas": [],
},
{
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/test_collection_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ def test_query_can_find_cloud_provider():
assert query.params["provider"] == "POCLOUD"
query = DataCollections().cloud_hosted(True).daac("PODAAC")
assert query.params["provider"] == "POCLOUD"
# OBDAAC does not have a cloud provider so it should default to the on prem provider
query = DataCollections().cloud_hosted(True).daac("OBDAAC")
assert query.params["provider"] == "OB_DAAC"
# SEDAC does not have a cloud provider so it should default to the on prem provider
query = DataCollections().cloud_hosted(True).daac("SEDAC")
assert query.params["provider"] == "SEDAC"


def test_querybuilder_can_handle_doi():
Expand Down
11 changes: 10 additions & 1 deletion tests/unit/test_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,15 @@ def test_store_can_create_s3_fsspec_session(self):

store = Store(self.auth)
self.assertTrue(isinstance(store.auth, Auth))
for daac in ["NSIDC", "PODAAC", "LPDAAC", "ORNLDAAC", "GES_DISC", "ASF"]:
for daac in [
"NSIDC",
"PODAAC",
"LPDAAC",
"ORNLDAAC",
"GES_DISC",
"ASF",
"OBDAAC",
]:
s3_fs = store.get_s3fs_session(daac=daac)
assert isinstance(s3_fs, s3fs.S3FileSystem)
assert s3_fs.storage_options == expected_storage_options
Expand All @@ -114,6 +122,7 @@ def test_store_can_create_s3_fsspec_session(self):
"ORNL_CLOUD",
"GES_DISC",
"ASF",
"OB_CLOUD",
]:
s3_fs = store.get_s3fs_session(provider=provider)
assert isinstance(s3_fs, s3fs.S3FileSystem)
Expand Down
Loading