diff --git a/Cargo.lock b/Cargo.lock index e049787..ede1a25 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -140,9 +140,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.95" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" +checksum = "6b964d184e89d9b6b67dd2715bc8e74cf3107fb2b529990c90cf517326150bf4" [[package]] name = "approx" @@ -153,12 +153,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "arc-swap" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" - [[package]] name = "arrayvec" version = "0.7.6" @@ -2637,7 +2631,7 @@ dependencies = [ [[package]] name = "pgstac" version = "0.3.0" -source = "git+https://github.com/stac-utils/stac-rs#ec3b30e5da61ad0cc9e49a4e57f88c3d4072bd2c" +source = "git+https://github.com/stac-utils/stac-rs#1f5634cf27d020ef80987b22e7705561c3bbb979" dependencies = [ "serde", "serde_json", @@ -2867,17 +2861,6 @@ dependencies = [ "pyo3-build-config", ] -[[package]] -name = "pyo3-log" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be5bb22b77965a7b5394e9aae9897a0607b51df5167561ffc3b02643b4200bc7" -dependencies = [ - "arc-swap", - "log", - "pyo3", -] - [[package]] name = "pyo3-macros" version = "0.23.4" @@ -3009,7 +2992,7 @@ checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.1", - "zerocopy 0.8.18", + "zerocopy 0.8.20", ] [[package]] @@ -3048,7 +3031,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a88e0da7a2c97baa202165137c158d0a2e824ac465d13d81046727b34cb247d3" dependencies = [ "getrandom 0.3.1", - "zerocopy 0.8.18", + "zerocopy 0.8.20", ] [[package]] @@ -3465,18 +3448,18 @@ checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" [[package]] name = "serde" -version = "1.0.217" +version = "1.0.218" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" +checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.217" +version = "1.0.218" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" +checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b" dependencies = [ "proc-macro2", "quote", @@ -3485,9 +3468,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.138" +version = "1.0.139" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949" +checksum = "44f86c3acccc9c65b153fe1b85a3be07fe5515274ec9f0653b4a0875731c72a6" dependencies = [ "indexmap", "itoa", @@ -3649,7 +3632,7 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "stac" version = "0.12.0" -source = "git+https://github.com/stac-utils/stac-rs#ec3b30e5da61ad0cc9e49a4e57f88c3d4072bd2c" +source = "git+https://github.com/stac-utils/stac-rs#1f5634cf27d020ef80987b22e7705561c3bbb979" dependencies = [ "arrow-array", "arrow-cast", @@ -3680,7 +3663,7 @@ dependencies = [ [[package]] name = "stac-api" version = "0.7.1" -source = "git+https://github.com/stac-utils/stac-rs#ec3b30e5da61ad0cc9e49a4e57f88c3d4072bd2c" +source = "git+https://github.com/stac-utils/stac-rs#1f5634cf27d020ef80987b22e7705561c3bbb979" dependencies = [ "async-stream", "chrono", @@ -3705,35 +3688,28 @@ dependencies = [ [[package]] name = "stac-cli" -version = "0.5.1" -source = "git+https://github.com/stac-utils/stac-rs#ec3b30e5da61ad0cc9e49a4e57f88c3d4072bd2c" +version = "0.5.3" +source = "git+https://github.com/stac-utils/stac-rs#1f5634cf27d020ef80987b22e7705561c3bbb979" dependencies = [ "anyhow", "axum", "clap", "duckdb", "libduckdb-sys", - "object_store", - "reqwest", - "serde", "serde_json", "stac", "stac-api", "stac-duckdb", "stac-server", - "thiserror 2.0.11", "tokio", - "tokio-postgres", - "tokio-stream", "tracing", "tracing-subscriber", - "url", ] [[package]] name = "stac-derive" version = "0.2.0" -source = "git+https://github.com/stac-utils/stac-rs#ec3b30e5da61ad0cc9e49a4e57f88c3d4072bd2c" +source = "git+https://github.com/stac-utils/stac-rs#1f5634cf27d020ef80987b22e7705561c3bbb979" dependencies = [ "quote", "syn 2.0.98", @@ -3742,7 +3718,7 @@ dependencies = [ [[package]] name = "stac-duckdb" version = "0.1.1" -source = "git+https://github.com/stac-utils/stac-rs#ec3b30e5da61ad0cc9e49a4e57f88c3d4072bd2c" +source = "git+https://github.com/stac-utils/stac-rs#1f5634cf27d020ef80987b22e7705561c3bbb979" dependencies = [ "arrow", "chrono", @@ -3760,7 +3736,7 @@ dependencies = [ [[package]] name = "stac-server" version = "0.3.4" -source = "git+https://github.com/stac-utils/stac-rs#ec3b30e5da61ad0cc9e49a4e57f88c3d4072bd2c" +source = "git+https://github.com/stac-utils/stac-rs#1f5634cf27d020ef80987b22e7705561c3bbb979" dependencies = [ "axum", "bb8", @@ -3793,7 +3769,6 @@ dependencies = [ "libduckdb-sys", "pyo3", "pyo3-async-runtimes", - "pyo3-log", "pythonize", "serde", "serde_json", @@ -3803,7 +3778,6 @@ dependencies = [ "stac-duckdb", "thiserror 2.0.11", "tokio", - "tracing-subscriber", ] [[package]] @@ -4136,17 +4110,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-stream" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", -] - [[package]] name = "tokio-util" version = "0.7.13" @@ -4760,9 +4723,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59690dea168f2198d1a3b0cac23b8063efcd11012f10ae4698f284808c8ef603" +checksum = "0e7f4ea97f6f78012141bcdb6a216b2609f0979ada50b20ca5b52dde2eac2bb1" dependencies = [ "memchr", ] @@ -4893,11 +4856,11 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.18" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79386d31a42a4996e3336b0919ddb90f81112af416270cff95b5f5af22b839c2" +checksum = "dde3bb8c68a8f3f1ed4ac9221aad6b10cece3e60a8e2ea54a6a2dec806d0084c" dependencies = [ - "zerocopy-derive 0.8.18", + "zerocopy-derive 0.8.20", ] [[package]] @@ -4913,9 +4876,9 @@ dependencies = [ [[package]] name = "zerocopy-derive" -version = "0.8.18" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76331675d372f91bf8d17e13afbd5fe639200b73d01f0fc748bb059f9cca2db7" +checksum = "eea57037071898bf96a6da35fd626f4f27e9cee3ead2a6c703cf09d472b2e700" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 93e4ab2..1aa654e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,21 +21,19 @@ pyo3-async-runtimes = { version = "0.23.0", features = [ "tokio", "tokio-runtime", ] } -pyo3-log = "0.12.1" pythonize = "0.23.0" serde = "1.0.217" serde_json = "1.0.138" -stac = { version = "0.12.0", features = [ +stac = { features = [ "geoparquet-compression", "object-store-all", ], git = "https://github.com/stac-utils/stac-rs" } -stac-api = { version = "0.7.1", features = [ +stac-api = { features = [ "client", "python", ], git = "https://github.com/stac-utils/stac-rs" } -stac-cli = { version = "0.5.1", git = "https://github.com/stac-utils/stac-rs" } -stac-duckdb = { version = "0.1.0", git = "https://github.com/stac-utils/stac-rs" } +stac-cli = { git = "https://github.com/stac-utils/stac-rs" } +stac-duckdb = { git = "https://github.com/stac-utils/stac-rs" } thiserror = "2.0.11" clap = "4.5.30" -tracing-subscriber = "0.3.19" tokio = { version = "1.43.0", features = ["rt-multi-thread"] } diff --git a/scripts/test b/scripts/test index 9c73532..b45ba20 100755 --- a/scripts/test +++ b/scripts/test @@ -4,4 +4,4 @@ set -e uv run maturin dev --uv uv run pytest "$@" -uv run stacrs --help +uv run stacrs translate spec-examples/v1.1.0/simple-item.json /dev/null diff --git a/src/cli.rs b/src/cli.rs index 2034d4a..c18825f 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -9,16 +9,12 @@ pub fn main(py: Python<'_>) -> PyResult { .getattr("signal")? .call1((signal.getattr("SIGINT")?, signal.getattr("SIG_DFL")?))?; let args = Stacrs::parse_from(std::env::args_os().skip(1)); - tracing_subscriber::fmt() - .with_max_level(args.log_level()) - .init(); std::process::exit( tokio::runtime::Builder::new_multi_thread() .enable_all() .build() .unwrap() .block_on(async { - // We skip one because the first argument is going to be the python interpreter. match args.run().await { Ok(()) => 0, Err(err) => { diff --git a/src/duckdb.rs b/src/duckdb.rs index 6221249..bb833c3 100644 --- a/src/duckdb.rs +++ b/src/duckdb.rs @@ -19,6 +19,7 @@ impl DuckdbClient { let config = Config { use_s3_credential_chain, use_hive_partitioning, + convert_wkb: true, }; let client = Client::with_config(config)?; Ok(DuckdbClient(Mutex::new(client))) diff --git a/src/lib.rs b/src/lib.rs index 09e8612..c8eb101 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -18,8 +18,6 @@ type Result = std::result::Result; #[pymodule] fn stacrs(py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> { - pyo3_log::init(); - m.add("StacrsError", py.get_type::())?; m.add_class::()?;