Skip to content

Commit 05f22d5

Browse files
authored
Update rustac (#138)
Fixes a panic in the **cql2** dependency. developmentseed/cql2-rs#83 Closes #135 cc @hrodmn ```text async def test_cql(data: Path) -> None: > await rustac.search( str(data / "100-sentinel-2-items.parquet"), filter={ "op": "and", "args": [ # eq is cql, not cql2 {"op": "eq", "args": [{"property": "platform"}, "made-up-platform"]}, ], }, max_items=1, ) E rustac.RustacError: eq is not a valid operator. tests/test_search.py:98: RustacError ```
1 parent be985a6 commit 05f22d5

File tree

9 files changed

+159
-60
lines changed

9 files changed

+159
-60
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
99

1010
- `type` field to geoparquet writes ([#136](https://github.com/stac-utils/rustac-py/pull/136), <https://github.com/stac-utils/rustac/pull/736>)
1111

12+
### Fixed
13+
14+
- Error instead of panic for cql ([#138](https://github.com/stac-utils/rustac-py/pull/138), <https://github.com/developmentseed/cql2-rs/pull/83>)
15+
1216
## [0.8.0] - 2025-05-13
1317

1418
### Added

Cargo.lock

Lines changed: 49 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,23 @@ serde = "1.0.217"
2727
serde_json = { version = "1.0.138", features = ["preserve_order"] }
2828
stac = { features = [
2929
"geoparquet-compression",
30-
"object-store-all",
30+
], git = "https://github.com/stac-utils/rustac", branch = "main" }
31+
stac-io = { features = [
32+
"store-all",
3133
], git = "https://github.com/stac-utils/rustac", branch = "main" }
3234
stac-api = { features = [
3335
"client",
3436
], git = "https://github.com/stac-utils/rustac", branch = "main" }
3537
rustac = { git = "https://github.com/stac-utils/rustac", features = [
3638
"pgstac",
37-
"duckdb",
3839
], branch = "main" }
3940
stac-duckdb = { git = "https://github.com/stac-utils/rustac", branch = "main" }
4041
thiserror = "2.0.12"
4142
tokio = { version = "1.44.0", features = ["rt-multi-thread"] }
4243
pyo3-log = "0.12.1"
4344
tracing = "0.1.41"
4445
pyo3-object_store = "0.2.0"
46+
object_store = "0.12.1"
4547

4648
[build-dependencies]
4749
cargo-lock = "10"

src/error.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,17 @@ pub enum Error {
3232
#[error(transparent)]
3333
Stac(#[from] stac::Error),
3434

35+
#[error(transparent)]
36+
StacIo(#[from] stac_io::Error),
37+
3538
#[error(transparent)]
3639
StacApi(#[from] stac_api::Error),
3740

3841
#[error(transparent)]
3942
StacDuckdb(#[from] stac_duckdb::Error),
43+
44+
#[error(transparent)]
45+
TokioTaskJon(#[from] tokio::task::JoinError),
4046
}
4147

4248
impl From<Error> for PyErr {

src/read.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
use crate::{Error, Json};
22
use pyo3::{Bound, PyResult, Python, pyfunction, types::PyAny};
33
use pyo3_object_store::AnyObjectStore;
4-
use stac::{Format, Link, Links, SelfHref, Value};
4+
use stac::{Link, Links, SelfHref, Value};
5+
use stac_io::Format;
56

67
#[pyfunction]
78
#[pyo3(signature = (href, *, format=None, store=None, set_self_link=true))]

src/search.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ use pyo3::prelude::*;
44
use pyo3::{Bound, FromPyObject, PyErr, PyResult, exceptions::PyValueError, types::PyDict};
55
use pyo3_object_store::AnyObjectStore;
66
use stac::Bbox;
7-
use stac::Format;
87
use stac_api::{Fields, Filter, Items, Search, Sortby};
8+
use stac_io::Format;
99

1010
#[pyfunction]
1111
#[pyo3(signature = (href, *, intersects=None, ids=None, collections=None, max_items=None, limit=None, bbox=None, datetime=None, include=None, exclude=None, sortby=None, filter=None, query=None, use_duckdb=None, **kwargs))]

0 commit comments

Comments
 (0)