Skip to content

Commit 9219359

Browse files
authored
release: v1.13.0 (#1550)
* release: v1.13.0 * feat: autoupdate pre-commit * fix: lints
1 parent 897f3cb commit 9219359

20 files changed

+1425
-1218
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
repos:
55
- repo: https://github.com/asottile/pyupgrade
6-
rev: v3.18.0
6+
rev: v3.19.1
77
hooks:
88
- id: pyupgrade
99
args:

CHANGELOG.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## [Unreleased]
44

5+
## [v1.13.0] - 2025-04-15
6+
57
### Added
68

79
- Projection extension: migrate Assets and Item-Assets ([#1549](https://github.com/stac-utils/pystac/pull/1549))
@@ -13,13 +15,13 @@
1315
- `proj:epsg` migration when `None` ([#1544](https://github.com/stac-utils/pystac/pull/1544))
1416
- fixed missing parameter "title" in pystac.extensions.classification.Classification ([#1539](https://github.com/stac-utils/pystac/pull/1539))
1517

16-
## [v1.12.2]
18+
## [v1.12.2] - 2025-02-19
1719

1820
### Fixed
1921

2022
- Make sure that `VersionRange` has `VersionID`s rather than strings ([#1512](https://github.com/stac-utils/pystac/pull/1512))
2123

22-
## [v1.12.1]
24+
## [v1.12.1] - 2025-01-27
2325

2426
### Changed
2527

@@ -29,7 +31,7 @@
2931

3032
- Fall back to `epsg` when `code` is not present in the Projection extension ([#1505](https://github.com/stac-utils/pystac/pull/1505), [#1510](https://github.com/stac-utils/pystac/pull/1510))
3133

32-
## [v1.12.0]
34+
## [v1.12.0] - 2025-01-23
3335

3436
### Added
3537

@@ -921,7 +923,8 @@ use `Band.create`
921923

922924
Initial release.
923925

924-
[Unreleased]: <https://github.com/stac-utils/pystac/compare/v1.12.2..main>
926+
[Unreleased]: <https://github.com/stac-utils/pystac/compare/v1.13.0..main>
927+
[v1.13.0]: <https://github.com/stac-utils/pystac/compare/v1.12.2..v1.13.0>
925928
[v1.12.2]: <https://github.com/stac-utils/pystac/compare/v1.12.1..v1.12.2>
926929
[v1.12.1]: <https://github.com/stac-utils/pystac/compare/v1.12.0..v1.12.1>
927930
[v1.12.0]: <https://github.com/stac-utils/pystac/compare/v1.11.0..v1.12.0>

docs/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,19 @@
6161

6262
extlinks = {
6363
"tutorial": (
64-
"https://github.com/stac-utils/pystac/" "tree/{}/docs/tutorials/%s".format(
64+
"https://github.com/stac-utils/pystac/tree/{}/docs/tutorials/%s".format(
6565
git_branch
6666
),
6767
"%s tutorial",
6868
),
6969
"stac-spec": (
70-
"https://github.com/radiantearth/stac-spec/tree/" "v{}/%s".format(
70+
"https://github.com/radiantearth/stac-spec/tree/v{}/%s".format(
7171
STACVersion.DEFAULT_STAC_VERSION
7272
),
7373
"%s path",
7474
),
7575
"stac-api-spec": (
76-
"https://github.com/radiantearth/stac-api-spec/tree/" "v{}/%s".format(
76+
"https://github.com/radiantearth/stac-api-spec/tree/v{}/%s".format(
7777
STACVersion.DEFAULT_STAC_API_VERSION
7878
),
7979
"%s path",

docs/tutorials/adding-new-and-custom-extensions.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
" self.properties[\"timestamp\"] = datetime_to_str(v)\n",
105105
"\n",
106106
" def __repr__(self) -> str:\n",
107-
" return \"<OrderEvent \" f\"type={self.event_type} \" f\"timestamp={self.timestamp}>\"\n",
107+
" return f\"<OrderEvent type={self.event_type} timestamp={self.timestamp}>\"\n",
108108
"\n",
109109
" def apply(\n",
110110
" self,\n",

docs/tutorials/creating-a-landsat-stac.ipynb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,8 +1418,7 @@
14181418
" offset=11,\n",
14191419
" length=1,\n",
14201420
" description=(\n",
1421-
" \"Terrain not visible from sensor due to \"\n",
1422-
" \"intervening terrain\"\n",
1421+
" \"Terrain not visible from sensor due to intervening terrain\"\n",
14231422
" ),\n",
14241423
" classes=[\n",
14251424
" Classification.create(\n",

pystac/extensions/classification.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,9 @@ def color_hint(self) -> str | None:
222222
def color_hint(self, v: str | None) -> None:
223223
if v is not None:
224224
match = COLOR_HINT_PATTERN.match(v)
225-
assert (
226-
v is None or match is not None and match.group() == v
227-
), "Must format color hints as '^([0-9A-F]{6})$'"
225+
assert v is None or match is not None and match.group() == v, (
226+
"Must format color hints as '^([0-9A-F]{6})$'"
227+
)
228228
self.properties["color_hint"] = v
229229
else:
230230
self.properties.pop("color_hint", None)
@@ -343,9 +343,9 @@ def apply(
343343
assert offset >= 0, "Non-negative offsets only"
344344
assert length >= 1, "Positive field lengths only"
345345
assert len(classes) > 0, "Must specify at least one class"
346-
assert (
347-
roles is None or len(roles) > 0
348-
), "When set, roles must contain at least one item"
346+
assert roles is None or len(roles) > 0, (
347+
"When set, roles must contain at least one item"
348+
)
349349

350350
@classmethod
351351
def create(

pystac/extensions/grid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def validated_code(v: str) -> str:
3030
raise ValueError("Invalid Grid code: must be str")
3131
if not CODE_PATTERN.fullmatch(v):
3232
raise ValueError(
33-
f"Invalid Grid code: {v}" f" does not match the regex {CODE_REGEX}"
33+
f"Invalid Grid code: {v} does not match the regex {CODE_REGEX}"
3434
)
3535
return v
3636

pystac/serialization/common_properties.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def merge_common_properties(
8989
collection_props = collection["properties"]
9090
else:
9191
raise ValueError(
92-
"{} is expected to be a Collection or " "dict but is neither.".format(
92+
"{} is expected to be a Collection or dict but is neither.".format(
9393
collection
9494
)
9595
)

pystac/serialization/migrate.py

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -78,31 +78,29 @@ def _migrate_datetime_range(
7878
return None
7979

8080

81-
def _get_object_migrations() -> (
82-
dict[str, Callable[[dict[str, Any], STACVersionID, STACJSONDescription], None]]
83-
):
81+
def _get_object_migrations() -> dict[
82+
str, Callable[[dict[str, Any], STACVersionID, STACJSONDescription], None]
83+
]:
8484
return {
8585
pystac.STACObjectType.CATALOG: _migrate_catalog,
8686
pystac.STACObjectType.COLLECTION: _migrate_collection,
8787
pystac.STACObjectType.ITEM: _migrate_item,
8888
}
8989

9090

91-
def _get_removed_extension_migrations() -> (
92-
dict[
93-
str,
94-
tuple[
95-
list[STACObjectType] | None,
96-
None
97-
| (
98-
Callable[
99-
[dict[str, Any], STACVersionID, STACJSONDescription],
100-
set[str] | None,
101-
]
102-
),
103-
],
104-
]
105-
):
91+
def _get_removed_extension_migrations() -> dict[
92+
str,
93+
tuple[
94+
list[STACObjectType] | None,
95+
None
96+
| (
97+
Callable[
98+
[dict[str, Any], STACVersionID, STACJSONDescription],
99+
set[str] | None,
100+
]
101+
),
102+
],
103+
]:
106104
"""Handles removed extensions.
107105
108106
This does not handle renamed extension or extensions that were absorbed

pystac/utils.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -464,12 +464,12 @@ def extract_coords(coords: list[list[float] | list[list[Any]]]) -> None:
464464
for x in coords:
465465
# This handles points
466466
if isinstance(x, float):
467-
assert isinstance(
468-
coords[0], float
469-
), f"Type mismatch: {coords[0]} is not a float"
470-
assert isinstance(
471-
coords[1], float
472-
), f"Type mismatch: {coords[1]} is not a float"
467+
assert isinstance(coords[0], float), (
468+
f"Type mismatch: {coords[0]} is not a float"
469+
)
470+
assert isinstance(coords[1], float), (
471+
f"Type mismatch: {coords[1]} is not a float"
472+
)
473473
lats.append(coords[0])
474474
lons.append(coords[1])
475475
return

0 commit comments

Comments
 (0)