Skip to content

Commit d0a189c

Browse files
committed
refactor: remove extension in ids of wekeo products + remove unused variables
1 parent 29c8782 commit d0a189c

File tree

4 files changed

+4
-10
lines changed

4 files changed

+4
-10
lines changed

eodag/plugins/search/data_request_search.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ def __init__(self, provider: str, config: PluginConfig) -> None:
101101
self.config.pagination["next_page_url_key_path"] = string_to_jsonpath(
102102
self.config.pagination.get("next_page_url_key_path", None)
103103
)
104-
self.download_info = {}
105104
self.data_request_id = None
106105

107106
def discover_product_types(self) -> Optional[Dict[str, Any]]:

eodag/plugins/search/qssearch.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,6 @@ def __init__(self, provider: str, config: PluginConfig) -> None:
277277

278278
def clear(self) -> None:
279279
"""Clear search context"""
280-
self.download_info = {}
281280
super().clear()
282281
self.search_urls.clear()
283282
self.query_params.clear()

eodag/resources/providers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3822,7 +3822,7 @@
38223822
- '$.extraInformation.footprint'
38233823
cloudCover: '$.extraInformation.cloudCover'
38243824
downloadLink: '$.url'
3825-
title: '$.productInfo.product'
3825+
title: '{$.productInfo.product#remove_extension}'
38263826
orderLink: 'https://wekeo-broker.apps.mercator.dpi.wekeo.eu/databroker/dataorder?{{"uri": "{downloadLink}","jobId":"requestJobId"}}'
38273827
storageStatus: 'OFFLINE'
38283828
auth: !plugin

eodag/rest/utils.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -713,18 +713,14 @@ def download_stac_item_by_id_stream(
713713
product_type, {}
714714
) or search_plugin.config.products.get(GENERIC_PRODUCT_TYPE, {})
715715

716-
if "." in item_id:
717-
id_without_ext = item_id.split(".")[0]
718-
else:
719-
id_without_ext = item_id
720-
product_key = f"{product_type}_{provider}_{id_without_ext}"
716+
product_key = f"{product_type}_{provider}_{item_id}"
721717
if product_key in eodag_api.download_info:
722718
product_data = eodag_api.download_info[product_key]
723719
properties = {
724-
"id": id_without_ext,
720+
"id": item_id,
725721
"geometry": "-180 -90 180 90",
726722
"storageStatus": OFFLINE_STATUS,
727-
"title": id_without_ext,
723+
"title": item_id,
728724
}
729725
if "downloadLink" in product_data:
730726
properties["downloadLink"] = product_data["downloadLink"]

0 commit comments

Comments
 (0)