From f5cc7c6e1627618dc7077af54a9ec27286118ee5 Mon Sep 17 00:00:00 2001 From: alconley Date: Sun, 8 Dec 2024 17:17:36 -0500 Subject: [PATCH] Save histograms to root file using pythons uproot modified: .gitignore modified: Cargo.lock modified: Cargo.toml modified: src/histoer/histogrammer.rs --- .gitignore | 3 +- Cargo.lock | 980 ++++-------------------------------- Cargo.toml | 8 +- src/histoer/histogrammer.rs | 199 +++++--- 4 files changed, 225 insertions(+), 965 deletions(-) diff --git a/.gitignore b/.gitignore index 9e571de..f5bb61f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ /dist *.json *.yaml -.venv \ No newline at end of file +.venv +*.root \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 7d9654d..d2b897c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -229,18 +229,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf7d0a018de4f6aa429b9d33d69edf69072b1c5b1cb8d3e4a5f7ef898fc3eb76" -[[package]] -name = "arrayref" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" - -[[package]] -name = "arrayvec" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" - [[package]] name = "as-raw-xcb-connection" version = "1.0.1" @@ -456,9 +444,9 @@ dependencies = [ [[package]] name = "atoi_simd" -version = "0.15.6" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ae037714f313c1353189ead58ef9eec30a8e8dc101b2622d461418fd59e28a9" +checksum = "4790f9e8961209112beb783d85449b508673cf4a6a419c8449b210743ac4dbe9" [[package]] name = "atomic-waker" @@ -538,28 +526,6 @@ dependencies = [ "serde", ] -[[package]] -name = "blake3" -version = "1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8ee0c1824c4dea5b5f81736aff91bae041d2c07ee1192bec91054e10e3e601e" -dependencies = [ - "arrayref", - "arrayvec", - "cc", - "cfg-if", - "constant_time_eq", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - [[package]] name = "block2" version = "0.5.1" @@ -584,9 +550,9 @@ dependencies = [ [[package]] name = "brotli" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" +checksum = "cc97b8f16f944bba54f0433f07e30be199b6dc2bd25937444bbad560bcea29bd" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -729,15 +695,14 @@ dependencies = [ "android-tzdata", "iana-time-zone", "num-traits", - "serde", "windows-targets 0.52.6", ] [[package]] name = "chrono-tz" -version = "0.8.6" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59ae0466b83e838b81a54256c39d5d7c20b9d7daa10510a242d9b75abd5936e" +checksum = "cd6dd8046d00723a59a2f8c5f295c515b9bb9a331ee4f8f3d4dd49e428acd3b6" dependencies = [ "chrono", "chrono-tz-build", @@ -746,42 +711,14 @@ dependencies = [ [[package]] name = "chrono-tz-build" -version = "0.2.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433e39f13c9a060046954e0592a8d0a4bcb1040125cbf91cb8ee58964cfb350f" +checksum = "e94fea34d77a245229e7746bd2beb786cd2a896f306ff491fb8cecb3074b10a7" dependencies = [ "parse-zoneinfo", - "phf", "phf_codegen", ] -[[package]] -name = "ciborium" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" -dependencies = [ - "ciborium-io", - "ciborium-ll", - "serde", -] - -[[package]] -name = "ciborium-io" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" - -[[package]] -name = "ciborium-ll" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" -dependencies = [ - "ciborium-io", - "half", -] - [[package]] name = "clipboard-win" version = "5.4.0" @@ -857,12 +794,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "constant_time_eq" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" - [[package]] name = "core-foundation" version = "0.9.4" @@ -987,22 +918,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - [[package]] name = "cursor-icon" version = "1.1.0" @@ -1018,16 +933,6 @@ dependencies = [ "powerfmt", ] -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", -] - [[package]] name = "dispatch" version = "0.2.0" @@ -1060,12 +965,6 @@ dependencies = [ "libloading", ] -[[package]] -name = "doc-comment" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" - [[package]] name = "document-features" version = "0.2.10" @@ -1254,9 +1153,6 @@ name = "either" version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" -dependencies = [ - "serde", -] [[package]] name = "emath" @@ -1452,10 +1348,10 @@ dependencies = [ ] [[package]] -name = "fast-float" -version = "0.2.0" +name = "fast-float2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95765f67b4b18863968b4a1bd5bb576f732b29a4a28c7cd84c09fa3e2875f33c" +checksum = "f8eb564c5c7423d25c886fb561d1e4ee69f72354d16918afa32c08811f6b6a55" [[package]] name = "fastrand" @@ -1488,15 +1384,6 @@ dependencies = [ "miniz_oxide", ] -[[package]] -name = "float-cmp" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b09cf3155332e944990140d967ff5eceb70df778b34f77d8075db46e4704e6d8" -dependencies = [ - "num-traits", -] - [[package]] name = "float_next_after" version = "1.0.0" @@ -1551,16 +1438,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "fs4" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c6b3bd49c37d2aa3f3f2220233b29a7cd23f79d1fe70e5337d25fb390793de" -dependencies = [ - "rustix", - "windows-sys 0.52.0", -] - [[package]] name = "futures" version = "0.3.31" @@ -1663,16 +1540,6 @@ dependencies = [ "slab", ] -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - [[package]] name = "geo" version = "0.29.3" @@ -1837,45 +1704,6 @@ dependencies = [ "gl_generator", ] -[[package]] -name = "h2" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" -dependencies = [ - "atomic-waker", - "bytes", - "fnv", - "futures-core", - "futures-sink", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "half" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" -dependencies = [ - "cfg-if", - "crunchy", -] - -[[package]] -name = "halfbrown" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8588661a8607108a5ca69cab034063441a0413a0b041c13618a7dd348021ef6f" -dependencies = [ - "hashbrown 0.14.5", - "serde", -] - [[package]] name = "hash32" version = "0.3.1" @@ -1920,12 +1748,6 @@ dependencies = [ "stable_deref_trait", ] -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "heck" version = "0.5.0" @@ -1953,109 +1775,12 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "http" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" -dependencies = [ - "bytes", - "http", -] - -[[package]] -name = "http-body-util" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" -dependencies = [ - "bytes", - "futures-util", - "http", - "http-body", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" - [[package]] name = "humantime" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" -[[package]] -name = "hyper" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "itoa", - "pin-project-lite", - "smallvec", - "tokio", - "want", -] - -[[package]] -name = "hyper-rustls" -version = "0.27.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" -dependencies = [ - "futures-util", - "http", - "hyper", - "hyper-util", - "rustls", - "rustls-native-certs", - "rustls-pki-types", - "tokio", - "tokio-rustls", - "tower-service", -] - -[[package]] -name = "hyper-util" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http", - "http-body", - "hyper", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", -] - [[package]] name = "i_float" version = "1.6.0" @@ -2297,12 +2022,6 @@ version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" -[[package]] -name = "ipnet" -version = "2.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" - [[package]] name = "is_terminal_polyfill" version = "1.70.1" @@ -2500,31 +2219,12 @@ dependencies = [ "rawpointer", ] -[[package]] -name = "md-5" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" -dependencies = [ - "cfg-if", - "digest", -] - [[package]] name = "memchr" version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" -[[package]] -name = "memmap2" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f49388d20533534cd19360ad3d6a7dadc885944aa802ba3995040c5ec11288c6" -dependencies = [ - "libc", -] - [[package]] name = "memmap2" version = "0.9.5" @@ -2984,48 +2684,12 @@ dependencies = [ "memchr", ] -[[package]] -name = "object_store" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6da452820c715ce78221e8202ccc599b4a52f3e1eb3eedb487b680c81a8e3f3" -dependencies = [ - "async-trait", - "base64 0.22.1", - "bytes", - "chrono", - "futures", - "humantime", - "hyper", - "itertools 0.13.0", - "md-5", - "parking_lot", - "percent-encoding", - "quick-xml 0.36.2", - "rand", - "reqwest", - "ring", - "serde", - "serde_json", - "snafu", - "tokio", - "tracing", - "url", - "walkdir", -] - [[package]] name = "once_cell" version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - [[package]] name = "orbclient" version = "0.3.48" @@ -3228,9 +2892,9 @@ dependencies = [ [[package]] name = "polars" -version = "0.44.2" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f65c6aa86d991a64c95416a61202f7952da2f8cccefa448f9a23c1b8f2301ecc" +checksum = "5f0a108fffe97cb3a79aa87908ac88c56059cf2466e89ae304de163836a853a6" dependencies = [ "getrandom", "polars-arrow", @@ -3248,23 +2912,20 @@ dependencies = [ [[package]] name = "polars-arrow" -version = "0.44.2" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87dbb24d29ddea5abb73d7954df8b8d3d4bb7f02a3e5c96d1519cdad9e816a3d" +checksum = "c802be02fec184ca1873d933868c39d5ccd901018dab833c8ddf23749e4df278" dependencies = [ "ahash", "atoi", - "atoi_simd", "bytemuck", "chrono", "chrono-tz", "dyn-clone", "either", "ethnum", - "fast-float", "getrandom", "hashbrown 0.15.2", - "itoa", "itoap", "lz4", "multiversion", @@ -3274,8 +2935,6 @@ dependencies = [ "polars-error", "polars-schema", "polars-utils", - "ryu", - "serde", "simdutf8", "streaming-iterator", "strength_reduce", @@ -3296,25 +2955,31 @@ dependencies = [ [[package]] name = "polars-compute" -version = "0.44.2" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbdb1071147452a4c4b25560f23d2fbaffef255b04757291131b22fc2c0d35b2" +checksum = "92735f5939f97b418954a08d927058fed633792f7bb5292ab73010475b0d8d03" dependencies = [ + "atoi_simd", "bytemuck", + "chrono", "either", + "fast-float2", + "itoa", + "itoap", "num-traits", "polars-arrow", "polars-error", "polars-utils", + "ryu", "strength_reduce", "version_check", ] [[package]] name = "polars-core" -version = "0.44.2" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd5df9b55e614088a3270b06f8649dce76537c268d6b1ca4d9c37008b2be5949" +checksum = "03c4562086cd2da911a62e8cb25cf10cbf840ac7d77d985ec8a26e7e8e49b684" dependencies = [ "ahash", "bitflags 2.6.0", @@ -3326,6 +2991,7 @@ dependencies = [ "hashbrown 0.14.5", "hashbrown 0.15.2", "indexmap", + "itoa", "num-traits", "once_cell", "polars-arrow", @@ -3338,32 +3004,29 @@ dependencies = [ "rand_distr", "rayon", "regex", - "serde", - "serde_json", "strum_macros", - "thiserror 1.0.69", + "thiserror 2.0.4", "version_check", "xxhash-rust", ] [[package]] name = "polars-error" -version = "0.44.2" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4643898a644f30c83737db85f942f8c8956b0c11190b39afec745218eae1746b" +checksum = "d1f394c2c21f1bd3e14b5dfb6a7ebe5f4a5c215c24f74f4e971ccbdce098da63" dependencies = [ - "object_store", "polars-arrow-format", "regex", "simdutf8", - "thiserror 1.0.69", + "thiserror 2.0.4", ] [[package]] name = "polars-expr" -version = "0.44.2" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea1b431ed816cba1120cff200f06b962748001bbb2e615ce53cfbbdf701cc136" +checksum = "37c7c250b97c42a5195f3da6534727c1b6158ceb0f526d25d02f183b42760e6c" dependencies = [ "ahash", "bitflags 2.6.0", @@ -3385,77 +3048,46 @@ dependencies = [ [[package]] name = "polars-io" -version = "0.44.2" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2fab2c016635cb416b49461fd6419b0208c6c13a4fd065bd65e4a87dbb66314" +checksum = "f6d8662f5edb590528fb3bea10b4e7a8ca5387927f38b3a82ae3d772257e6c55" dependencies = [ "ahash", "async-trait", "atoi_simd", - "blake3", "bytes", "chrono", - "fast-float", - "fs4", + "fast-float2", "futures", "glob", "hashbrown 0.15.2", "home", "itoa", "memchr", - "memmap2 0.7.1", + "memmap2", "num-traits", - "object_store", "once_cell", "percent-encoding", "polars-arrow", "polars-core", "polars-error", - "polars-json", "polars-parquet", "polars-schema", "polars-time", "polars-utils", - "pyo3", "rayon", "regex", - "reqwest", "ryu", - "serde", - "serde_json", - "simd-json", "simdutf8", "tokio", "tokio-util", - "url", -] - -[[package]] -name = "polars-json" -version = "0.44.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5c8c057ef04feaf34b6ce52096bdea3a766fa4725f50442078c8a4ee86397bf" -dependencies = [ - "ahash", - "chrono", - "fallible-streaming-iterator", - "hashbrown 0.15.2", - "indexmap", - "itoa", - "num-traits", - "polars-arrow", - "polars-error", - "polars-utils", - "ryu", - "simd-json", - "streaming-iterator", ] [[package]] name = "polars-lazy" -version = "0.44.2" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a8ca74f42e7b47cad241b36b98d991cc7fbb51b8d0695a055eb937588d1f310" +checksum = "2080ff9c31975ced0aab4424c557a503e108417342618d506a9120f24e83d83e" dependencies = [ "ahash", "bitflags 2.6.0", @@ -3478,32 +3110,28 @@ dependencies = [ [[package]] name = "polars-mem-engine" -version = "0.44.2" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a32614e5b52c9b83856d80c7e2880b79d83055bfd59969bd1d0b148f9cfdc7a" +checksum = "ce2697d14830103d912d7b0cb6dbf2244a5bb0e0760d1828a7bc5fba566a93cb" dependencies = [ - "futures", - "memmap2 0.7.1", + "memmap2", "polars-arrow", "polars-core", "polars-error", "polars-expr", "polars-io", - "polars-json", "polars-ops", "polars-plan", "polars-time", "polars-utils", - "pyo3", "rayon", - "tokio", ] [[package]] name = "polars-ops" -version = "0.44.2" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "035c800fbe5bbd820afeb8313713ed345853bb014e0f821a4025d40cf0d60e1a" +checksum = "24e56e34b484eeb19a486a723525bb0367b2a73ba1d361f1cbe922b0e526f22f" dependencies = [ "ahash", "argminmax", @@ -3526,7 +3154,6 @@ dependencies = [ "rayon", "regex", "regex-syntax", - "serde", "strum_macros", "unicode-reverse", "version_check", @@ -3534,9 +3161,9 @@ dependencies = [ [[package]] name = "polars-parquet" -version = "0.44.2" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91dcf1d9f048079376949eaf2e24e240b313ff4a102fb83b57c9a5f807cdca52" +checksum = "02d683d41c377898b4e982a814e1bc1448b3dc01eedf6ea5a1322f68d56f9414" dependencies = [ "ahash", "async-stream", @@ -3554,7 +3181,6 @@ dependencies = [ "polars-error", "polars-parquet-format", "polars-utils", - "serde", "simdutf8", "snap", "streaming-decompression", @@ -3573,9 +3199,9 @@ dependencies = [ [[package]] name = "polars-pipe" -version = "0.44.2" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05936f2b3981eecb2fe74d8ef092bb75a93d2a056b3e4f339f4ac20c71c9e331" +checksum = "69cf63c2f7988390c6dc895202241431b638d8edcbef36122a0412673ac66fef" dependencies = [ "crossbeam-channel", "crossbeam-queue", @@ -3599,9 +3225,9 @@ dependencies = [ [[package]] name = "polars-plan" -version = "0.44.2" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23de436f33f4d1134c58f24e7059a221b957ec20730807e0ef0c80c8e4b3d06a" +checksum = "2c53fef25e54f0a603923730a8bf5dd65ed991a73bda7fd2f9c9e9ec4f3d71cf" dependencies = [ "ahash", "bitflags 2.6.0", @@ -3609,61 +3235,58 @@ dependencies = [ "bytes", "chrono", "chrono-tz", - "ciborium", "either", - "futures", "hashbrown 0.15.2", - "memmap2 0.7.1", + "memmap2", "num-traits", "once_cell", "percent-encoding", "polars-arrow", + "polars-compute", "polars-core", "polars-io", - "polars-json", "polars-ops", "polars-parquet", "polars-time", "polars-utils", - "pyo3", "rayon", "recursive", "regex", - "serde", "strum_macros", "version_check", ] [[package]] name = "polars-row" -version = "0.44.2" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3823d3de3e614509bba6929798f1f3d5ae05c1cdfc4eb7029d2ec6ad77201da2" +checksum = "087ac5ef877a56da4e9ef4280e08eb28f7916b2e1c578749798f03928c83ec09" dependencies = [ + "bitflags 2.6.0", "bytemuck", "polars-arrow", + "polars-compute", "polars-error", "polars-utils", ] [[package]] name = "polars-schema" -version = "0.44.2" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d88667f770291cefa2e8cd366a54f29dc6fe362e9a263914c903db411a58ac1d" +checksum = "21aa4bd255619a28b88478c5e683f9988e22a4dc99c62d137bd289479401c4f0" dependencies = [ "indexmap", "polars-error", "polars-utils", - "serde", "version_check", ] [[package]] name = "polars-sql" -version = "0.44.2" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69451f08363bb497407f6ebebe00bc01972a51716d20d115b75f9b5326f1f3c8" +checksum = "f4a8067044d13ed9354a89d2af2aa6f7a9c2bcb1ad1a425cdedd8d492972477d" dependencies = [ "hex", "once_cell", @@ -3683,15 +3306,15 @@ dependencies = [ [[package]] name = "polars-stream" -version = "0.44.2" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "188622b0a4bc4530cf91a288134254ffa065d18932e261075377914225e757c2" +checksum = "af1ea6090657846dc88833a9df5d33ae423e76746fd595ef89ef4169cd34a838" dependencies = [ "atomic-waker", "crossbeam-deque", "crossbeam-utils", "futures", - "memmap2 0.7.1", + "memmap2", "parking_lot", "pin-project-lite", "polars-core", @@ -3699,6 +3322,7 @@ dependencies = [ "polars-expr", "polars-io", "polars-mem-engine", + "polars-ops", "polars-parquet", "polars-plan", "polars-utils", @@ -3712,9 +3336,9 @@ dependencies = [ [[package]] name = "polars-time" -version = "0.44.2" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90f36e4d6b19f2c406faea585b9a1814f422fc5b310f65ccf8a55216df0754ef" +checksum = "f0753b41e88e0161f1a1e38bfe744936ea377dd4bfe4f0b596e5b9a4d0994cc6" dependencies = [ "atoi", "bytemuck", @@ -3723,20 +3347,20 @@ dependencies = [ "now", "once_cell", "polars-arrow", + "polars-compute", "polars-core", "polars-error", "polars-ops", "polars-utils", "regex", - "serde", "strum_macros", ] [[package]] name = "polars-utils" -version = "0.44.2" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96186b70bda00c90b5027bf2f69193c5c40571e80d3e8ec505c22cdc8e3e39aa" +checksum = "a193495a7f88c149b0f5afa8e96a9b41376034a33cbd436a95e86b963cc3e81b" dependencies = [ "ahash", "bytemuck", @@ -3745,14 +3369,13 @@ dependencies = [ "hashbrown 0.15.2", "indexmap", "libc", - "memmap2 0.7.1", + "memmap2", "num-traits", "once_cell", "polars-error", - "pyo3", + "rand", "raw-cpuid", "rayon", - "serde", "stacker", "sysinfo", "version_check", @@ -3829,15 +3452,15 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.21.2" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e00b96a521718e08e03b1a622f01c8a8deb50719335de3f60b3b3950f069d8" +checksum = "f402062616ab18202ae8319da13fa4279883a2b8a9d9f83f20dbade813ce1884" dependencies = [ "cfg-if", "indoc", "libc", "memoffset", - "parking_lot", + "once_cell", "portable-atomic", "pyo3-build-config", "pyo3-ffi", @@ -3847,9 +3470,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.21.2" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7883df5835fafdad87c0d888b266c8ec0f4c9ca48a5bed6bbb592e8dedee1b50" +checksum = "b14b5775b5ff446dd1056212d778012cbe8a0fbffd368029fd9e25b514479c38" dependencies = [ "once_cell", "target-lexicon", @@ -3857,9 +3480,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.21.2" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01be5843dc60b916ab4dad1dca6d20b9b4e6ddc8e15f50c47fe6d85f1fb97403" +checksum = "9ab5bcf04a2cdcbb50c7d6105de943f543f9ed92af55818fd17b660390fc8636" dependencies = [ "libc", "pyo3-build-config", @@ -3867,9 +3490,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.21.2" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77b34069fc0682e11b31dbd10321cbf94808394c56fd996796ce45217dfac53c" +checksum = "0fd24d897903a9e6d80b968368a34e1525aeb719d568dba8b3d4bfa5dc67d453" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -3879,11 +3502,11 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.21.2" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08260721f32db5e1a5beae69a55553f56b99bd0e1c3e6e0a5e8851a9d0f5a85c" +checksum = "36c011a03ba1e50152b4b394b479826cad97e7a21eb52df179cd91ac411cbfbe" dependencies = [ - "heck 0.4.1", + "heck", "proc-macro2", "pyo3-build-config", "quote", @@ -3906,59 +3529,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7649a7b4df05aed9ea7ec6f628c67c9953a43869b8bc50929569b2999d443fe" dependencies = [ "memchr", - "serde", -] - -[[package]] -name = "quinn" -version = "0.11.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef" -dependencies = [ - "bytes", - "pin-project-lite", - "quinn-proto", - "quinn-udp", - "rustc-hash", - "rustls", - "socket2", - "thiserror 2.0.4", - "tokio", - "tracing", -] - -[[package]] -name = "quinn-proto" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" -dependencies = [ - "bytes", - "getrandom", - "rand", - "ring", - "rustc-hash", - "rustls", - "rustls-pki-types", - "slab", - "thiserror 2.0.4", - "tinyvec", - "tracing", - "web-time", -] - -[[package]] -name = "quinn-udp" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a626c6807713b15cac82a6acaccd6043c9a5408c24baae07611fec3f243da" -dependencies = [ - "cfg_aliases", - "libc", - "once_cell", - "socket2", - "tracing", - "windows-sys 0.59.0", ] [[package]] @@ -4089,26 +3659,6 @@ dependencies = [ "bitflags 2.6.0", ] -[[package]] -name = "ref-cast" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf0a6f84d5f1d581da8b41b47ec8600871962f2a528115b542b362d4b744931" -dependencies = [ - "ref-cast-impl", -] - -[[package]] -name = "ref-cast-impl" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.90", -] - [[package]] name = "regex" version = "1.11.1" @@ -4138,51 +3688,6 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" -[[package]] -name = "reqwest" -version = "0.12.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" -dependencies = [ - "base64 0.22.1", - "bytes", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-rustls", - "hyper-util", - "ipnet", - "js-sys", - "log", - "mime", - "once_cell", - "percent-encoding", - "pin-project-lite", - "quinn", - "rustls", - "rustls-native-certs", - "rustls-pemfile", - "rustls-pki-types", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "tokio", - "tokio-rustls", - "tokio-util", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-streams", - "web-sys", - "windows-registry", -] - [[package]] name = "reverse" version = "0.2.2" @@ -4211,21 +3716,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "ring" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" -dependencies = [ - "cc", - "cfg-if", - "getrandom", - "libc", - "spin", - "untrusted", - "windows-sys 0.52.0", -] - [[package]] name = "robust" version = "1.1.0" @@ -4261,12 +3751,6 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" -[[package]] -name = "rustc-hash" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" - [[package]] name = "rustc_version" version = "0.4.1" @@ -4289,61 +3773,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rustls" -version = "0.23.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" -dependencies = [ - "once_cell", - "ring", - "rustls-pki-types", - "rustls-webpki", - "subtle", - "zeroize", -] - -[[package]] -name = "rustls-native-certs" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcff2dd52b58a8d98a70243663a0d234c4e2b79235637849d15913394a247d3" -dependencies = [ - "openssl-probe", - "rustls-pki-types", - "schannel", - "security-framework", -] - -[[package]] -name = "rustls-pemfile" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" -dependencies = [ - "rustls-pki-types", -] - -[[package]] -name = "rustls-pki-types" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" -dependencies = [ - "web-time", -] - -[[package]] -name = "rustls-webpki" -version = "0.102.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" -dependencies = [ - "ring", - "rustls-pki-types", - "untrusted", -] - [[package]] name = "rustversion" version = "1.0.18" @@ -4374,15 +3803,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "schannel" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" -dependencies = [ - "windows-sys 0.59.0", -] - [[package]] name = "scoped-tls" version = "1.0.1" @@ -4395,29 +3815,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "security-framework" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1415a607e92bec364ea2cf9264646dcce0f91e6d65281bd6f2819cca3bf39c8" -dependencies = [ - "bitflags 2.6.0", - "core-foundation 0.10.0", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "semver" version = "1.0.23" @@ -4467,18 +3864,6 @@ dependencies = [ "syn 2.0.90", ] -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - [[package]] name = "serde_yaml" version = "0.9.34+deprecated" @@ -4526,23 +3911,6 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" -[[package]] -name = "simd-json" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2bcf6c6e164e81bc7a5d49fc6988b3d515d9e8c07457d7b74ffb9324b9cd40" -dependencies = [ - "ahash", - "getrandom", - "halfbrown", - "once_cell", - "ref-cast", - "serde", - "serde_json", - "simdutf8", - "value-trait", -] - [[package]] name = "simdutf8" version = "0.1.5" @@ -4591,7 +3959,7 @@ dependencies = [ "cursor-icon", "libc", "log", - "memmap2 0.9.5", + "memmap2", "rustix", "thiserror 1.0.69", "wayland-backend", @@ -4624,28 +3992,6 @@ dependencies = [ "serde", ] -[[package]] -name = "snafu" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4de37ad025c587a29e8f3f5605c00f70b98715ef90b9061a815b9e59e9042d6" -dependencies = [ - "doc-comment", - "snafu-derive", -] - -[[package]] -name = "snafu-derive" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "990079665f075b699031e9c08fd3ab99be5029b96f3b78dc0709e8f77e4efebf" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "snap" version = "1.1.1" @@ -4704,17 +4050,11 @@ dependencies = [ "varpro", ] -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - [[package]] name = "sqlparser" -version = "0.49.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a404d0e14905361b918cb8afdb73605e25c1d5029312bd9785142dcb3aa49e" +checksum = "9a875d8cd437cc8a97e9aeaeea352ec9a19aea99c23e9effb17757291de80b08" dependencies = [ "log", ] @@ -4777,19 +4117,13 @@ version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", "rustversion", "syn 2.0.90", ] -[[package]] -name = "subtle" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" - [[package]] name = "syn" version = "1.0.109" @@ -4812,15 +4146,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "sync_wrapper" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" -dependencies = [ - "futures-core", -] - [[package]] name = "synstructure" version = "0.13.1" @@ -4856,9 +4181,9 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.31.4" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "355dbe4f8799b304b05e1b0f05fc59b2a18d36645cf169607da45bde2f69a1be" +checksum = "4c33cd241af0f2e9e3b5c32163b873b29956890b5342e6745b917ce9d490f4af" dependencies = [ "core-foundation-sys", "libc", @@ -4973,21 +4298,6 @@ dependencies = [ "zerovec", ] -[[package]] -name = "tinyvec" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "tokio" version = "1.42.0" @@ -5000,31 +4310,9 @@ dependencies = [ "mio", "pin-project-lite", "socket2", - "tokio-macros", "windows-sys 0.52.0", ] -[[package]] -name = "tokio-macros" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.90", -] - -[[package]] -name = "tokio-rustls" -version = "0.26.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" -dependencies = [ - "rustls", - "tokio", -] - [[package]] name = "tokio-util" version = "0.7.13" @@ -5055,12 +4343,6 @@ dependencies = [ "winnow", ] -[[package]] -name = "tower-service" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" - [[package]] name = "tracing" version = "0.1.41" @@ -5092,12 +4374,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - [[package]] name = "ttf-parser" version = "0.25.1" @@ -5166,12 +4442,6 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - [[package]] name = "url" version = "2.5.4" @@ -5217,18 +4487,6 @@ dependencies = [ "getrandom", ] -[[package]] -name = "value-trait" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9170e001f458781e92711d2ad666110f153e4e50bfd5cbd02db6547625714187" -dependencies = [ - "float-cmp", - "halfbrown", - "itoa", - "ryu", -] - [[package]] name = "varpro" version = "0.10.1" @@ -5258,15 +4516,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -5341,19 +4590,6 @@ version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49" -[[package]] -name = "wasm-streams" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" -dependencies = [ - "futures-util", - "js-sys", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "wayland-backend" version = "0.3.7" @@ -5569,7 +4805,7 @@ checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d" dependencies = [ "windows-implement", "windows-interface", - "windows-result 0.1.2", + "windows-result", "windows-targets 0.52.6", ] @@ -5595,17 +4831,6 @@ dependencies = [ "syn 2.0.90", ] -[[package]] -name = "windows-registry" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" -dependencies = [ - "windows-result 0.2.0", - "windows-strings", - "windows-targets 0.52.6", -] - [[package]] name = "windows-result" version = "0.1.2" @@ -5615,25 +4840,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-result" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-strings" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" -dependencies = [ - "windows-result 0.2.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows-sys" version = "0.45.0" @@ -5869,7 +5075,7 @@ dependencies = [ "dpi", "js-sys", "libc", - "memmap2 0.9.5", + "memmap2", "ndk", "objc2", "objc2-app-kit", @@ -6137,12 +5343,6 @@ dependencies = [ "synstructure", ] -[[package]] -name = "zeroize" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" - [[package]] name = "zerovec" version = "0.10.4" diff --git a/Cargo.toml b/Cargo.toml index 59b5ee5..7d3ba26 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ rust-version = "1.82.0" [package.metadata.docs.rs] all-features = true -targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"] +targets = ["x86_64-unknown-linux-gnu"] [dependencies] egui = "0.29.1" @@ -24,8 +24,8 @@ egui_extras = {version = "0.29.1", features = ["syntect"] } egui_file = "0.19" epaint = "0.29.1" env_logger = "0.11.5" -polars = { version = "0.44.2", features = ["lazy", "parquet", "performant"] } -polars-lazy = { version = "0.44.2", features = ["hist"] } +polars = { version = "0.45.0", features = ["lazy", "parquet", "performant"] } +polars-lazy = { version = "0.45.0"} rayon = "1.10.0" rfd = "0.15.1" serde_yaml = "0.9.31" @@ -36,7 +36,7 @@ varpro = "0.10.1" nalgebra = "0.33.2" compute = "0.2.3" find_peaks = "0.1.5" -pyo3 = { version = "0.21.0", features = ["auto-initialize"] } +pyo3 = { version = "0.22.0", features = ["auto-initialize"] } regex = "1.11.1" [profile.release] diff --git a/src/histoer/histogrammer.rs b/src/histoer/histogrammer.rs index 3b86bc7..92cc07f 100644 --- a/src/histoer/histogrammer.rs +++ b/src/histoer/histogrammer.rs @@ -608,6 +608,7 @@ impl Histogrammer { } } + #[allow(clippy::type_complexity)] pub fn hist1d_data(&self) -> Vec<(String, String, Vec, u64, u64, (f64, f64))> { let mut data = Vec::new(); for (_id, tile) in self.tree.tiles.iter() { @@ -631,6 +632,48 @@ impl Histogrammer { data } + #[allow(clippy::type_complexity)] + pub fn hist2d_data(&self) -> Vec<(String, String, Vec>, (f64, f64), (f64, f64))> { + let mut data = Vec::new(); + + for (_id, tile) in self.tree.tiles.iter() { + if let egui_tiles::Tile::Pane(Pane::Histogram2D(hist)) = tile { + let hist = hist.lock().unwrap(); + + // Use backup bins if available + let bins = hist.backup_bins.as_ref().unwrap_or(&hist.bins); + + let mut counts_2d = vec![vec![0; bins.x]; bins.y]; + + // Populate the counts, setting empty bins to 0 + for ((x_idx, y_idx), &count) in &bins.counts { + if *x_idx < bins.x && *y_idx < bins.y { + counts_2d[*y_idx][*x_idx] = count; + } + } + + // Extract the range for x and y axes + let range_x = (hist.range.x.min, hist.range.x.max); + let range_y = (hist.range.y.min, hist.range.y.max); + + // Create a human-readable title from the histogram name + let name_parts: Vec<&str> = hist.name.split('/').collect(); + let title = name_parts.last().unwrap_or(&"").to_string(); + + // Add to the data vector + data.push(( + hist.name.clone(), // Full histogram name + title, // Human-readable title + counts_2d, // 2D bin counts + range_x, // Range for x-axis + range_y, // Range for y-axis + )); + } + } + + data + } + pub fn ui(&mut self, ui: &mut egui::Ui) { self.tree.ui(&mut self.behavior, ui); } @@ -660,7 +703,26 @@ impl Histogrammer { ui.separator(); if ui.button("Create ROOT File").clicked() { - let _ = self.histograms_to_root(); + // Use rfd to open a file save dialog + let file_dialog = rfd::FileDialog::new() + .set_title("Save ROOT File") + .set_file_name("output.root") + .add_filter("ROOT file", &["root"]) + .save_file(); + + if let Some(path) = file_dialog { + // Convert path to a string and call the function + if let Some(output_file) = path.to_str() { + match self.histograms_to_root(output_file) { + Ok(_) => println!("ROOT file created at: {}", output_file), + Err(e) => eprintln!("Error creating ROOT file: {:?}", e), + } + } else { + eprintln!("Invalid file path selected."); + } + } else { + println!("File save dialog canceled."); + } } } }); @@ -950,7 +1012,7 @@ impl Histogrammer { } } - pub fn histograms_to_root(&mut self) -> PyResult<()> { + pub fn histograms_to_root(&mut self, output_file: &str) -> PyResult<()> { // python3 -m venv .venv // source .venv/bin/activate // export PYO3_PYTHON=$(pwd)/.venv/bin/python @@ -982,7 +1044,7 @@ impl Histogrammer { import numpy as np import uproot -def write_histograms(output_file, hist1d_data): +def write_histograms(output_file, hist1d_data, hist2d_data): """ Writes 1D and 2D histograms to a ROOT file. @@ -1042,10 +1104,64 @@ def write_histograms(output_file, hist1d_data): fSumw2=fSumw2, fXaxis=fXaxis ) - - print(f"1D Histogram '{name}' written successfully.") + # Write 2D histograms + for name, title, bins, range_x, range_y in hist2d_data: + bins = np.array(bins, dtype=np.float32) + # Flatten the 2D array with added underflow/overflow bins + bins_with_overflow = np.zeros((bins.shape[0] + 2, bins.shape[1] + 2), dtype=np.float32) + bins_with_overflow[1:-1, 1:-1] = bins + data = bins_with_overflow.flatten() + + x_bin_edges = np.linspace(range_x[0], range_x[1], bins.shape[1] + 1) + y_bin_edges = np.linspace(range_y[0], range_y[1], bins.shape[0] + 1) + + fXaxis = uproot.writing.identify.to_TAxis( + fName="xaxis", + fTitle="", + fNbins=bins.shape[1], + fXmin=range_x[0], + fXmax=range_x[1], + fXbins=x_bin_edges + ) + + fYaxis = uproot.writing.identify.to_TAxis( + fName="yaxis", + fTitle="", + fNbins=bins.shape[0], + fXmin=range_y[0], + fXmax=range_y[1], + fXbins=y_bin_edges + ) + # Compute required statistical sums + x_centers = (x_bin_edges[:-1] + x_bin_edges[1:]) / 2 + y_centers = (y_bin_edges[:-1] + y_bin_edges[1:]) / 2 + + fTsumw = np.sum(bins) + fTsumw2 = np.sum(bins**2) + fTsumwx = np.sum(bins * x_centers[np.newaxis, :]) + fTsumwx2 = np.sum(bins * (x_centers[np.newaxis, :]**2)) + fTsumwy = np.sum(bins * y_centers[:, np.newaxis]) + fTsumwy2 = np.sum(bins * (y_centers[:, np.newaxis]**2)) + fTsumwxy = np.sum(bins * x_centers[np.newaxis, :] * y_centers[:, np.newaxis]) + + file[name] = uproot.writing.identify.to_TH2x( + fName=None, + fTitle=title, + data=data, + fEntries=fTsumw, + fTsumw=fTsumw, + fTsumw2=fTsumw2, + fTsumwx=fTsumwx, + fTsumwx2=fTsumwx2, + fTsumwy=fTsumwy, + fTsumwy2=fTsumwy2, + fTsumwxy=fTsumwxy, + fSumw2=None, + fXaxis=fXaxis, + fYaxis=fYaxis + ) print(f"All histograms written to '{output_file}'.") "#; @@ -1054,77 +1170,20 @@ def write_histograms(output_file, hist1d_data): let module = PyModule::from_code_bound(py, code, "write_histograms.py", "write_histograms")?; - let output_file = "output.root"; - let hist1d_data = self.hist1d_data(); + let hist2d_data = self.hist2d_data(); - let _result = module - .getattr("get_1d_histograms")? - .call1((output_file, hist1d_data))?; + match module + .getattr("write_histograms")? + .call1((output_file, hist1d_data, hist2d_data)) + { + Ok(_) => println!("Histograms written successfully."), + Err(e) => eprintln!("Error in Python code: {:?}", e), + } Ok(()) }) } - - // # Write 2D histograms - // for name, title, bins, range_x, range_y in hist2d_data: - // bins = np.array(bins, dtype=np.float32) - // # Flatten the 2D array with added underflow/overflow bins - // bins_with_overflow = np.zeros((bins.shape[0] + 2, bins.shape[1] + 2), dtype=np.float32) - // bins_with_overflow[1:-1, 1:-1] = bins - // data = bins_with_overflow.flatten() - - // x_bin_edges = np.linspace(range_x[0], range_x[1], bins.shape[1] + 1) - // y_bin_edges = np.linspace(range_y[0], range_y[1], bins.shape[0] + 1) - - // fXaxis = uproot.writing.identify.to_TAxis( - // fName="xaxis", - // fTitle="X-axis", - // fNbins=bins.shape[1], - // fXmin=range_x[0], - // fXmax=range_x[1], - // fXbins=x_bin_edges - // ) - - // fYaxis = uproot.writing.identify.to_TAxis( - // fName="yaxis", - // fTitle="Y-axis", - // fNbins=bins.shape[0], - // fXmin=range_y[0], - // fXmax=range_y[1], - // fXbins=y_bin_edges - // ) - - // # Compute required statistical sums - // x_centers = (x_bin_edges[:-1] + x_bin_edges[1:]) / 2 - // y_centers = (y_bin_edges[:-1] + y_bin_edges[1:]) / 2 - - // fTsumw = np.sum(bins) - // fTsumw2 = np.sum(bins**2) - // fTsumwx = np.sum(bins * x_centers[np.newaxis, :]) - // fTsumwx2 = np.sum(bins * (x_centers[np.newaxis, :]**2)) - // fTsumwy = np.sum(bins * y_centers[:, np.newaxis]) - // fTsumwy2 = np.sum(bins * (y_centers[:, np.newaxis]**2)) - // fTsumwxy = np.sum(bins * x_centers[np.newaxis, :] * y_centers[:, np.newaxis]) - - // file[name] = uproot.writing.identify.to_TH2x( - // fName=None, - // fTitle=title, - // data=data, - // fEntries=fTsumw, - // fTsumw=fTsumw, - // fTsumw2=fTsumw2, - // fTsumwx=fTsumwx, - // fTsumwx2=fTsumwx2, - // fTsumwy=fTsumwy, - // fTsumwy2=fTsumwy2, - // fTsumwxy=fTsumwxy, - // fSumw2=None, - // fXaxis=fXaxis, - // fYaxis=fYaxis - // ) - - // print(f"2D Histogram '{name}' written successfully.") } use regex::Regex;