[Git][debian-gis-team/stac-pydantic][upstream] New upstream version 3.5.2
Antonio Valentino (@antonio.valentino)
gitlab at salsa.debian.org
Sun May 31 09:18:29 BST 2026
Antonio Valentino pushed to branch upstream at Debian GIS Project / stac-pydantic
Commits:
90141e00 by Antonio Valentino at 2026-05-31T08:14:51+00:00
New upstream version 3.5.2
- - - - -
16 changed files:
- + .github/dependabot.yml
- .github/workflows/cicd.yml
- .github/workflows/release.yml
- .pre-commit-config.yaml
- CHANGELOG.md
- stac_pydantic/__init__.py
- stac_pydantic/api/collection.py
- stac_pydantic/api/collections.py
- stac_pydantic/api/item.py
- stac_pydantic/api/item_collection.py
- stac_pydantic/api/landing.py
- stac_pydantic/shared.py
- stac_pydantic/version.py
- tests/api/test_search.py
- tests/test_models.py
- uv.lock
Changes:
=====================================
.github/dependabot.yml
=====================================
@@ -0,0 +1,15 @@
+version: 2
+updates:
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "weekly"
+ day: "monday"
+ groups:
+ minor-and-patch:
+ applies-to: version-updates
+ patterns:
+ - "*"
+ update-types:
+ - "minor"
+ - "patch"
=====================================
.github/workflows/cicd.yml
=====================================
@@ -26,10 +26,10 @@ jobs:
- '3.14'
steps:
- - uses: actions/checkout at v5
+ - uses: actions/checkout at de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install uv
- uses: astral-sh/setup-uv at v7
+ uses: astral-sh/setup-uv at 08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: "0.9.*"
enable-cache: true
@@ -48,7 +48,7 @@ jobs:
- name: Upload Results
if: ${{ matrix.python-version == env.LATEST_PY_VERSION }}
- uses: codecov/codecov-action at v5
+ uses: codecov/codecov-action at e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
with:
files: ./coverage.xml
flags: unittests
=====================================
.github/workflows/release.yml
=====================================
@@ -12,10 +12,10 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.repository }} == 'stac-utils/stac-pydantic'
steps:
- - uses: actions/checkout at v5
+ - uses: actions/checkout at de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install uv
- uses: astral-sh/setup-uv at v7
+ uses: astral-sh/setup-uv at 08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: "0.9.*"
enable-cache: true
=====================================
.pre-commit-config.yaml
=====================================
@@ -1,11 +1,11 @@
repos:
- repo: https://github.com/abravalheri/validate-pyproject
- rev: v0.24
+ rev: v0.25
hooks:
- id: validate-pyproject
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v4.5.0
+ rev: v6.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
@@ -14,20 +14,20 @@ repos:
args: ["--maxkb=40960"]
- repo: https://github.com/PyCQA/isort
- rev: 5.13.2
+ rev: 9.0.0a3
hooks:
- id: isort
language_version: python
- repo: https://github.com/astral-sh/ruff-pre-commit
- rev: v0.3.5
+ rev: v0.15.12
hooks:
- id: ruff
args: ["--fix"]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
- rev: v1.11.2
+ rev: v1.20.2
hooks:
- id: mypy
language_version: python
@@ -35,4 +35,4 @@ repos:
- types-attrs
- types-requests
- types-PyYAML
- - pydantic~=2.0
+ - pydantic>=2.4,<3.0
=====================================
CHANGELOG.md
=====================================
@@ -1,6 +1,14 @@
## Unreleased
+## 3.5.2 (2026-05-29)
+
+- fix: remove wrong longitude check for antimeridian crossing bbox validation (#212, @vincentsarago)
+
+## 3.5.1 (2026-05-05)
+
+- add top level public declaration `__all__`
+
## 3.5.0 (2026-01-29)
- add python 3.14 support
=====================================
stac_pydantic/__init__.py
=====================================
@@ -1,5 +1,15 @@
+"""STAC Pydantic."""
+
# flake8: noqa: F401
from .catalog import Catalog
from .collection import Collection
from .item import Item, ItemProperties
from .item_collection import ItemCollection
+
+__all__ = [
+ "Catalog",
+ "Collection",
+ "Item",
+ "ItemCollection",
+ "ItemProperties",
+]
=====================================
stac_pydantic/api/collection.py
=====================================
@@ -18,8 +18,8 @@ class Collection(BaseCollection):
required_rels = [Relations.root, Relations.self]
for rel in required_rels:
- assert (
- rel in links_rel
- ), f"STAC API COLLECTIONS conform Collection pages must include a `{rel}` link."
+ assert rel in links_rel, (
+ f"STAC API COLLECTIONS conform Collection pages must include a `{rel}` link."
+ )
return self
=====================================
stac_pydantic/api/collections.py
=====================================
@@ -28,8 +28,8 @@ class Collections(StacBaseModel):
required_rels = [Relations.root, Relations.self]
for rel in required_rels:
- assert (
- rel in links_rel
- ), f"STAC API COLLECTIONS conform Collections pages must include a `{rel}` link."
+ assert rel in links_rel, (
+ f"STAC API COLLECTIONS conform Collections pages must include a `{rel}` link."
+ )
return self
=====================================
stac_pydantic/api/item.py
=====================================
@@ -14,8 +14,8 @@ class Item(BaseItem):
required_rels = [Relations.root, Relations.self, Relations.collection]
for rel in required_rels:
- assert (
- rel in links_rel
- ), f"STAC API FEATURE conform Item pages must include a `{rel}` link."
+ assert rel in links_rel, (
+ f"STAC API FEATURE conform Item pages must include a `{rel}` link."
+ )
return self
=====================================
stac_pydantic/api/item_collection.py
=====================================
@@ -35,15 +35,15 @@ class ItemCollection(BaseItemCollection):
Relations.collection,
]
for link in required_links:
- assert (
- link in links_rel
- ), f"STAC API FEATURES conform Items pages must include a `{link}` link."
+ assert link in links_rel, (
+ f"STAC API FEATURES conform Items pages must include a `{link}` link."
+ )
if item_collection_type == "search":
required_links = [Relations.root]
for link in required_links:
- assert (
- link in links_rel
- ), f"STAC API FEATURES conform Items pages must include a `{link}` link."
+ assert link in links_rel, (
+ f"STAC API FEATURES conform Items pages must include a `{link}` link."
+ )
return self
=====================================
stac_pydantic/api/landing.py
=====================================
@@ -30,9 +30,9 @@ class LandingPage(Catalog):
required_core_rels = [Relations.root, Relations.self, Relations.service_desc]
for rel in required_core_rels:
- assert (
- rel in links_rel
- ), f"STAC API conform Landing pages must include a `{rel}` link."
+ assert rel in links_rel, (
+ f"STAC API conform Landing pages must include a `{rel}` link."
+ )
if (
AnyUrl(f"https://api.stacspec.org/v{STAC_API_VERSION}/collections")
@@ -40,9 +40,9 @@ class LandingPage(Catalog):
):
required_collections_rels = [Relations.data]
for rel in required_collections_rels:
- assert (
- rel in links_rel
- ), f"STAC API COLLECTION conform Landing pages must include a `{rel}` link."
+ assert rel in links_rel, (
+ f"STAC API COLLECTION conform Landing pages must include a `{rel}` link."
+ )
if (
AnyUrl(f"https://api.stacspec.org/v{STAC_API_VERSION}/item-search")
@@ -50,8 +50,8 @@ class LandingPage(Catalog):
):
required_feature_rels = [Relations.search]
for rel in required_feature_rels:
- assert (
- rel in links_rel
- ), f"STAC API ITEM SEARCH conform Landing pages must include a `{rel}` link."
+ assert rel in links_rel, (
+ f"STAC API ITEM SEARCH conform Landing pages must include a `{rel}` link."
+ )
return self
=====================================
stac_pydantic/shared.py
=====================================
@@ -285,11 +285,6 @@ def validate_bbox(v: Optional[BBox]) -> Optional[BBox]:
if xmin < -180 or ymin < -90 or xmax > 180 or ymax > 90:
raise ValueError("Bounding box must be within (-180, -90, 180, 90)")
- if xmax < xmin and (xmax > 0 or xmin < 0):
- raise ValueError(
- f"Maximum longitude ({xmax}) must be greater than minimum ({xmin}) longitude when not crossing the Antimeridian"
- )
-
if ymax < ymin:
raise ValueError(
f"Maximum latitude ({ymax}) must be greater than minimum latitude ({ymin})"
=====================================
stac_pydantic/version.py
=====================================
@@ -1,5 +1,5 @@
"""stac-pydantic and STAC spec versions."""
-__version__ = "3.5.0"
+__version__ = "3.5.2"
STAC_VERSION = "1.0.0"
=====================================
tests/api/test_search.py
=====================================
@@ -150,12 +150,6 @@ def test_search_geometry_bbox():
(100.0, 1.0, 105.0, 0.0), # ymin greater than ymax
(100.0, 0.0, 5.0, 105.0, 1.0, 4.0), # min elev greater than max elev
(-200.0, 0.0, 105.0, 1.0), # xmin is invalid WGS84
- (
- 105.0,
- 0.0,
- 100.0,
- 1.0,
- ), # xmin greater than xmax but not crossing Antimeridian
(100.0, -100, 105.0, 1.0), # ymin is invalid WGS84
(100.0, 0.0, 190.0, 1.0), # xmax is invalid WGS84
(100.0, 0.0, 190.0, 100.0), # ymax is invalid WGS84
@@ -201,11 +195,7 @@ def test_search_datetime(dt, start, end):
@pytest.mark.parametrize(
"dt",
[
- "/"
- "../"
- "/.."
- "../.."
- "/1984-04-12T23:20:50.52Z/1985-04-12T23:20:50.52Z", # extra start /
+ "/..//..../../1984-04-12T23:20:50.52Z/1985-04-12T23:20:50.52Z", # extra start /
"1984-04-12T23:20:50.52Z/1985-04-12T23:20:50.52Z/", # extra end /
"1986-04-12T23:20:50.52Z/1985-04-12T23:20:50.52Z", # start > end
],
=====================================
tests/test_models.py
=====================================
@@ -172,7 +172,8 @@ def test_asset_extras() -> None:
item = Item(**test_item)
for _, asset in item.assets.items():
- assert asset.foo == "bar"
+ assert "foo" in asset.model_dump()
+ assert asset.foo == "bar" # type: ignore [attr-defined]
def test_geo_interface() -> None:
@@ -461,10 +462,6 @@ def test_time_intervals_valid(interval) -> None:
[
# invalid Y order
[[0, 1, 1, 0]],
- # invalid X order (if crossing Antimeridian limit, xmin > 0)
- [[-169, 0, -170, 1]],
- # invalid X order (if crossing Antimeridian limit, xmax < 0)
- [[170, 0, 169, 1]],
# sub-sequent crossing Y
[[0, 0, 2, 2], [0.5, 0.5, 2.0, 2.5]],
# sub-sequent crossing X
=====================================
uv.lock
=====================================
The diff for this file was not included because it is too large.
View it on GitLab: https://salsa.debian.org/debian-gis-team/stac-pydantic/-/commit/90141e0089cdb8bca1eeea8939e10559fb54e9fc
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/stac-pydantic/-/commit/90141e0089cdb8bca1eeea8939e10559fb54e9fc
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20260531/47dae93d/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list