Skip to content

Commit

Permalink
⬆️ Bump tornado from 6.3.2 to 6.3.3 (#121)
Browse files Browse the repository at this point in the history
* ⬆️ Bump tornado from 6.3.2 to 6.3.3

Bumps [tornado](https://github.com/tornadoweb/tornado) from 6.3.2 to 6.3.3.
- [Changelog](https://github.com/tornadoweb/tornado/blob/master/docs/releases.rst)
- [Commits](tornadoweb/tornado@v6.3.2...v6.3.3)

---
updated-dependencies:
- dependency-name: tornado
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* 🩹 Refresh poetry.lock file

Update some markers by running `poetry.lock --no-update` locally with poetry 1.5.1.

* 💚 Reorder some keys in stac_item.properties dict in doctest

Swap order of cubedash:region_code and datetime keys in the stac_item.properties dict of the PySTACAPIItemListerIterDataPipe doctest.

* 🛂 Replace Radiant MLHub with NASA CMR STAC API endpoint

Change the STAC API endpoint of a unit test from the discontinued Radiant MLHub to NASA CMR. Instead of passing in a fake API_KEY to pystac_client.Client.open's parameters, the test now passes in a fake authentication header like "Authorization: Bearer <EDL_TOKEN>".

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
  • Loading branch information
dependabot[bot] and weiji14 committed Sep 18, 2023
1 parent c50c95d commit a0e4db7
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 22 deletions.
24 changes: 12 additions & 12 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions zen3geo/datapipes/pystac_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ class PySTACAPIItemListerIterDataPipe(IterDataPipe):
'sentinel:processing_baseline': '05.09',
'proj:shape': [10980, 10980],
'proj:transform': [10.0, 0.0, 499980.0, 0.0, -10.0, 7900000.0, 0.0, 0.0, 1.0],
'datetime': '2023-01-03T06:24:53Z',
'cubedash:region_code': '40KED'}
'cubedash:region_code': '40KED',
'datetime': '2023-01-03T06:24:53Z'}
"""

def __init__(self, source_datapipe):
Expand Down
17 changes: 9 additions & 8 deletions zen3geo/tests/test_datapipes_pystac_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,34 +58,35 @@ def test_pystac_client_item_search():
assert stac_item.assets["nidem"].extra_fields["eo:bands"] == [{"name": "nidem"}]


def test_pystac_client_item_search_open_parameters():
def test_pystac_client_item_search_open_headers():
"""
Ensure that PySTACAPISearcher works to query a STAC API /search/ endpoint
with parameters passed to pystac_client.Client.open.
with headers passed to pystac_client.Client.open.
"""
query: dict = dict(
bbox=[150.9, -34.36, 151.3, -33.46],
datetime=["2020-01-01T00:00:00Z", "2022-12-31T00:00:00Z"],
collections=["HLSS30.v2.0"],
)
dp = IterableWrapper(iterable=[query])

# Using class constructors
dp_pystac_client = PySTACAPISearcher(
source_datapipe=dp,
catalog_url="https://api.radiant.earth/mlhub/v1/",
parameters={"key": "ANON_MLHUB_API_KEY"},
catalog_url="https://cmr.earthdata.nasa.gov/cloudstac/LPCLOUD",
headers={"Authorization": "Bearer <EDL_TOKEN>"},
)
# Using functional form (recommended)
dp_pystac_client = dp.search_for_pystac_item(
catalog_url="https://api.radiant.earth/mlhub/v1/",
parameters={"key": "ANON_MLHUB_API_KEY"},
catalog_url="https://cmr.earthdata.nasa.gov/cloudstac/LPCLOUD",
headers={"Authorization": "Bearer <EDL_TOKEN>"},
)

assert len(dp_pystac_client) == 1
it = iter(dp_pystac_client)
stac_item_search = next(it)
assert stac_item_search.client.title == "Radiant MLHub API"
assert stac_item_search.client.description == "stac-fastapi"
assert stac_item_search.client.title == "LPCLOUD"
assert stac_item_search.client.description == "Root catalog for LPCLOUD"


def test_pystac_client_item_lister():
Expand Down

0 comments on commit a0e4db7

Please sign in to comment.