[Git][debian-gis-team/pystac-client][master] 4 commits: New upstream version 0.8.2
Antonio Valentino (@antonio.valentino)
gitlab at salsa.debian.org
Sat Jun 1 16:50:14 BST 2024
Antonio Valentino pushed to branch master at Debian GIS Project / pystac-client
Commits:
11757061 by Antonio Valentino at 2024-06-01T15:39:40+00:00
New upstream version 0.8.2
- - - - -
b129e7cc by Antonio Valentino at 2024-06-01T15:39:56+00:00
Update upstream source from tag 'upstream/0.8.2'
Update to upstream version '0.8.2'
with Debian dir c67a0824b3fbdc46a97dcfdf661c040342f02440
- - - - -
9b0d6568 by Antonio Valentino at 2024-06-01T15:41:07+00:00
New upstream release
- - - - -
0ff8e526 by Antonio Valentino at 2024-06-01T15:45:44+00:00
Set distribution to unstable
- - - - -
7 changed files:
- .pre-commit-config.yaml
- CHANGELOG.md
- debian/changelog
- pyproject.toml
- pystac_client/item_search.py
- pystac_client/version.py
- tests/test_item_search.py
Changes:
=====================================
.pre-commit-config.yaml
=====================================
@@ -3,7 +3,7 @@
repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
- rev: "v0.4.5"
+ rev: "v0.4.6"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
@@ -12,7 +12,7 @@ repos:
hooks:
- id: black
- repo: https://github.com/codespell-project/codespell
- rev: v2.2.6
+ rev: v2.3.0
hooks:
- id: codespell
args: [--ignore-words=.codespellignore]
=====================================
CHANGELOG.md
=====================================
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]
+## [v0.8.2] - 2024-05-30
+
+### Added
+
+- Support for "Feature" type `intersects` dictionaries [#696](https://github.com/stac-utils/pystac-client/pull/696)
+
## [v0.8.1] - 2024-05-23
### Fixed
@@ -372,7 +378,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
Initial release.
-[Unreleased]: https://github.com/stac-utils/pystac-client/compare/v0.8.1...main
+[Unreleased]: https://github.com/stac-utils/pystac-client/compare/v0.8.2...main
+[v0.8.2]: https://github.com/stac-utils/pystac-client/compare/v0.8.1...v0.8.2
[v0.8.1]: https://github.com/stac-utils/pystac-client/compare/v0.8.0...v0.8.1
[v0.8.0]: https://github.com/stac-utils/pystac-client/compare/v0.7.7...v0.8.0
[v0.7.7]: https://github.com/stac-utils/pystac-client/compare/v0.7.6...v0.7.7
=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+pystac-client (0.8.2-1) unstable; urgency=medium
+
+ * New upstream release.
+
+ -- Antonio Valentino <antonio.valentino at tiscali.it> Sat, 01 Jun 2024 15:45:24 +0000
+
pystac-client (0.8.1-1) unstable; urgency=medium
* New upstream release.
=====================================
pyproject.toml
=====================================
@@ -39,7 +39,7 @@ stac-client = "pystac_client.cli:cli"
[project.optional-dependencies]
dev = [
"black~=24.0",
- "codespell~=2.2.4",
+ "codespell~=2.3.0",
"coverage~=7.2",
"doc8~=1.1.1",
"importlib-metadata~=7.0",
@@ -53,7 +53,7 @@ dev = [
"pytest~=8.0",
"recommonmark~=0.7.1",
"requests-mock~=1.12",
- "ruff==0.4.5",
+ "ruff==0.4.6",
"tomli~=2.0; python_version<'3.11'",
"types-python-dateutil>=2.8.19,<2.10.0",
"types-requests~=2.31.0",
=====================================
pystac_client/item_search.py
=====================================
@@ -179,11 +179,10 @@ class ItemSearch:
bbox: A list, tuple, or iterator representing a bounding box of 2D
or 3D coordinates. Results will be filtered
to only those intersecting the bounding box.
- intersects: A string or dictionary representing a GeoJSON geometry, or
- an object that implements a
- ``__geo_interface__`` property, as supported by several libraries
- including Shapely, ArcPy, PySAL, and
- geojson. Results filtered to only those intersecting the geometry.
+ intersects: A string or dictionary representing a GeoJSON geometry or feature,
+ or an object that implements a ``__geo_interface__`` property, as supported
+ by several libraries including Shapely, ArcPy, PySAL, and geojson. Results
+ filtered to only those intersecting the geometry.
datetime: Either a single datetime or datetime range used to filter results.
You may express a single datetime using a :class:`datetime.datetime`
instance, a `RFC 3339-compliant <https://tools.ietf.org/html/rfc3339>`__
@@ -646,7 +645,10 @@ class ItemSearch:
if value is None:
return None
if isinstance(value, dict):
- return deepcopy(value)
+ if value.get("type") == "Feature":
+ return deepcopy(value.get("geometry"))
+ else:
+ return deepcopy(value)
if isinstance(value, str):
return dict(json.loads(value))
if hasattr(value, "__geo_interface__"):
=====================================
pystac_client/version.py
=====================================
@@ -1 +1 @@
-__version__ = "0.8.1"
+__version__ = "0.8.2"
=====================================
tests/test_item_search.py
=====================================
@@ -850,3 +850,17 @@ def test_fields() -> None:
assert "geometry" not in item
assert "assets" not in item
assert "links" not in item
+
+
+def test_feature() -> None:
+ search = ItemSearch(
+ url="https://earth-search.aws.element84.com/v1/search",
+ intersects={
+ "type": "Feature",
+ "geometry": {"type": "Point", "coordinates": [-105.1019, 40.1672]},
+ },
+ )
+ assert search.get_parameters()["intersects"] == {
+ "type": "Point",
+ "coordinates": [-105.1019, 40.1672],
+ }
View it on GitLab: https://salsa.debian.org/debian-gis-team/pystac-client/-/compare/fc4566522fec7c051c3a5d6b9535dc06b1cfe97c...0ff8e526a8e4cd185abc5964a2624e60bd208609
--
This project does not include diff previews in email notifications.
View it on GitLab: https://salsa.debian.org/debian-gis-team/pystac-client/-/compare/fc4566522fec7c051c3a5d6b9535dc06b1cfe97c...0ff8e526a8e4cd185abc5964a2624e60bd208609
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20240601/b918bd93/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list