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.
Files changed (71) hide show
  1. eodag/api/core.py +189 -125
  2. eodag/api/product/metadata_mapping.py +12 -3
  3. eodag/api/search_result.py +29 -3
  4. eodag/cli.py +35 -19
  5. eodag/config.py +412 -116
  6. eodag/plugins/apis/base.py +10 -4
  7. eodag/plugins/apis/ecmwf.py +14 -4
  8. eodag/plugins/apis/usgs.py +25 -2
  9. eodag/plugins/authentication/aws_auth.py +14 -5
  10. eodag/plugins/authentication/base.py +10 -1
  11. eodag/plugins/authentication/generic.py +14 -3
  12. eodag/plugins/authentication/header.py +12 -4
  13. eodag/plugins/authentication/keycloak.py +41 -22
  14. eodag/plugins/authentication/oauth.py +11 -1
  15. eodag/plugins/authentication/openid_connect.py +178 -163
  16. eodag/plugins/authentication/qsauth.py +12 -4
  17. eodag/plugins/authentication/sas_auth.py +19 -2
  18. eodag/plugins/authentication/token.py +57 -10
  19. eodag/plugins/authentication/token_exchange.py +19 -19
  20. eodag/plugins/crunch/base.py +4 -1
  21. eodag/plugins/crunch/filter_date.py +5 -2
  22. eodag/plugins/crunch/filter_latest_intersect.py +5 -4
  23. eodag/plugins/crunch/filter_latest_tpl_name.py +1 -1
  24. eodag/plugins/crunch/filter_overlap.py +5 -7
  25. eodag/plugins/crunch/filter_property.py +4 -3
  26. eodag/plugins/download/aws.py +39 -22
  27. eodag/plugins/download/base.py +11 -11
  28. eodag/plugins/download/creodias_s3.py +11 -2
  29. eodag/plugins/download/http.py +86 -52
  30. eodag/plugins/download/s3rest.py +20 -18
  31. eodag/plugins/manager.py +168 -23
  32. eodag/plugins/search/base.py +33 -14
  33. eodag/plugins/search/build_search_result.py +55 -51
  34. eodag/plugins/search/cop_marine.py +112 -29
  35. eodag/plugins/search/creodias_s3.py +20 -5
  36. eodag/plugins/search/csw.py +41 -1
  37. eodag/plugins/search/data_request_search.py +109 -9
  38. eodag/plugins/search/qssearch.py +532 -152
  39. eodag/plugins/search/static_stac_search.py +20 -21
  40. eodag/resources/ext_product_types.json +1 -1
  41. eodag/resources/product_types.yml +187 -56
  42. eodag/resources/providers.yml +1610 -1701
  43. eodag/resources/stac.yml +3 -163
  44. eodag/resources/user_conf_template.yml +112 -97
  45. eodag/rest/config.py +1 -2
  46. eodag/rest/constants.py +0 -1
  47. eodag/rest/core.py +61 -51
  48. eodag/rest/errors.py +181 -0
  49. eodag/rest/server.py +24 -325
  50. eodag/rest/stac.py +93 -544
  51. eodag/rest/types/eodag_search.py +13 -8
  52. eodag/rest/types/queryables.py +1 -2
  53. eodag/rest/types/stac_search.py +11 -2
  54. eodag/types/__init__.py +15 -3
  55. eodag/types/download_args.py +1 -1
  56. eodag/types/queryables.py +1 -2
  57. eodag/types/search_args.py +3 -3
  58. eodag/utils/__init__.py +77 -57
  59. eodag/utils/exceptions.py +23 -9
  60. eodag/utils/logging.py +37 -77
  61. eodag/utils/requests.py +1 -3
  62. eodag/utils/stac_reader.py +1 -1
  63. {eodag-3.0.0b3.dist-info → eodag-3.0.1.dist-info}/METADATA +11 -12
  64. eodag-3.0.1.dist-info/RECORD +109 -0
  65. {eodag-3.0.0b3.dist-info → eodag-3.0.1.dist-info}/WHEEL +1 -1
  66. {eodag-3.0.0b3.dist-info → eodag-3.0.1.dist-info}/entry_points.txt +1 -0
  67. eodag/resources/constraints/climate-dt.json +0 -13
  68. eodag/resources/constraints/extremes-dt.json +0 -8
  69. eodag-3.0.0b3.dist-info/RECORD +0 -110
  70. {eodag-3.0.0b3.dist-info → eodag-3.0.1.dist-info}/LICENSE +0 -0
  71. {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, cast
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
- The available configuration parameters for this plugin are
48
- (to be set in provider configuration):
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
- - **api_endpoint**: (mandatory) path to the catalog (url or local system path)
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
- - **max_connections**: (optional) Maximum number of connections for HTTP requests,
53
- defaut is 100.
54
+ :param provider: provider name
55
+ :param config: Search plugin configuration:
54
56
 
55
- - **timeout**: (mandatory) Timeout in seconds for each internal HTTP request,
56
- default is 5.
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 = {"fetch_url": None}
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
- fetch_url = cast(
99
- str,
100
- self.config.discover_product_types["fetch_url"].format(
101
- **self.config.__dict__
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"),