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

refactor: enhance assert bbox length with descriptive message #800

Merged
merged 3 commits into from
Mar 3, 2025
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
10 changes: 7 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@

## [Unreleased]

### Added

- added descriptive message to `types.search.str2bbox` length assert

### Fixed

- Fix collection-search POST request model:
- Fix pydantic model to make sure class variables `_start_date` and `_end_date` not edited (ported from stac-pydantic)
- Fix bbox validation to allow anti-meridian crossing (ported from stac-pydantic)
- fix collection-search POST request model:
- fix pydantic model to make sure class variables `_start_date` and `_end_date` not edited (ported from stac-pydantic)
- fix bbox validation to allow anti-meridian crossing (ported from stac-pydantic)

## [5.0.2] - 2025-01-30

Expand Down
2 changes: 1 addition & 1 deletion stac_fastapi/types/stac_fastapi/types/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def str2bbox(x: str) -> Optional[BBox]:
"""Convert string to BBox based on , delimiter."""
if x:
t = tuple(float(v) for v in str2list(x))
assert len(t) == 4
assert len(t) == 4, f"BBox '{x}' must have 4 values."
return t

return None
Expand Down
Loading