eodag 4.0.0a3__py3-none-any.whl → 4.0.0a5__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/collection.py +8 -8
- eodag/api/core.py +216 -313
- eodag/api/product/_product.py +28 -6
- eodag/api/provider.py +990 -0
- eodag/cli.py +11 -4
- eodag/config.py +73 -444
- eodag/plugins/apis/ecmwf.py +3 -24
- eodag/plugins/apis/usgs.py +3 -24
- eodag/plugins/authentication/token.py +0 -1
- eodag/plugins/download/aws.py +83 -44
- eodag/plugins/download/base.py +117 -41
- eodag/plugins/download/http.py +84 -56
- eodag/plugins/manager.py +24 -34
- eodag/resources/ext_collections.json +1 -1
- eodag/resources/ext_product_types.json +1 -1
- eodag/resources/providers.yml +2 -0
- eodag/utils/s3.py +4 -4
- {eodag-4.0.0a3.dist-info → eodag-4.0.0a5.dist-info}/METADATA +1 -1
- {eodag-4.0.0a3.dist-info → eodag-4.0.0a5.dist-info}/RECORD +23 -22
- {eodag-4.0.0a3.dist-info → eodag-4.0.0a5.dist-info}/WHEEL +0 -0
- {eodag-4.0.0a3.dist-info → eodag-4.0.0a5.dist-info}/entry_points.txt +0 -0
- {eodag-4.0.0a3.dist-info → eodag-4.0.0a5.dist-info}/licenses/LICENSE +0 -0
- {eodag-4.0.0a3.dist-info → eodag-4.0.0a5.dist-info}/top_level.txt +0 -0
eodag/api/collection.py
CHANGED
|
@@ -130,7 +130,7 @@ class Collection(BaseModel):
|
|
|
130
130
|
|
|
131
131
|
@model_validator(mode="after")
|
|
132
132
|
def set_id_from_alias(self) -> Self:
|
|
133
|
-
"""
|
|
133
|
+
"""If an alias exists, use it to update ``id`` attribute"""
|
|
134
134
|
if self.alias is not None:
|
|
135
135
|
self._id = self.id
|
|
136
136
|
self.id = self.alias
|
|
@@ -141,9 +141,9 @@ class Collection(BaseModel):
|
|
|
141
141
|
def validate_collection(
|
|
142
142
|
cls, values: dict[str, Any] | Self, handler: ModelWrapValidatorHandler[Self]
|
|
143
143
|
) -> Self:
|
|
144
|
-
"""Allow to create a collection instance with bad formatted attributes (except
|
|
145
|
-
Set incorrectly formatted attributes to None and ignore extra attributes.
|
|
146
|
-
Log a warning about validation errors if EODAG_VALIDATE_COLLECTIONS is set to True
|
|
144
|
+
"""Allow to create a collection instance with bad formatted attributes (except ``id``).
|
|
145
|
+
Set incorrectly formatted attributes to ``None`` and ignore extra attributes.
|
|
146
|
+
Log a warning about validation errors if ``EODAG_VALIDATE_COLLECTIONS`` environment variable is set to ``True``.
|
|
147
147
|
"""
|
|
148
148
|
errors: list[ErrorDetails] = []
|
|
149
149
|
continue_validation: bool = True
|
|
@@ -237,7 +237,7 @@ class Collection(BaseModel):
|
|
|
237
237
|
return self._dag
|
|
238
238
|
|
|
239
239
|
def search(self, **kwargs: Any) -> SearchResult:
|
|
240
|
-
"""Look for products of this collection matching criteria using the
|
|
240
|
+
"""Look for products of this collection matching criteria using the ``dag`` attribute of the instance.
|
|
241
241
|
|
|
242
242
|
:param kwargs: Some other criteria that will be used to do the search,
|
|
243
243
|
using parameters compatible with the provider
|
|
@@ -257,12 +257,12 @@ class Collection(BaseModel):
|
|
|
257
257
|
return dag.search(collection=self.id, **kwargs)
|
|
258
258
|
|
|
259
259
|
def list_queryables(self, **kwargs: Any) -> QueryablesDict:
|
|
260
|
-
"""Fetch the queryable properties for this collection using the
|
|
260
|
+
"""Fetch the queryable properties for this collection using the ``dag`` attribute of the instance.
|
|
261
261
|
|
|
262
262
|
:param kwargs: additional filters for queryables
|
|
263
263
|
|
|
264
264
|
:returns: A :class:`~eodag.api.product.queryables.QuerybalesDict` containing the EODAG queryable
|
|
265
|
-
properties, associating parameters to their annotated type, and
|
|
265
|
+
properties, associating parameters to their annotated type, and an ``additional_properties`` attribute
|
|
266
266
|
:raises: :class:`~eodag.utils.exceptions.ValidationError`: If the `collection` argument is set in `kwargs`,
|
|
267
267
|
since it is already defined by the instance
|
|
268
268
|
"""
|
|
@@ -278,7 +278,7 @@ class Collection(BaseModel):
|
|
|
278
278
|
|
|
279
279
|
|
|
280
280
|
class CollectionsDict(UserDict[str, Collection]):
|
|
281
|
-
"""A UserDict object which values are :class:`~eodag.api.collection.Collection` objects, keyed by provider id
|
|
281
|
+
"""A UserDict object which values are :class:`~eodag.api.collection.Collection` objects, keyed by provider ``id``.
|
|
282
282
|
|
|
283
283
|
:param collections: A list of collections
|
|
284
284
|
|