diff --git a/.cargo/config.toml b/.cargo/config.toml index 8e20de6..6cb51a4 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,6 +1,5 @@ [patch.crates-io] stac = { git = "https://github.com/stac-utils/rustac" } stac-io = { git = "https://github.com/stac-utils/rustac" } -stac-api = { git = "https://github.com/stac-utils/rustac" } stac-duckdb = { git = "https://github.com/stac-utils/rustac" } rustac = { git = "https://github.com/stac-utils/rustac" } diff --git a/CHANGELOG.md b/CHANGELOG.md index e2f987c..39a0a2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +## [0.9.2] + +### Fixed + +- Circular import issue ([#186](https://github.com/stac-utils/rustac-py/pull/186)) + ## [0.9.1] ### Added @@ -271,7 +277,8 @@ Non-functional release to fix releasing from Github actions. Initial release. -[Unreleased]: https://github.com/stac-utils/rustac-py/compare/v0.9.1...main +[Unreleased]: https://github.com/stac-utils/rustac-py/compare/v0.9.2...main +[0.9.2]: https://github.com/stac-utils/rustac-py/compare/v0.9.1...v0.9.2 [0.9.1]: https://github.com/stac-utils/rustac-py/compare/v0.9.0...v0.9.1 [0.9.0]: https://github.com/stac-utils/rustac-py/compare/v0.8.4...v0.9.0 [0.8.4]: https://github.com/stac-utils/rustac-py/compare/v0.8.3...v0.8.4 diff --git a/Cargo.lock b/Cargo.lock index 7eb7e56..451cd29 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -562,9 +562,9 @@ checksum = "dc0b364ead1874514c8c2855ab558056ebfeb775653e7ae45ff72f28f8f3166c" [[package]] name = "borsh" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8646f98db542e39fc66e68a20b2144f6a732636df7c2354e74645faaa433ce" +checksum = "d1da5ab77c1437701eeff7c88d968729e7766172279eab0676857b3d63af7a6f" dependencies = [ "borsh-derive", "cfg_aliases", @@ -572,9 +572,9 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdd1d3c0c2f5833f22386f252fe8ed005c7f59fdcddeef025c01b4c3b9fd9ac3" +checksum = "0686c856aa6aac0c4498f936d7d6a02df690f614c03e4d906d1018062b5c5e2c" dependencies = [ "once_cell", "proc-macro-crate", @@ -2834,12 +2834,11 @@ dependencies = [ [[package]] name = "pgstac" version = "0.3.2" -source = "git+https://github.com/stac-utils/rustac#cf0e815e03433e8ef219a79a67161174f3e99e84" +source = "git+https://github.com/stac-utils/rustac#d0f7405a811dd2c3b044404b4a6a48cf07926a89" dependencies = [ "serde", "serde_json", "stac", - "stac-api", "thiserror 2.0.17", "tokio-postgres", ] @@ -3616,7 +3615,7 @@ dependencies = [ [[package]] name = "rustac" version = "0.1.2" -source = "git+https://github.com/stac-utils/rustac#cf0e815e03433e8ef219a79a67161174f3e99e84" +source = "git+https://github.com/stac-utils/rustac#d0f7405a811dd2c3b044404b4a6a48cf07926a89" dependencies = [ "anyhow", "async-stream", @@ -3626,7 +3625,6 @@ dependencies = [ "futures-util", "serde_json", "stac", - "stac-api", "stac-duckdb", "stac-io", "stac-server", @@ -3640,7 +3638,7 @@ dependencies = [ [[package]] name = "rustac-py" -version = "0.9.1" +version = "0.9.2" dependencies = [ "cargo-lock", "clap", @@ -3662,7 +3660,6 @@ dependencies = [ "serde", "serde_json", "stac", - "stac-api", "stac-duckdb", "stac-io", "thiserror 2.0.17", @@ -4104,7 +4101,7 @@ checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "stac" version = "0.14.0" -source = "git+https://github.com/stac-utils/rustac#cf0e815e03433e8ef219a79a67161174f3e99e84" +source = "git+https://github.com/stac-utils/rustac#d0f7405a811dd2c3b044404b4a6a48cf07926a89" dependencies = [ "arrow-array", "arrow-cast", @@ -4112,6 +4109,7 @@ dependencies = [ "arrow-schema 56.2.0", "bytes", "chrono", + "cql2", "geo", "geo-traits", "geo-types", @@ -4125,6 +4123,7 @@ dependencies = [ "parquet", "serde", "serde_json", + "serde_urlencoded", "stac-derive", "thiserror 2.0.17", "tracing", @@ -4132,29 +4131,10 @@ dependencies = [ "wkb", ] -[[package]] -name = "stac-api" -version = "0.8.2" -source = "git+https://github.com/stac-utils/rustac#cf0e815e03433e8ef219a79a67161174f3e99e84" -dependencies = [ - "chrono", - "cql2", - "geo", - "geojson", - "indexmap 2.12.1", - "serde", - "serde_json", - "serde_urlencoded", - "stac", - "stac-derive", - "thiserror 2.0.17", - "url", -] - [[package]] name = "stac-derive" version = "0.3.0" -source = "git+https://github.com/stac-utils/rustac#cf0e815e03433e8ef219a79a67161174f3e99e84" +source = "git+https://github.com/stac-utils/rustac#d0f7405a811dd2c3b044404b4a6a48cf07926a89" dependencies = [ "quote", "syn 2.0.111", @@ -4163,7 +4143,7 @@ dependencies = [ [[package]] name = "stac-duckdb" version = "0.2.2" -source = "git+https://github.com/stac-utils/rustac#cf0e815e03433e8ef219a79a67161174f3e99e84" +source = "git+https://github.com/stac-utils/rustac#d0f7405a811dd2c3b044404b4a6a48cf07926a89" dependencies = [ "arrow-array", "arrow-schema 56.2.0", @@ -4177,14 +4157,13 @@ dependencies = [ "log", "serde_json", "stac", - "stac-api", "thiserror 2.0.17", ] [[package]] name = "stac-io" version = "0.1.2" -source = "git+https://github.com/stac-utils/rustac#cf0e815e03433e8ef219a79a67161174f3e99e84" +source = "git+https://github.com/stac-utils/rustac#d0f7405a811dd2c3b044404b4a6a48cf07926a89" dependencies = [ "async-stream", "bytes", @@ -4196,7 +4175,6 @@ dependencies = [ "serde", "serde_json", "stac", - "stac-api", "thiserror 2.0.17", "tokio", "tracing", @@ -4206,7 +4184,7 @@ dependencies = [ [[package]] name = "stac-server" version = "0.3.6" -source = "git+https://github.com/stac-utils/rustac#cf0e815e03433e8ef219a79a67161174f3e99e84" +source = "git+https://github.com/stac-utils/rustac#d0f7405a811dd2c3b044404b4a6a48cf07926a89" dependencies = [ "axum", "bb8", @@ -4220,7 +4198,6 @@ dependencies = [ "serde_json", "serde_urlencoded", "stac", - "stac-api", "stac-duckdb", "thiserror 2.0.17", "tokio-postgres", @@ -4233,7 +4210,7 @@ dependencies = [ [[package]] name = "stac-validate" version = "0.5.1" -source = "git+https://github.com/stac-utils/rustac#cf0e815e03433e8ef219a79a67161174f3e99e84" +source = "git+https://github.com/stac-utils/rustac#d0f7405a811dd2c3b044404b4a6a48cf07926a89" dependencies = [ "async-recursion", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index b4880f4..cfc3f0f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rustac-py" -version = "0.9.1" +version = "0.9.2" edition = "2024" publish = false @@ -35,7 +35,6 @@ rustac = { version = "0.1.1", features = ["pgstac"] } serde = "1.0.217" serde_json = { version = "1.0.138", features = ["preserve_order"] } stac = { version = "0.14.0", features = ["geoarrow", "geoparquet"] } -stac-api = "0.8.1" stac-duckdb = "0.2.1" stac-io = { version = "0.1.1", features = ["store-all", "geoparquet"] } thiserror = "2.0.12" diff --git a/src/error.rs b/src/error.rs index 46855b6..84ad65f 100644 --- a/src/error.rs +++ b/src/error.rs @@ -35,9 +35,6 @@ pub enum Error { #[error(transparent)] StacIo(#[from] stac_io::Error), - #[error(transparent)] - StacApi(#[from] stac_api::Error), - #[error(transparent)] StacDuckdb(#[from] stac_duckdb::Error), diff --git a/src/search.rs b/src/search.rs index 30f61bb..d093419 100644 --- a/src/search.rs +++ b/src/search.rs @@ -7,8 +7,8 @@ use pyo3::prelude::*; use pyo3::{Bound, FromPyObject, PyErr, PyResult, exceptions::PyValueError, types::PyDict}; use pyo3_object_store::AnyObjectStore; use serde_json::{Map, Value}; +use stac::api::{Fields, Filter, Items, Search, Sortby}; use stac::{Bbox, geoparquet::WriterOptions}; -use stac_api::{Fields, Filter, Items, Search, Sortby}; use stac_io::{Format, StacStore, api::Client}; use std::sync::Arc; use tokio::{pin, sync::Mutex}; @@ -226,7 +226,7 @@ fn search_duckdb( href: String, search: Search, max_items: Option, -) -> Result { +) -> Result { let value = stac_duckdb::search(&href, search, max_items)?; Ok(value) } @@ -235,7 +235,7 @@ async fn search_api( href: String, search: Search, max_items: Option, -) -> Result { +) -> Result { let stream = iter_search_api(href, search).await?; pin!(stream); let mut items = if let Some(max_items) = max_items { diff --git a/src/version.rs b/src/version.rs index 8712592..1593610 100644 --- a/src/version.rs +++ b/src/version.rs @@ -6,8 +6,6 @@ pub fn version(name: Option) -> Option { if let Some(name) = name { if name.eq_ignore_ascii_case("stac") { Some(stac::version().to_string()) - } else if name.eq_ignore_ascii_case("stac-api") { - Some(stac_api::version().to_string()) } else if name.eq_ignore_ascii_case("stac-duckdb") { Some(stac_duckdb::version().to_string()) } else { diff --git a/tests/test_version.py b/tests/test_version.py index ace63ab..c202266 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -4,7 +4,6 @@ def test_version() -> None: assert rustac.version() is not None assert rustac.version("stac") is not None - assert rustac.version("stac-api") is not None assert rustac.version("stac-duckdb") is not None