Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the Filter Extension dependency from Aggregation Extension requests #716

Merged
merged 5 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

* Updated default filter language in filter extension's POST search request model to match the extension's documentation [#711](https://github.com/stac-utils/stac-fastapi/issues/711)

### Removed

* Removed the Filter Extension depenency from `AggregationExtensionPostRequest` and `AggregationExtensionGetRequest` [#716](https://github.com/stac-utils/stac-fastapi/pull/716)

## [3.0.0a3] - 2024-06-13

### Added
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
"""Request model for the Aggregation extension."""

from typing import List, Optional, Union
from typing import List, Optional

import attr

from stac_fastapi.extensions.core.filter.request import (
FilterExtensionGetRequest,
FilterExtensionPostRequest,
from stac_fastapi.types.search import (
BaseSearchGetRequest,
BaseSearchPostRequest,
str2list,
)
from stac_fastapi.types.search import BaseSearchGetRequest, BaseSearchPostRequest


@attr.s
class AggregationExtensionGetRequest(BaseSearchGetRequest, FilterExtensionGetRequest):
class AggregationExtensionGetRequest(BaseSearchGetRequest):
vincentsarago marked this conversation as resolved.
Show resolved Hide resolved
"""Aggregation Extension GET request model."""

aggregations: Optional[str] = attr.ib(default=None)
aggregations: Optional[str] = attr.ib(default=None, converter=str2list)


class AggregationExtensionPostRequest(BaseSearchPostRequest, FilterExtensionPostRequest):
class AggregationExtensionPostRequest(BaseSearchPostRequest):
vincentsarago marked this conversation as resolved.
Show resolved Hide resolved
"""Aggregation Extension POST request model."""

aggregations: Optional[Union[str, List[str]]] = attr.ib(default=None)
aggregations: Optional[List[str]] = attr.ib(default=None)