eodag 3.0.0b2__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/__init__.py +6 -8
- eodag/api/core.py +295 -287
- eodag/api/product/__init__.py +10 -4
- eodag/api/product/_assets.py +2 -14
- eodag/api/product/_product.py +16 -30
- eodag/api/product/drivers/__init__.py +7 -2
- eodag/api/product/drivers/base.py +0 -3
- eodag/api/product/metadata_mapping.py +12 -31
- eodag/api/search_result.py +33 -12
- eodag/cli.py +35 -19
- eodag/config.py +455 -155
- eodag/plugins/apis/base.py +13 -7
- eodag/plugins/apis/ecmwf.py +16 -7
- eodag/plugins/apis/usgs.py +68 -16
- eodag/plugins/authentication/aws_auth.py +25 -7
- 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 +183 -167
- eodag/plugins/authentication/qsauth.py +12 -4
- eodag/plugins/authentication/sas_auth.py +19 -2
- eodag/plugins/authentication/token.py +59 -11
- eodag/plugins/authentication/token_exchange.py +19 -19
- eodag/plugins/crunch/base.py +7 -2
- eodag/plugins/crunch/filter_date.py +8 -11
- eodag/plugins/crunch/filter_latest_intersect.py +5 -7
- eodag/plugins/crunch/filter_latest_tpl_name.py +2 -5
- eodag/plugins/crunch/filter_overlap.py +9 -15
- eodag/plugins/crunch/filter_property.py +9 -14
- eodag/plugins/download/aws.py +84 -99
- eodag/plugins/download/base.py +36 -77
- eodag/plugins/download/creodias_s3.py +11 -2
- eodag/plugins/download/http.py +134 -109
- eodag/plugins/download/s3rest.py +37 -43
- eodag/plugins/manager.py +173 -41
- eodag/plugins/search/__init__.py +9 -9
- eodag/plugins/search/base.py +35 -35
- eodag/plugins/search/build_search_result.py +55 -64
- eodag/plugins/search/cop_marine.py +113 -32
- eodag/plugins/search/creodias_s3.py +20 -8
- eodag/plugins/search/csw.py +41 -1
- eodag/plugins/search/data_request_search.py +119 -14
- eodag/plugins/search/qssearch.py +619 -197
- eodag/plugins/search/static_stac_search.py +25 -23
- eodag/resources/ext_product_types.json +1 -1
- eodag/resources/product_types.yml +211 -56
- eodag/resources/providers.yml +1762 -1809
- eodag/resources/stac.yml +3 -163
- eodag/resources/user_conf_template.yml +134 -119
- eodag/rest/config.py +1 -2
- eodag/rest/constants.py +0 -1
- eodag/rest/core.py +70 -92
- eodag/rest/errors.py +181 -0
- eodag/rest/server.py +24 -330
- eodag/rest/stac.py +105 -630
- eodag/rest/types/eodag_search.py +17 -15
- eodag/rest/types/queryables.py +5 -14
- eodag/rest/types/stac_search.py +18 -13
- eodag/rest/utils/rfc3339.py +0 -1
- eodag/types/__init__.py +24 -6
- eodag/types/download_args.py +14 -5
- eodag/types/queryables.py +1 -2
- eodag/types/search_args.py +10 -11
- eodag/types/whoosh.py +0 -2
- eodag/utils/__init__.py +97 -136
- eodag/utils/constraints.py +0 -8
- eodag/utils/exceptions.py +23 -9
- eodag/utils/import_system.py +0 -4
- eodag/utils/logging.py +37 -80
- eodag/utils/notebook.py +4 -4
- eodag/utils/requests.py +13 -23
- eodag/utils/rest.py +0 -4
- eodag/utils/stac_reader.py +3 -15
- {eodag-3.0.0b2.dist-info → eodag-3.0.1.dist-info}/METADATA +41 -24
- eodag-3.0.1.dist-info/RECORD +109 -0
- {eodag-3.0.0b2.dist-info → eodag-3.0.1.dist-info}/WHEEL +1 -1
- {eodag-3.0.0b2.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.0b2.dist-info/RECORD +0 -110
- {eodag-3.0.0b2.dist-info → eodag-3.0.1.dist-info}/LICENSE +0 -0
- {eodag-3.0.0b2.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,25 +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
|
-
|
|
49
|
-
|
|
50
|
-
- **api_endpoint**: (mandatory) path to the catalog (url or local system path)
|
|
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.
|
|
51
50
|
|
|
52
|
-
|
|
53
|
-
|
|
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:
|
|
54
53
|
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
:param provider: provider name
|
|
55
|
+
:param config: Search plugin configuration:
|
|
57
56
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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``
|
|
61
63
|
|
|
62
|
-
:param provider: An eodag providers configuration dictionary
|
|
63
|
-
:type provider: dict
|
|
64
|
-
:param config: Path to the user configuration file
|
|
65
|
-
:type config: str
|
|
66
64
|
"""
|
|
67
65
|
|
|
68
66
|
def __init__(self, provider: str, config: PluginConfig) -> None:
|
|
@@ -85,19 +83,23 @@ class StaticStacSearch(StacSearch):
|
|
|
85
83
|
"total_items_nb_key_path", "$.null"
|
|
86
84
|
)
|
|
87
85
|
self.config.__dict__["pagination"].setdefault("max_items_per_page", -1)
|
|
86
|
+
# disable product types discovery by default (if endpoints equals to STAC API default)
|
|
87
|
+
if (
|
|
88
|
+
getattr(self.config, "discover_product_types", {}).get("fetch_url")
|
|
89
|
+
== "{api_endpoint}/../collections"
|
|
90
|
+
):
|
|
91
|
+
self.config.discover_product_types = {}
|
|
88
92
|
|
|
89
93
|
def discover_product_types(self, **kwargs: Any) -> Optional[Dict[str, Any]]:
|
|
90
94
|
"""Fetch product types list from a static STAC Catalog provider using `discover_product_types` conf
|
|
91
95
|
|
|
92
96
|
:returns: configuration dict containing fetched product types information
|
|
93
|
-
:rtype: Optional[Dict[str, Any]]
|
|
94
97
|
"""
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
)
|
|
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
|
+
|
|
101
103
|
collections = fetch_stac_collections(
|
|
102
104
|
fetch_url,
|
|
103
105
|
collection=kwargs.get("q"),
|