diff --git a/CHANGELOG.md b/CHANGELOG.md index 285a639e..cec661e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Updated to **pystac** v1.10.0 [#661](https://github.com/stac-utils/pystac-client/pull/661) - Use [uv](https://github.com/astral-sh/uv) for CI [#663](https://github.com/stac-utils/pystac-client/pull/663) +- use `APILayoutStrategy` as fallback strategy [#666](https://github.com/stac-utils/pystac-client/pull/666) ## [v0.7.6] diff --git a/pystac_client/client.py b/pystac_client/client.py index b11edd00..37ce300f 100644 --- a/pystac_client/client.py +++ b/pystac_client/client.py @@ -17,7 +17,7 @@ import pystac.utils import pystac.validation from pystac import CatalogType, Collection -from pystac.layout import HrefLayoutStrategy +from pystac.layout import APILayoutStrategy, HrefLayoutStrategy from requests import Request from pystac_client._utils import Modifiable, call_modifier @@ -62,6 +62,7 @@ class Client(pystac.Catalog, QueryablesMixin): """ _stac_io: Optional[StacApiIO] + _fallback_strategy: HrefLayoutStrategy = APILayoutStrategy() def __init__( self, diff --git a/pystac_client/collection_client.py b/pystac_client/collection_client.py index 1e8f252e..aa5645ac 100644 --- a/pystac_client/collection_client.py +++ b/pystac_client/collection_client.py @@ -14,7 +14,7 @@ ) import pystac -import pystac.layout +from pystac.layout import APILayoutStrategy, HrefLayoutStrategy from pystac_client._utils import Modifiable, call_modifier from pystac_client.conformance import ConformanceClasses @@ -33,6 +33,7 @@ class CollectionClient(pystac.Collection, QueryablesMixin): modifier: Callable[[Modifiable], None] _stac_io: StacApiIO + _fallback_strategy: HrefLayoutStrategy = APILayoutStrategy() def __init__( self, @@ -49,7 +50,7 @@ def __init__( providers: Optional[List[pystac.Provider]] = None, summaries: Optional[pystac.Summaries] = None, assets: Optional[Dict[str, pystac.Asset]] = None, - strategy: Optional[pystac.layout.HrefLayoutStrategy] = None, + strategy: Optional[HrefLayoutStrategy] = None, *, modifier: Optional[Callable[[Modifiable], None]] = None, **kwargs: Dict[str, Any], diff --git a/tests/cassettes/test_client/test_fallback_strategy.yaml b/tests/cassettes/test_client/test_fallback_strategy.yaml new file mode 100644 index 00000000..90162c49 --- /dev/null +++ b/tests/cassettes/test_client/test_fallback_strategy.yaml @@ -0,0 +1,376 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: https://planetarycomputer.microsoft.com/api/stac/v1/ + response: + body: + string: !!binary | + H4sIAM97GGYC/81cbXPbNhL+KxjfzI09V0iiZKeNb+4DrTfrzpJVSYmvd9O5gUCIQgISLEBJUTv9 + 77cAKVlxnTQhAbef4kjC7oPlYt/BX87yfcbOrs+6JCdCxmffnPEI/ptwqqSWqxxnFD7LeS7Mr8aH + j9FUkJTlRO1RVybZJmcKzRdhF4XTEfw+YpoqnuVcprBqzoiia7IUDOmMwIc5SzKpiEAJkIiAMyoW + LHkaoz5R+RppyllKGTLfapZrtJY6ZxFa7lG+ZuhzQIC/zgn935YpXQAIGq1GCz6mMl1JleiFPLv+ + 79k6z7PrZnO32zVkxtKY6wZQauqM0Sb9SbSbsKxpljSXRHOKzWdA5MuXmf/hdxogfPWqnH3If2eV + jCnJOF4xkm8U0zg4ISEVq746ZvILQH+GgCS60/rK5Z3H5Ssuiqdo1msgAD9smCdqFjakiptb+0Cx + oo0AlgjBqNE0/eVLjuL53d9y0FWsrQJXWPKXFWci0tVWfo0UTlf+tGFqX2Whlir/0nVPnt/Zj9+c + CZ6+13CwfjlTTMCp00ysjO0oDAzJMsGpOf1p86Beiq3gmwO/7HCSaXmQG0cr1ICPDJ6mwQM4mme/ + fnNgo6TMX4CNMUS+2Jzq8CPH0loRMIOfZXwwzsb+Nh8G8w46WYmoIFozjXiSCZaw9GhEuUaaqW2h + Y3WwP6J8xH48Mc/ABvvyt2ego8dTVh3NkQZ4lrU0nmzYX/wpcU3v56fA6JqL6Isec4/sgQgK03QD + HnQKhz2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E53gpbtoD83gmWCu0nv + 7Qidz6f3C/S2P+wvwsXofnLhdXuQDbvbno1QX/BkiNon4yn4GTH3QEJhusm5y/rOqegVEaZL7xj6 + Mw7ND3yhcxC7zt3h/4Q/9gh/5xJ+YVdfTHV2pC72xxf/3mxgjekvDKTMM2VeZ+AwPNB4WdLXdWVs + Z/zM2+aK+vFU7ly2dH+jHyuVeTqeT23+S/gw+NfdbhbS3lUP80TqbM3Ux1t6Ye8VO3xMwZ/ON8dB + zd2ZJoy9BOR4BMI0V3aG7tNBM/MyXA75jHkV+fMIt2nUkITbl1kDefuy2L+Xbxn/R8eW/g/ozYhX + OB2hkig6fSF6ra2UvBtWWs+AlyfYzUvEm+s8EZ8DJunGDJ44uOwKpMBW/vjr/wF4DQfnVF4AAA== + headers: + Accept-Ranges: + - bytes + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '3247' + Content-Type: + - application/json + Date: + - Fri, 12 Apr 2024 00:09:51 GMT + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + content-encoding: + - gzip + vary: + - Accept-Encoding + x-azure-ref: + - 20240412T000951Z-r1959c758bdkvvs5zwn5q5g3yn00000003g000000000gg8t + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: https://planetarycomputer.microsoft.com/api/stac/v1/collections/landsat-c2-l2 + response: + body: + string: !!binary | + H4sIAM97GGYC/9Vc4XOjthL/VzT+8pKpweAkjpM3/eBL0mtmkksa++71vTTjkUG21QPkk4SdtHP/ + +1sJMBiDjXGSuXbang+xu79drX6SVsDfDeo2zhseDlyBpeG0Da/daDbky4zA5QvmecSRlAVwzaPB + V9E4f/y7wYkHjVQSX6T34tnMow5WN7cmhP30p9BSU07G0DqVcibOW60ZWCIS8xeH+bNQEm761OFM + sLE04V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gk/xf2UfD4i + /mZE2lskXBCx7E6hqtrDHd4NSV8QUI+159/5OxjcbnkIf+PrguhAfdtm44P0JW8UoYO7m+voMfeS + p9wB2/VDv/w59CQinEyiMKgwkZAzGFDf/w/Om2oAOUoAAA== + headers: + Accept-Ranges: + - bytes + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '3454' + Content-Type: + - application/json + Date: + - Fri, 12 Apr 2024 00:09:51 GMT + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + content-encoding: + - gzip + vary: + - Accept-Encoding + x-azure-ref: + - 20240412T000951Z-r1959c758bdkvvs5zwn5q5g3yn00000003g000000000gg9n + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: https://planetarycomputer.microsoft.com/api/stac/v1/collections/landsat-c2-l2/items?collections=landsat-c2-l2 + response: + body: + string: !!binary | + H4sIAM97GGYC/+3cj2/bRpYH8H9FEHDFFrXpmTe/fQgOaXc3l0P6Y5Pc3uEKw1Ak2uFVlnySnKS7 + 6P9+b0jKkmWJomIzEuNv0bSxNBzOe/M0/GHx88/u7PfrtHva/Wvam91M0h/Gw2Han2XjUfeoe1G8 + Nu2e/vrPbjbgVq9+EOH8Fb15fS68FM6ekyAtNL8o6Pyt5G3evRt/4vbSmsRo/i+p4KwifXRMOpGe + yBittSJnyB1J6xKvuIlRIqhAynAzSoQmR9oYY/l/zpwdrQySdzPMRr8V45qkQ36nvzzusnXv+nqY + 9XvxxZP/nebvvJ+kF/zO+9nsenp6cnI97I3SWW/ye398dX0zSyfJVdafjKfji1nCL530rrOT6azX + P/kgTxZ7mJ7wZoNpb3bcp+Mhdf84mo/iujdJR7N9jmAyHje2/6XdTNPhxfrdXKbj7xoM9SSbpVfT + k211uBhpnzc47k3vD2cwzpLx5PJEis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S228IEXcTiUukFFeBS8VWevydi5RzklB1igprVAFK2CC + cWS00tZKacqGzjmteFcyBOXyHWslghUmaOO0Jip3XGOEZ8XXc2+JAV6s7jx/f8TVNL5OJ7MszR9A + vpwO4nkQbzNJ82X8tBtn+ljoYynfinAq9akwibXGefU/8Tyqn50Oxhm3W/M4Ohdbyuec6VIvIrwl + OjXylGziNOfNxV64cmdxXpfGF4qx/e9pej295DFx4nz5yvR9L87fr87zdZdzSp6t+3VyfP597SPv + R3ygms4mN/Hss6idYZbfE55MY/Wk49P5r4nj1wFOQxK/kJrveDbpjabFOH9VIhFH8Y8xxntT/nCc + v8xTq4WML3J/sSpP+Xh0PuKrzEl+nCljPP04mZ5P+OBx2uWPVHfx+rSfjtLz0q0IxScuJlAK8erF + T0J073bBp7LvYx9errxR1nkMOR/F9GZ03vtHdnUT22uXWFJOBkOLrRYHurhvyh/Jv9005QNEcfA9 + 1TaxznLlBb+08SJt5/E1njWVPw266H0+Heejm6t3MbtdQd21DXjtTC/H8fPazVmEblQHztNPM75O + jdpAnLj5wpeDBIu3kks+QN28S7LxSXGlwAteIhNxMu2/T696828jbt86HcctxWdsGXP2udvGUiuS + UD3uMml3XYbba9bbrotO5M7DuHsd9LnBTPMH8mM363o4K6eVK2Za1FzeJj/BWce2mEq2xQeVr30y + KEv5csirpdZGWycCr9H2SFqfSMtFr2LbuDxzM163QuBujSL+rDmjwbaAbalmW8yTY1vM18i2mNax + Lab2vNSfwCfNtjSRULAtYFv2VXdgW8C27K34wLaAbdlrAYJtAdtymJUJtgVsS2uKFWwL2JbWFCvY + FrAtB1iaYFsaTi7YlsZTDLal8TSDbQHbArYFbAvYFrAtYFvAtoBtAdsCtgVsC9gWsC2tYlsaujgG + 2wK2BWwL2BawLWBbwLaAbQHbAralJd9MANsCtgVsC9gWsC1gW8C21HsCE2xLk2yL+erZFpsoTd4G + K4TxPn+435LXmpwLVsolO4X4fa0EOU6Jz7EAZRT54KwKQio/t1ikVCGQ4z9aF+2c9Iqk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rTkmwkQWyC2QGyB2AKxBWILxJZ6T2BC + bGlQbDmcbDcltjiZaO2sCko4bZ038el+b5wgp4KlYILPgRWZCC+EUs6TkZb0kUicEVYEkqQNb+dz + 2MVxjNJrQ1p7q723uSjgrRPS8W54R0bkEItT3KGzxknpguT98H6lctqTC0KRl8aZcsdbx9eI18LD + EVZZ8QCvRZ+qkAQee6CHeC0qei2hWa+FbEJUBbZw1GoFbCFntNyFazGhkmsx4dG5FmcSLSRZaXbX + WiwlpCxvSrJKa4mZeDDWQsBanhjWcgYg5WkDKUsjGaWfZltHwsf09+O4Wr74y9tGB7Z0gjRdOUOa + jX9LR8/icE/vvHG6FXs5++P/AUhkiCoivAIA + headers: + Accept-Ranges: + - bytes + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '7038' + Content-Type: + - application/geo+json + Date: + - Fri, 12 Apr 2024 00:09:51 GMT + Strict-Transport-Security: + - max-age=15724800; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + content-encoding: + - gzip + vary: + - Accept-Encoding + x-azure-ref: + - 20240412T000951Z-r1959c758bdkvvs5zwn5q5g3yn00000003g000000000gg9w + status: + code: 200 + message: OK +version: 1 diff --git a/tests/test_client.py b/tests/test_client.py index 78ed4c79..0f5a1f76 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -712,3 +712,43 @@ def test_non_recursion_on_fallback() -> None: catalog = Client.from_file(path) with pytest.warns(FallbackToPystac): [i for i in catalog.get_items()] + + +@pytest.mark.vcr +def test_fallback_strategy() -> None: + """Make sure links get recreated correctly using APILayoutStrategy.""" + + client = Client.open( + "https://planetarycomputer.microsoft.com/api/stac/v1/", + ) + col = client.get_collection("landsat-c2-l2") + item = next(col.get_items()) + + item_href = item.self_href + col_href = col.self_href + root_href = client.self_href + + col.links = [] + item.links = [] + + client.add_child(col) + col.add_item(item) + + assert col.self_href == col_href + + assert (col_parent := col.get_single_link("parent")) + assert col_parent.href == root_href + + assert (col_root := col.get_single_link("root")) + assert col_root.href == root_href + + assert item.self_href == item_href + + assert (item_col := item.get_single_link("collection")) + assert item_col.href == col_href + + assert (item_parent := item.get_single_link("parent")) + assert item_parent.href == col_href + + assert (item_root := item.get_single_link("root")) + assert item_root.href == root_href