eodag 3.0.0b3__py3-none-any.whl → 3.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- eodag/api/core.py +189 -125
- eodag/api/product/metadata_mapping.py +12 -3
- eodag/api/search_result.py +29 -3
- eodag/cli.py +35 -19
- eodag/config.py +412 -116
- eodag/plugins/apis/base.py +10 -4
- eodag/plugins/apis/ecmwf.py +14 -4
- eodag/plugins/apis/usgs.py +25 -2
- eodag/plugins/authentication/aws_auth.py +14 -5
- eodag/plugins/authentication/base.py +10 -1
- eodag/plugins/authentication/generic.py +14 -3
- eodag/plugins/authentication/header.py +12 -4
- eodag/plugins/authentication/keycloak.py +41 -22
- eodag/plugins/authentication/oauth.py +11 -1
- eodag/plugins/authentication/openid_connect.py +178 -163
- eodag/plugins/authentication/qsauth.py +12 -4
- eodag/plugins/authentication/sas_auth.py +19 -2
- eodag/plugins/authentication/token.py +57 -10
- eodag/plugins/authentication/token_exchange.py +19 -19
- eodag/plugins/crunch/base.py +4 -1
- eodag/plugins/crunch/filter_date.py +5 -2
- eodag/plugins/crunch/filter_latest_intersect.py +5 -4
- eodag/plugins/crunch/filter_latest_tpl_name.py +1 -1
- eodag/plugins/crunch/filter_overlap.py +5 -7
- eodag/plugins/crunch/filter_property.py +4 -3
- eodag/plugins/download/aws.py +39 -22
- eodag/plugins/download/base.py +11 -11
- eodag/plugins/download/creodias_s3.py +11 -2
- eodag/plugins/download/http.py +86 -52
- eodag/plugins/download/s3rest.py +20 -18
- eodag/plugins/manager.py +168 -23
- eodag/plugins/search/base.py +33 -14
- eodag/plugins/search/build_search_result.py +55 -51
- eodag/plugins/search/cop_marine.py +112 -29
- eodag/plugins/search/creodias_s3.py +20 -5
- eodag/plugins/search/csw.py +41 -1
- eodag/plugins/search/data_request_search.py +109 -9
- eodag/plugins/search/qssearch.py +532 -152
- eodag/plugins/search/static_stac_search.py +20 -21
- eodag/resources/ext_product_types.json +1 -1
- eodag/resources/product_types.yml +187 -56
- eodag/resources/providers.yml +1610 -1701
- eodag/resources/stac.yml +3 -163
- eodag/resources/user_conf_template.yml +112 -97
- eodag/rest/config.py +1 -2
- eodag/rest/constants.py +0 -1
- eodag/rest/core.py +61 -51
- eodag/rest/errors.py +181 -0
- eodag/rest/server.py +24 -325
- eodag/rest/stac.py +93 -544
- eodag/rest/types/eodag_search.py +13 -8
- eodag/rest/types/queryables.py +1 -2
- eodag/rest/types/stac_search.py +11 -2
- eodag/types/__init__.py +15 -3
- eodag/types/download_args.py +1 -1
- eodag/types/queryables.py +1 -2
- eodag/types/search_args.py +3 -3
- eodag/utils/__init__.py +77 -57
- eodag/utils/exceptions.py +23 -9
- eodag/utils/logging.py +37 -77
- eodag/utils/requests.py +1 -3
- eodag/utils/stac_reader.py +1 -1
- {eodag-3.0.0b3.dist-info → eodag-3.0.1.dist-info}/METADATA +11 -12
- eodag-3.0.1.dist-info/RECORD +109 -0
- {eodag-3.0.0b3.dist-info → eodag-3.0.1.dist-info}/WHEEL +1 -1
- {eodag-3.0.0b3.dist-info → eodag-3.0.1.dist-info}/entry_points.txt +1 -0
- eodag/resources/constraints/climate-dt.json +0 -13
- eodag/resources/constraints/extremes-dt.json +0 -8
- eodag-3.0.0b3.dist-info/RECORD +0 -110
- {eodag-3.0.0b3.dist-info → eodag-3.0.1.dist-info}/LICENSE +0 -0
- {eodag-3.0.0b3.dist-info → eodag-3.0.1.dist-info}/top_level.txt +0 -0
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
from __future__ import annotations
|
|
19
19
|
|
|
20
20
|
import logging
|
|
21
|
-
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple
|
|
21
|
+
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple
|
|
22
22
|
from unittest import mock
|
|
23
23
|
|
|
24
24
|
import geojson
|
|
@@ -44,23 +44,23 @@ logger = logging.getLogger("eodag.search.static_stac_search")
|
|
|
44
44
|
class StaticStacSearch(StacSearch):
|
|
45
45
|
"""Static STAC Catalog search plugin
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
This plugin first loads all STAC items found in the catalog, and converts them to
|
|
48
|
+
EOProducts using :class:`~eodag.plugins.search.qssearch.StacSearch`.
|
|
49
|
+
Then it uses crunchers to only keep products matching query parameters.
|
|
49
50
|
|
|
50
|
-
|
|
51
|
+
The plugin inherits the configuration parameters from :class:`~eodag.plugins.search.qssearch.PostJsonSearch`
|
|
52
|
+
(via the :class:`~eodag.plugins.search.qssearch.StacSearch` inheritance) with the following particularities:
|
|
51
53
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
:param provider: provider name
|
|
55
|
+
:param config: Search plugin configuration:
|
|
54
56
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
* :attr:`~eodag.config.PluginConfig.api_endpoint` (``str``) (**mandatory**): path to the catalog;
|
|
58
|
+
in contrast to the api_endpoint for other plugin types this can be a url or local system path.
|
|
59
|
+
* :attr:`~eodag.config.PluginConfig.max_connections` (``int``): Maximum number of concurrent
|
|
60
|
+
connections for HTTP requests; default: ``100``
|
|
61
|
+
* :attr:`~eodag.config.PluginConfig.timeout` (``int``): Timeout in seconds for each
|
|
62
|
+
internal HTTP request; default: ``5``
|
|
57
63
|
|
|
58
|
-
This plugin first loads all STAC items found in the catalog, and converts them to
|
|
59
|
-
EOProducts using StacSearch.
|
|
60
|
-
Then it uses crunchers to only keep products matching query parameters.
|
|
61
|
-
|
|
62
|
-
:param provider: An eodag providers configuration dictionary
|
|
63
|
-
:param config: Path to the user configuration file
|
|
64
64
|
"""
|
|
65
65
|
|
|
66
66
|
def __init__(self, provider: str, config: PluginConfig) -> None:
|
|
@@ -88,19 +88,18 @@ class StaticStacSearch(StacSearch):
|
|
|
88
88
|
getattr(self.config, "discover_product_types", {}).get("fetch_url")
|
|
89
89
|
== "{api_endpoint}/../collections"
|
|
90
90
|
):
|
|
91
|
-
self.config.discover_product_types = {
|
|
91
|
+
self.config.discover_product_types = {}
|
|
92
92
|
|
|
93
93
|
def discover_product_types(self, **kwargs: Any) -> Optional[Dict[str, Any]]:
|
|
94
94
|
"""Fetch product types list from a static STAC Catalog provider using `discover_product_types` conf
|
|
95
95
|
|
|
96
96
|
:returns: configuration dict containing fetched product types information
|
|
97
97
|
"""
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
)
|
|
98
|
+
unformatted_fetch_url = self.config.discover_product_types.get("fetch_url")
|
|
99
|
+
if unformatted_fetch_url is None:
|
|
100
|
+
return None
|
|
101
|
+
fetch_url = unformatted_fetch_url.format(**self.config.__dict__)
|
|
102
|
+
|
|
104
103
|
collections = fetch_stac_collections(
|
|
105
104
|
fetch_url,
|
|
106
105
|
collection=kwargs.get("q"),
|