Skip to content

Commit

Permalink
feat: add sort configuration for new provider creodias_s3
Browse files Browse the repository at this point in the history
  • Loading branch information
anesson-cs committed Jan 25, 2024
1 parent 78f10aa commit a3022ac
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
11 changes: 10 additions & 1 deletion eodag/resources/providers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6876,9 +6876,18 @@
need_auth: true
timeout: 60
pagination:
next_page_url_tpl: '{url}?{search}&maxRecords={items_per_page}&page={page}&exactCount=1'
next_page_url_tpl: '{url}?{search}{sort_by}&maxRecords={items_per_page}&page={page}&exactCount=1'
total_items_nb_key_path: '$.properties.totalResults'
max_items_per_page: 1_000
sort:
sort_by_default:
- !!python/tuple [startTimeFromAscendingNode, ASC]
sort_url_tpl: '&sortParam={sort_param}&sortOrder={sort_order}'
sort_by_mapping:
startTimeFromAscendingNode: startDate
completionTimeFromAscendingNode: completionDate
publicationDate: published
max_sort_params: 1
discover_metadata:
auto_discovery: true
metadata_pattern: '^(?!collection)[a-zA-Z0-9]+$'
Expand Down
9 changes: 8 additions & 1 deletion tests/units/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,14 @@ def test_list_sortables(self):
"max_sort_params": None,
},
"wekeo": None,
"creodias_s3": None,
"creodias_s3": {
"sortables": [
"startTimeFromAscendingNode",
"completionTimeFromAscendingNode",
"publicationDate",
],
"max_sort_params": 1,
},
}
sortables = self.dag.list_sortables()
self.assertDictEqual(sortables, expected_result)
Expand Down

0 comments on commit a3022ac

Please sign in to comment.