From cd221b64723d90dab067de032aa840f6a118bc84 Mon Sep 17 00:00:00 2001 From: Stuart Lynn Date: Mon, 10 Jun 2024 10:58:55 +0100 Subject: [PATCH 01/22] Moving to worspace structure --- Cargo.lock | 173 +++------ Cargo.toml | 47 +-- {src => popgetter/src}/cli.rs | 0 {src => popgetter/src}/config.rs | 0 {src => popgetter/src}/data_request_spec.rs | 0 {src => popgetter/src}/display.rs | 0 {src => popgetter/src}/error.rs | 0 {src => popgetter/src}/formatters.rs | 0 {src => popgetter/src}/geo.rs | 0 {src => popgetter/src}/lib.rs | 0 {src => popgetter/src}/main.rs | 0 {src => popgetter/src}/metadata.rs | 0 {src => popgetter/src}/parquet.rs | 0 {src => popgetter/src}/search.rs | 0 popgetter_cli/Cargo.toml | 27 ++ popgetter_cli/src/cli.rs | 380 ++++++++++++++++++++ popgetter_cli/src/display.rs | 52 +++ popgetter_cli/src/main.rs | 40 +++ popgetter_py/Cargo.toml | 13 + 19 files changed, 566 insertions(+), 166 deletions(-) rename {src => popgetter/src}/cli.rs (100%) rename {src => popgetter/src}/config.rs (100%) rename {src => popgetter/src}/data_request_spec.rs (100%) rename {src => popgetter/src}/display.rs (100%) rename {src => popgetter/src}/error.rs (100%) rename {src => popgetter/src}/formatters.rs (100%) rename {src => popgetter/src}/geo.rs (100%) rename {src => popgetter/src}/lib.rs (100%) rename {src => popgetter/src}/main.rs (100%) rename {src => popgetter/src}/metadata.rs (100%) rename {src => popgetter/src}/parquet.rs (100%) rename {src => popgetter/src}/search.rs (100%) create mode 100644 popgetter_cli/Cargo.toml create mode 100644 popgetter_cli/src/cli.rs create mode 100644 popgetter_cli/src/display.rs create mode 100644 popgetter_cli/src/main.rs create mode 100644 popgetter_py/Cargo.toml diff --git a/Cargo.lock b/Cargo.lock index 43639f1..b5f3340 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -321,9 +321,9 @@ dependencies = [ [[package]] name = "async-signal" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "329972aa325176e89114919f2a80fdae4f4c040f66a370b1a1159c6c0f94e7aa" +checksum = "794f185324c2f00e771cd9f1ae8b5ac68be2ca7abb129a87afd6e86d228bc54d" dependencies = [ "async-io 2.3.3", "async-lock 3.4.0", @@ -573,9 +573,9 @@ checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "cc" -version = "1.0.98" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" +checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" dependencies = [ "jobserver", "libc", @@ -627,9 +627,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.4" +version = "4.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "a9689a29b593160de5bc4aacab7b5d54fb52231de70122626c178e6a368994c7" dependencies = [ "clap_builder", "clap_derive", @@ -637,9 +637,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "2e5387378c84f6faa26890ebf9f0a92989f8873d4d380467bcd0d8d8620424df" dependencies = [ "anstream", "anstyle", @@ -649,9 +649,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.4" +version = "4.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +checksum = "c780290ccf4fb26629baa7a1081e68ced113f1d3ec302fa5948f1c381ebf06c6" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -661,9 +661,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" [[package]] name = "colorchoice" @@ -2680,7 +2680,7 @@ dependencies = [ ] [[package]] -name = "popgetter_cli" +name = "popgetter" version = "0.1.0" dependencies = [ "anyhow", @@ -2707,12 +2707,36 @@ dependencies = [ "thiserror", "tokio", "toml", - "typify", "wkb", "wkt", "xdg", ] +[[package]] +name = "popgetter_cli" +version = "0.1.0" +dependencies = [ + "anyhow", + "clap", + "comfy-table", + "enum_dispatch", + "flatgeobuf", + "geozero", + "itertools 0.13.0", + "log", + "polars", + "popgetter", + "pretty_env_logger", + "reqwest 0.12.4", + "serde", + "serde_json", + "strum", + "strum_macros 0.26.4", + "tokio", + "toml", + "xdg", +] + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -2892,9 +2916,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.4" +version = "1.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" dependencies = [ "aho-corasick", "memchr", @@ -2904,9 +2928,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", @@ -2915,19 +2939,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" - -[[package]] -name = "regress" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f5f39ba4513916c1b2657b72af6ec671f091cd637992f58d0ede5cae4e5dea0" -dependencies = [ - "hashbrown", - "memchr", -] +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "reqwest" @@ -3180,30 +3194,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "schemars" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" -dependencies = [ - "dyn-clone", - "schemars_derive", - "serde", - "serde_json", -] - -[[package]] -name = "schemars_derive" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" -dependencies = [ - "proc-macro2", - "quote", - "serde_derive_internals", - "syn 2.0.66", -] - [[package]] name = "scopeguard" version = "1.2.0" @@ -3275,17 +3265,6 @@ dependencies = [ "syn 2.0.66", ] -[[package]] -name = "serde_derive_internals" -version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - [[package]] name = "serde_json" version = "1.0.117" @@ -3316,18 +3295,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_tokenstream" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a00ffd23fd882d096f09fcaae2a9de8329a328628e86027e049ee051dc1621f" -dependencies = [ - "proc-macro2", - "quote", - "serde", - "syn 2.0.66", -] - [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -3872,50 +3839,6 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" -[[package]] -name = "typify" -version = "0.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c61e9db210bbff218e6535c664b37ec47da449169b98e7866d0580d0db75529" -dependencies = [ - "typify-impl", - "typify-macro", -] - -[[package]] -name = "typify-impl" -version = "0.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95e32f38493804f88e2dc7a5412eccd872ea5452b4db9b0a77de4df180f2a87e" -dependencies = [ - "heck 0.4.1", - "log", - "proc-macro2", - "quote", - "regress", - "schemars", - "serde_json", - "syn 2.0.66", - "thiserror", - "unicode-ident", -] - -[[package]] -name = "typify-macro" -version = "0.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc09508b72f63d521d68e42c7f172c7416d67986df44b3c7d1f7f9963948ed32" -dependencies = [ - "proc-macro2", - "quote", - "schemars", - "serde", - "serde_json", - "serde_tokenstream", - "syn 2.0.66", - "typify-impl", -] - [[package]] name = "unicode-bidi" version = "0.3.15" @@ -3983,9 +3906,9 @@ dependencies = [ [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" @@ -4325,9 +4248,9 @@ checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" -version = "0.6.12" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ff33f391015ecab21cd092389215eb265ef9496a9a07b6bee7d3529831deda" +checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index 7057fe2..7332fde 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,43 +1,8 @@ -[package] -name = "popgetter_cli" -version = "0.1.0" -edition = "2021" +[workspace] -[lib] -name = "popgetter" -path = "src/lib.rs" +members = [ + "popgetter", + "popgetter_cli", +] -[dependencies] -anyhow = "1.0.75" -serde = { version = "1.0", features = ["derive"] } -serde_json = {version="1.0"} -tokio = { version = "1.30.0", features = ["full"] } -clap = { version = "4.5.0", features = ["derive"] } -polars = {version ="0.39.2", features = ["lazy","is_in","http","streaming", "parquet","polars-io","regex","strings","rows"]} -typify = "0.0.16" -chrono = {version="0.4.37", features=['serde']} -reqwest = {version = "0.12.3", features = ["json"]} -strum = "0.26" -strum_macros = "0.26" -enum_dispatch = "0.3" -flatgeobuf = "~4.1.0" -geozero = {version = "0.12.0", features= ["with-csv","with-geojson"]} -httpmock = "0.7.0-rc.1" -geojson={version="0.24.1", optional=true } -geo = "0.28.0" -wkt = "0.10.3" -wkb = "0.7.1" -log = "0.4.21" -pretty_env_logger = "0.5.0" -futures = "0.3.30" -toml = "0.8.13" -xdg = "2.5.2" -regex = "1.10.4" -itertools = "0.13.0" -comfy-table = "7.1.1" -thiserror = "1" - - -[features] -default = ["formatters"] -formatters= ["dep:geojson"] +resolver = "2" diff --git a/src/cli.rs b/popgetter/src/cli.rs similarity index 100% rename from src/cli.rs rename to popgetter/src/cli.rs diff --git a/src/config.rs b/popgetter/src/config.rs similarity index 100% rename from src/config.rs rename to popgetter/src/config.rs diff --git a/src/data_request_spec.rs b/popgetter/src/data_request_spec.rs similarity index 100% rename from src/data_request_spec.rs rename to popgetter/src/data_request_spec.rs diff --git a/src/display.rs b/popgetter/src/display.rs similarity index 100% rename from src/display.rs rename to popgetter/src/display.rs diff --git a/src/error.rs b/popgetter/src/error.rs similarity index 100% rename from src/error.rs rename to popgetter/src/error.rs diff --git a/src/formatters.rs b/popgetter/src/formatters.rs similarity index 100% rename from src/formatters.rs rename to popgetter/src/formatters.rs diff --git a/src/geo.rs b/popgetter/src/geo.rs similarity index 100% rename from src/geo.rs rename to popgetter/src/geo.rs diff --git a/src/lib.rs b/popgetter/src/lib.rs similarity index 100% rename from src/lib.rs rename to popgetter/src/lib.rs diff --git a/src/main.rs b/popgetter/src/main.rs similarity index 100% rename from src/main.rs rename to popgetter/src/main.rs diff --git a/src/metadata.rs b/popgetter/src/metadata.rs similarity index 100% rename from src/metadata.rs rename to popgetter/src/metadata.rs diff --git a/src/parquet.rs b/popgetter/src/parquet.rs similarity index 100% rename from src/parquet.rs rename to popgetter/src/parquet.rs diff --git a/src/search.rs b/popgetter/src/search.rs similarity index 100% rename from src/search.rs rename to popgetter/src/search.rs diff --git a/popgetter_cli/Cargo.toml b/popgetter_cli/Cargo.toml new file mode 100644 index 0000000..f35b03a --- /dev/null +++ b/popgetter_cli/Cargo.toml @@ -0,0 +1,27 @@ +[package] +name = "popgetter_cli" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +anyhow = "1.0.75" +serde = { version = "1.0", features = ["derive"] } +serde_json = {version="1.0"} +tokio = { version = "1.30.0", features = ["full"] } +clap = { version = "4.5.0", features = ["derive"] } +polars = {version ="0.39.2", features = ["lazy","is_in","http","streaming", "parquet","polars-io","regex","strings","rows"]} +reqwest = {version = "0.12.3", features = ["json"]} +enum_dispatch = "0.3" +flatgeobuf = "~4.1.0" +geozero = {version = "0.12.0", features= ["with-csv","with-geojson"]} +toml = "0.8.13" +popgetter= {path="../popgetter"} +comfy-table = "7.1.1" +itertools = "0.13.0" +strum_macros = "0.26.4" +xdg = "2.5.2" +log = "0.4.21" +pretty_env_logger = "0.5.0" +strum = "0.26" diff --git a/popgetter_cli/src/cli.rs b/popgetter_cli/src/cli.rs new file mode 100644 index 0000000..0a2416c --- /dev/null +++ b/popgetter_cli/src/cli.rs @@ -0,0 +1,380 @@ +// FromStr is required by EnumString. The compiler seems to not be able to +// see that and so is giving a warning. Dont remove it +use anyhow::Result; +use clap::{Args, Parser, Subcommand}; +use enum_dispatch::enum_dispatch; +use log::{debug, info}; +use popgetter::{ + config::Config, + data_request_spec::{BBox, DataRequestSpec, GeometrySpec, MetricSpec, RegionSpec}, + formatters::{ + CSVFormatter, GeoJSONFormatter, GeoJSONSeqFormatter, OutputFormatter, OutputGenerator, + }, + metadata::MetricId, + search::*, + Popgetter, +}; +use serde::{Deserialize, Serialize}; +use std::fs::{self, File}; +use strum_macros::EnumString; + +use crate::display::display_search_results; + +/// Defines the output formats we are able to produce data in. +#[derive(Clone, Debug, Deserialize, Serialize, EnumString, PartialEq, Eq)] +#[strum(ascii_case_insensitive)] +pub enum OutputFormat { + GeoJSON, + GeoJSONSeq, + Csv, + GeoParquet, + FlatGeobuf, +} + +/// Trait that defines what to run when a given subcommand is invoked. +#[enum_dispatch] +pub trait RunCommand { + async fn run(&self, config: Config) -> Result<()>; +} + +/// The Data command is the one we invoke to get a set of metrics and geometry +/// for some given region and set of metrics. Currently it takes two arguments +/// - bbox: A Bounding box +/// - metrics: A comma seperated list of metrics to retrive. +/// +/// The Data command can be converted into a `DataRequestSpec` which is the processed +/// by the core library. +#[derive(Args, Debug)] +pub struct DataCommand { + /// Only get data in bounding box ([min_lat,min_lng,max_lat,max_lng]) + #[arg( + short, + long, + allow_hyphen_values(true), + help = "Bounding box in which to get the results. Format is: min_lon, min_lat, max_lon, max_lat " + )] + bbox: Option, + /// Specify a metric by hxl + #[arg( + short = 'h', + long, + help = "Specify a metric by Humanitarian Exchange Language tag" + )] + hxl: Option>, + + // Specify a metric by id + #[arg( + short = 'i', + long, + help = "Specify a metric by uuid, can be a partial uuid" + )] + id: Option>, + + // Specify a metric by name + #[arg(short = 'n', long, help = "Specify a metric by Human readable name")] + name: Option>, + + /// Specify output format + #[arg(short = 'f', long, help = "One of GeoJSON, CSV, GeoJSONSeq")] + output_format: OutputFormat, + + /// Specify where the result should be saved + #[arg(short = 'o', long, help = "Output file to place the results")] + output_file: String, + + /// Specify the years we should get the result for + #[arg( + short = 'y', + long, + help = "Specify the year ranges for which you are interested in the metrics" + )] + years: Option>, +} + +impl DataCommand { + pub fn gather_metric_requests(&self) -> Vec { + let mut metric_ids: Vec = vec![]; + + if let Some(ids) = &self.id { + for id in ids { + metric_ids.push(MetricId::Id(id.clone())); + } + } + + if let Some(hxls) = &self.hxl { + for hxl in hxls { + metric_ids.push(MetricId::Hxl(hxl.clone())); + } + } + + if let Some(names) = &self.name { + for name in names { + metric_ids.push(MetricId::CommonName(name.clone())); + } + } + + metric_ids + } +} + +impl From<&OutputFormat> for OutputFormatter { + fn from(value: &OutputFormat) -> Self { + match value { + OutputFormat::GeoJSON => OutputFormatter::GeoJSON(GeoJSONFormatter), + OutputFormat::Csv => OutputFormatter::Csv(CSVFormatter::default()), + OutputFormat::GeoJSONSeq => OutputFormatter::GeoJSONSeq(GeoJSONSeqFormatter), + _ => todo!("output format not implemented"), + } + } +} + +impl From for OutputFormatter { + fn from(value: OutputFormat) -> Self { + Self::from(&value) + } +} + +impl RunCommand for DataCommand { + async fn run(&self, config: Config) -> Result<()> { + info!("Running `data` subcommand"); + + let popgetter = Popgetter::new_with_config(config).await?; + let data_request = DataRequestSpec::from(self); + let mut results = popgetter.get_data_request(&data_request).await?; + + debug!("{results:#?}"); + let mut f = File::create(&self.output_file)?; + let formatter: OutputFormatter = (&self.output_format).into(); + formatter.save(&mut f, &mut results)?; + + Ok(()) + } +} + +impl From<&DataCommand> for DataRequestSpec { + fn from(value: &DataCommand) -> Self { + let region = if let Some(bbox) = value.bbox.clone() { + vec![RegionSpec::BoundingBox(bbox)] + } else { + vec![] + }; + + let metrics = value + .gather_metric_requests() + .into_iter() + .map(MetricSpec::Metric) + .collect(); + + DataRequestSpec { + geometry: GeometrySpec::default(), + region, + metrics, + years: None, + } + } +} + +/// The Metrics command allows a user to search for a set of metrics by bounding box and filter. +/// The set of ways to search will likley increase over time +#[derive(Args, Debug)] +pub struct MetricsCommand { + #[arg( + short, + long, + value_name = "min_lat,min_lng,max_lat,max_lng", + help = "Bounding box in which to get the results" + )] + bbox: Option, + #[arg(short, long, help = "Filter by year")] + year: Option>, + #[arg(short, long, help = "Filter by geometry level")] + geometry_level: Option>, + #[arg(short, long, help = "Filter by source data release name")] + source_data_release: Option>, + #[arg(short, long, help = "Filter by data publisher name")] + publisher: Option>, + #[arg(short, long, help = "Filter by country")] + country: Option>, + #[arg( + long, + help = "Filter by source metric ID (i.e. the name of the table in the original data release)" + )] + source_metric_id: Option>, + // Filters for text + #[arg(long, help="Filter by HXL tag", num_args=0..)] + hxl: Vec, + #[arg(long, help="Filter by metric name", num_args=0..)] + name: Vec, + #[arg(long, help="Filter by metric description", num_args=0..)] + description: Vec, + #[arg(short, long, help="Filter by HXL tag, name, or description", num_args=0..)] + text: Vec, + // Output options + #[arg( + short, + long, + help = "Show all metrics even if there are a large number" + )] + full: bool, +} + +impl RunCommand for MetricsCommand { + async fn run(&self, config: Config) -> Result<()> { + info!("Running `metrics` subcommand"); + debug!("{:#?}", self); + + let mut all_text_searches: Vec = vec![]; + all_text_searches.extend(self.hxl.iter().map(|t| SearchText { + text: t.clone(), + context: vec![SearchContext::Hxl], + })); + all_text_searches.extend(self.name.iter().map(|t| SearchText { + text: t.clone(), + context: vec![SearchContext::HumanReadableName], + })); + all_text_searches.extend(self.description.iter().map(|t| SearchText { + text: t.clone(), + context: vec![SearchContext::Description], + })); + all_text_searches.extend(self.text.iter().map(|t| SearchText { + text: t.clone(), + context: SearchContext::all(), + })); + + let search_request = SearchRequest { + text: all_text_searches, + year: self.year.clone().map(Year), + geometry_level: self.geometry_level.clone().map(GeometryLevel), + source_data_release: self.source_data_release.clone().map(SourceDataRelease), + data_publisher: self.publisher.clone().map(DataPublisher), + country: self.country.clone().map(Country), + census_table: self.source_metric_id.clone().map(SourceMetricId), + }; + let popgetter = Popgetter::new_with_config(config).await?; + let metadata = popgetter.metadata; + let search_results = search_request.search_results(&metadata)?; + + let len_requests = search_results.0.shape().0; + println!("Found {} metrics.", len_requests); + + if len_requests > 50 && !self.full { + display_search_results(search_results, Some(50)); + println!( + "{} more results not shown. Use --full to show all results.", + len_requests - 50 + ); + } else { + display_search_results(search_results, None); + } + Ok(()) + } +} + +/// The Countries command should return information about the various countries we have data for. +/// This could include metrics like the number of surveys / metrics / geographies avaliable for each country. +#[derive(Args, Debug)] +pub struct CountriesCommand; + +impl RunCommand for CountriesCommand { + async fn run(&self, config: Config) -> Result<()> { + let _popgetter = Popgetter::new_with_config(config).await?; + Ok(()) + } +} + +/// The Surveys command should list the various surveys that popgetter has access to and releated +/// stastistics. +#[derive(Args, Debug)] +pub struct SurveysCommand; + +impl RunCommand for SurveysCommand { + async fn run(&self, config: Config) -> Result<()> { + info!("Running `surveys` subcommand"); + Ok(()) + } +} + +/// The Recipe command loads a recipy file and generates the output data requested +#[derive(Args, Debug)] +pub struct RecipeCommand { + #[arg(index = 1)] + recipe_file: String, + + #[arg(short = 'f', long)] + output_format: OutputFormat, + + #[arg(short = 'o', long)] + output_file: String, +} + +impl RunCommand for RecipeCommand { + async fn run(&self, config: Config) -> Result<()> { + let popgetter = Popgetter::new_with_config(config).await?; + let config = fs::read_to_string(&self.recipe_file)?; + let data_request: DataRequestSpec = serde_json::from_str(&config)?; + let mut results = popgetter.get_data_request(&data_request).await?; + println!("{results}"); + let formatter: OutputFormatter = (&self.output_format).into(); + let mut f = File::create(&self.output_file)?; + formatter.save(&mut f, &mut results)?; + Ok(()) + } +} + +/// The entrypoint for the CLI. +#[derive(Parser, Debug)] +#[command(version, about, long_about = None, name="popgetter", long_about="Popgetter is a tool to quickly get the data you need!")] +pub struct Cli { + #[command(subcommand)] + pub command: Option, +} + +/// Commands contains the list of subcommands avaliable for use in the CLI. +/// Each command should implmement the RunCommand trait and specify the list +/// of required args for that command. +#[derive(Subcommand, Debug)] +#[enum_dispatch(RunCommand)] +pub enum Commands { + /// List countries for which data are available + Countries(CountriesCommand), + /// Output data for a given region and set of metrics + Data(DataCommand), + /// List and filter available metrics. Multiple filters are applied conjunctively, i.e. this + /// command only returns metrics that match all filters. + Metrics(MetricsCommand), + /// Surveys + Surveys(SurveysCommand), + /// From recipe + Recipe(RecipeCommand), +} + +#[cfg(test)] +mod tests { + use std::str::FromStr; + + use super::*; + + #[test] + fn output_type_should_deserialize_properly() { + let output_format = OutputFormat::from_str("GeoJSON"); + assert_eq!( + output_format.unwrap(), + OutputFormat::GeoJSON, + "geojson format should be parsed correctly" + ); + let output_format = OutputFormat::from_str("GeoJson"); + assert_eq!( + output_format.unwrap(), + OutputFormat::GeoJSON, + "parsing should be case insensitive" + ); + let output_format = OutputFormat::from_str("geoparquet"); + assert_eq!( + output_format.unwrap(), + OutputFormat::GeoParquet, + "correct variants should parse correctly" + ); + let output_format = OutputFormat::from_str("awesome_tiny_model"); + assert!(output_format.is_err(), "non listed formats should fail"); + } +} diff --git a/popgetter_cli/src/display.rs b/popgetter_cli/src/display.rs new file mode 100644 index 0000000..ca0a28b --- /dev/null +++ b/popgetter_cli/src/display.rs @@ -0,0 +1,52 @@ +use comfy_table::{presets::NOTHING, *}; +use itertools::izip; +use popgetter::search::SearchResults; + +pub fn display_search_results(results: SearchResults, max_results: Option) { + let df_to_show = match max_results { + Some(max) => results.0.head(Some(max)), + None => results.0, + }; + + for (metric_id, hrn, desc, hxl, level) in izip!( + df_to_show.column("metric_id").unwrap().iter(), + df_to_show.column("human_readable_name").unwrap().iter(), + df_to_show.column("metric_description").unwrap().iter(), + df_to_show.column("metric_hxl_tag").unwrap().iter(), + df_to_show.column("geometry_level").unwrap().iter(), + ) { + let mut table = Table::new(); + table + .load_preset(NOTHING) + .set_content_arrangement(ContentArrangement::Dynamic) + .set_style(comfy_table::TableComponent::BottomBorder, '─') + .set_style(comfy_table::TableComponent::BottomBorderIntersections, '─') + .set_style(comfy_table::TableComponent::TopBorder, '─') + .set_style(comfy_table::TableComponent::TopBorderIntersections, '─') + .add_row(vec![ + Cell::new("Metric ID").add_attribute(Attribute::Bold), + metric_id.get_str().unwrap().into(), + ]) + .add_row(vec![ + Cell::new("Human readable name").add_attribute(Attribute::Bold), + hrn.get_str().unwrap().into(), + ]) + .add_row(vec![ + Cell::new("Description").add_attribute(Attribute::Bold), + desc.get_str().unwrap().into(), + ]) + .add_row(vec![ + Cell::new("HXL tag").add_attribute(Attribute::Bold), + hxl.get_str().unwrap().into(), + ]) + .add_row(vec![ + Cell::new("Geometry level").add_attribute(Attribute::Bold), + level.get_str().unwrap().into(), + ]); + + let column = table.column_mut(0).unwrap(); + column.set_cell_alignment(CellAlignment::Right); + + println!("\n{}", table); + } +} diff --git a/popgetter_cli/src/main.rs b/popgetter_cli/src/main.rs new file mode 100644 index 0000000..c3bda74 --- /dev/null +++ b/popgetter_cli/src/main.rs @@ -0,0 +1,40 @@ +mod cli; +mod display; + +use anyhow::Result; +use clap::Parser; +use cli::{Cli, RunCommand}; +use log::debug; +use popgetter::config::Config; + +#[tokio::main] +async fn main() -> Result<()> { + pretty_env_logger::init_timed(); + + let args = Cli::parse(); + debug!("args: {args:?}"); + let config: Config = read_config_from_toml(); + debug!("config: {config:?}"); + + if let Some(command) = args.command { + command.run(config).await?; + } + Ok(()) +} + +fn read_config_from_toml() -> Config { + // macOS: ~/.config/popgetter/config.toml + let xdg_dirs = xdg::BaseDirectories::with_prefix("popgetter").unwrap(); + let file_path = xdg_dirs.place_config_file("config.toml").unwrap(); + + match std::fs::read_to_string(file_path) { + Ok(contents) => toml::from_str(&contents).expect("Invalid TOML in config file"), + Err(e) => { + if e.kind() == std::io::ErrorKind::NotFound { + Config::default() + } else { + panic!("Error reading config file: {:#?}", e); + } + } + } +} diff --git a/popgetter_py/Cargo.toml b/popgetter_py/Cargo.toml new file mode 100644 index 0000000..1b651ec --- /dev/null +++ b/popgetter_py/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "popgetter_py" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[lib] +name = "popgetter_py" +crate-type = ["cdylib"] + +[dependencies] +pyo3 = "0.20.0" +pyo3-polars="0.14.0" From 661c1afb5a168b53f1e3935f9326713c07ce2c1e Mon Sep 17 00:00:00 2001 From: Stuart Lynn Date: Mon, 10 Jun 2024 11:36:37 +0100 Subject: [PATCH 02/22] Stubbing out python lib --- Cargo.lock | 373 ++- Cargo.toml | 1 + popgetter/Cargo.lock | 4435 +++++++++++++++++++++++++ popgetter/Cargo.toml | 42 + popgetter_py/.github/workflows/CI.yml | 118 + popgetter_py/.gitignore | 72 + popgetter_py/Cargo.toml | 3 +- popgetter_py/pyproject.toml | 15 + popgetter_py/src/lib.rs | 24 + 9 files changed, 5029 insertions(+), 54 deletions(-) create mode 100644 popgetter/Cargo.lock create mode 100644 popgetter/Cargo.toml create mode 100644 popgetter_py/.github/workflows/CI.yml create mode 100644 popgetter_py/.gitignore create mode 100644 popgetter_py/pyproject.toml create mode 100644 popgetter_py/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index b5f3340..f74d247 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1349,6 +1349,7 @@ dependencies = [ "ahash", "allocator-api2", "rayon", + "serde", ] [[package]] @@ -1661,6 +1662,12 @@ dependencies = [ "serde", ] +[[package]] +name = "indoc" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" + [[package]] name = "instant" version = "0.1.13" @@ -1901,6 +1908,15 @@ dependencies = [ "libc", ] +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + [[package]] name = "mime" version = "0.3.17" @@ -2280,16 +2296,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ea21b858b16b9c0e17a12db2800d11aa5b4bd182be6b3022eb537bbfc1f2db5" dependencies = [ "getrandom", - "polars-arrow", - "polars-core", - "polars-error", + "polars-arrow 0.39.2", + "polars-core 0.39.2", + "polars-error 0.39.2", "polars-io", "polars-lazy", "polars-ops", - "polars-parquet", + "polars-parquet 0.39.2", "polars-sql", "polars-time", - "polars-utils", + "polars-utils 0.39.2", + "version_check", +] + +[[package]] +name = "polars" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e148396dca5496566880fa19374f3f789a29db94e3eb458afac1497b4bac5442" +dependencies = [ + "getrandom", + "polars-arrow 0.40.0", + "polars-core 0.40.0", + "polars-error 0.40.0", + "polars-parquet 0.40.0", + "polars-utils 0.40.0", "version_check", ] @@ -2319,8 +2350,8 @@ dependencies = [ "multiversion", "num-traits", "polars-arrow-format", - "polars-error", - "polars-utils", + "polars-error 0.39.2", + "polars-utils 0.39.2", "ryu", "serde", "simdutf8", @@ -2330,6 +2361,36 @@ dependencies = [ "zstd", ] +[[package]] +name = "polars-arrow" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cb5e11cd0752ae022fa6ca3afa50a14b0301b7ce53c0135828fbb0f4fa8303e" +dependencies = [ + "ahash", + "atoi_simd", + "bytemuck", + "chrono", + "dyn-clone", + "either", + "ethnum", + "fast-float", + "foreign_vec", + "getrandom", + "hashbrown", + "itoa", + "multiversion", + "num-traits", + "polars-arrow-format", + "polars-error 0.40.0", + "polars-utils 0.40.0", + "ryu", + "simdutf8", + "streaming-iterator", + "strength_reduce", + "version_check", +] + [[package]] name = "polars-arrow-format" version = "0.1.0" @@ -2349,9 +2410,25 @@ dependencies = [ "bytemuck", "either", "num-traits", - "polars-arrow", - "polars-error", - "polars-utils", + "polars-arrow 0.39.2", + "polars-error 0.39.2", + "polars-utils 0.39.2", + "strength_reduce", + "version_check", +] + +[[package]] +name = "polars-compute" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89fc4578f826234cdecb782952aa9c479dc49373f81694a7b439c70b6f609ba0" +dependencies = [ + "bytemuck", + "either", + "num-traits", + "polars-arrow 0.40.0", + "polars-error 0.40.0", + "polars-utils 0.40.0", "strength_reduce", "version_check", ] @@ -2373,11 +2450,11 @@ dependencies = [ "indexmap", "num-traits", "once_cell", - "polars-arrow", - "polars-compute", - "polars-error", - "polars-row", - "polars-utils", + "polars-arrow 0.39.2", + "polars-compute 0.39.2", + "polars-error 0.39.2", + "polars-row 0.39.2", + "polars-utils 0.39.2", "rand", "rand_distr", "rayon", @@ -2389,6 +2466,32 @@ dependencies = [ "xxhash-rust", ] +[[package]] +name = "polars-core" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e490c6bace1366a558feea33d1846f749a8ca90bd72a6748752bc65bb4710b2a" +dependencies = [ + "ahash", + "bitflags 2.5.0", + "bytemuck", + "either", + "hashbrown", + "indexmap", + "num-traits", + "once_cell", + "polars-arrow 0.40.0", + "polars-compute 0.40.0", + "polars-error 0.40.0", + "polars-row 0.40.0", + "polars-utils 0.40.0", + "rayon", + "smartstring", + "thiserror", + "version_check", + "xxhash-rust", +] + [[package]] name = "polars-error" version = "0.39.2" @@ -2402,6 +2505,17 @@ dependencies = [ "thiserror", ] +[[package]] +name = "polars-error" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08888f58e61599b00f5ea0c2ccdc796b54b9859559cc0d4582733509451fa01a" +dependencies = [ + "polars-arrow-format", + "simdutf8", + "thiserror", +] + [[package]] name = "polars-io" version = "0.39.2" @@ -2423,12 +2537,12 @@ dependencies = [ "object_store", "once_cell", "percent-encoding", - "polars-arrow", - "polars-core", - "polars-error", - "polars-parquet", + "polars-arrow 0.39.2", + "polars-core 0.39.2", + "polars-error 0.39.2", + "polars-parquet 0.39.2", "polars-time", - "polars-utils", + "polars-utils 0.39.2", "rayon", "regex", "ryu", @@ -2452,14 +2566,14 @@ dependencies = [ "futures", "glob", "once_cell", - "polars-arrow", - "polars-core", + "polars-arrow 0.39.2", + "polars-core 0.39.2", "polars-io", "polars-ops", "polars-pipe", "polars-plan", "polars-time", - "polars-utils", + "polars-utils 0.39.2", "rayon", "smartstring", "tokio", @@ -2484,11 +2598,11 @@ dependencies = [ "indexmap", "memchr", "num-traits", - "polars-arrow", - "polars-compute", - "polars-core", - "polars-error", - "polars-utils", + "polars-arrow 0.39.2", + "polars-compute 0.39.2", + "polars-core 0.39.2", + "polars-error 0.39.2", + "polars-utils 0.39.2", "rayon", "regex", "smartstring", @@ -2512,9 +2626,9 @@ dependencies = [ "lz4", "num-traits", "parquet-format-safe", - "polars-arrow", - "polars-error", - "polars-utils", + "polars-arrow 0.39.2", + "polars-error 0.39.2", + "polars-utils 0.39.2", "seq-macro", "simdutf8", "snap", @@ -2522,6 +2636,25 @@ dependencies = [ "zstd", ] +[[package]] +name = "polars-parquet" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c70670a9e51cac66d0e77fd20b5cc957dbcf9f2660d410633862bb72f846d5b8" +dependencies = [ + "ahash", + "base64 0.22.1", + "ethnum", + "num-traits", + "parquet-format-safe", + "polars-arrow 0.40.0", + "polars-error 0.40.0", + "polars-utils 0.40.0", + "seq-macro", + "simdutf8", + "streaming-decompression", +] + [[package]] name = "polars-pipe" version = "0.39.2" @@ -2534,14 +2667,14 @@ dependencies = [ "futures", "hashbrown", "num-traits", - "polars-arrow", - "polars-compute", - "polars-core", + "polars-arrow 0.39.2", + "polars-compute 0.39.2", + "polars-core 0.39.2", "polars-io", "polars-ops", "polars-plan", - "polars-row", - "polars-utils", + "polars-row 0.39.2", + "polars-utils 0.39.2", "rayon", "smartstring", "tokio", @@ -2562,13 +2695,13 @@ dependencies = [ "hashbrown", "once_cell", "percent-encoding", - "polars-arrow", - "polars-core", + "polars-arrow 0.39.2", + "polars-core 0.39.2", "polars-io", "polars-ops", - "polars-parquet", + "polars-parquet 0.39.2", "polars-time", - "polars-utils", + "polars-utils 0.39.2", "rayon", "recursive", "regex", @@ -2584,9 +2717,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a515bdc68c2ae3702e3de70d89601f3b71ca8137e282a226dddb53ee4bacfa2e" dependencies = [ "bytemuck", - "polars-arrow", - "polars-error", - "polars-utils", + "polars-arrow 0.39.2", + "polars-error 0.39.2", + "polars-utils 0.39.2", +] + +[[package]] +name = "polars-row" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deb285f2f3a65b00dd06bef16bb9f712dbb5478f941dab5cf74f9f016d382e40" +dependencies = [ + "bytemuck", + "polars-arrow 0.40.0", + "polars-error 0.40.0", + "polars-utils 0.40.0", ] [[package]] @@ -2596,9 +2741,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b4bb7cc1c04c3023d1953b2f1dec50515e8fd8169a5a2bf4967b3b082232db7" dependencies = [ "hex", - "polars-arrow", - "polars-core", - "polars-error", + "polars-arrow 0.39.2", + "polars-core 0.39.2", + "polars-error 0.39.2", "polars-lazy", "polars-plan", "rand", @@ -2618,11 +2763,11 @@ dependencies = [ "chrono-tz", "now", "once_cell", - "polars-arrow", - "polars-core", - "polars-error", + "polars-arrow 0.39.2", + "polars-core 0.39.2", + "polars-error 0.39.2", "polars-ops", - "polars-utils", + "polars-utils 0.39.2", "regex", "smartstring", ] @@ -2639,7 +2784,7 @@ dependencies = [ "indexmap", "num-traits", "once_cell", - "polars-error", + "polars-error 0.39.2", "raw-cpuid", "rayon", "smartstring", @@ -2648,6 +2793,26 @@ dependencies = [ "version_check", ] +[[package]] +name = "polars-utils" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34e1a907c63abf71e5f21467e2e4ff748896c28196746f631c6c25512ec6102c" +dependencies = [ + "ahash", + "bytemuck", + "hashbrown", + "indexmap", + "num-traits", + "once_cell", + "polars-error 0.40.0", + "raw-cpuid", + "rayon", + "smartstring", + "stacker", + "version_check", +] + [[package]] name = "polling" version = "2.8.0" @@ -2696,7 +2861,7 @@ dependencies = [ "httpmock", "itertools 0.13.0", "log", - "polars", + "polars 0.39.2", "pretty_env_logger", "regex", "reqwest 0.12.4", @@ -2724,7 +2889,7 @@ dependencies = [ "geozero", "itertools 0.13.0", "log", - "polars", + "polars 0.39.2", "popgetter", "pretty_env_logger", "reqwest 0.12.4", @@ -2737,6 +2902,21 @@ dependencies = [ "xdg", ] +[[package]] +name = "popgetter_py" +version = "0.1.0" +dependencies = [ + "popgetter", + "pyo3", + "pyo3-polars", +] + +[[package]] +name = "portable-atomic" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -2777,6 +2957,81 @@ dependencies = [ "cc", ] +[[package]] +name = "pyo3" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e00b96a521718e08e03b1a622f01c8a8deb50719335de3f60b3b3950f069d8" +dependencies = [ + "cfg-if", + "indoc", + "libc", + "memoffset", + "parking_lot", + "portable-atomic", + "pyo3-build-config", + "pyo3-ffi", + "pyo3-macros", + "unindent", +] + +[[package]] +name = "pyo3-build-config" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7883df5835fafdad87c0d888b266c8ec0f4c9ca48a5bed6bbb592e8dedee1b50" +dependencies = [ + "once_cell", + "target-lexicon", +] + +[[package]] +name = "pyo3-ffi" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01be5843dc60b916ab4dad1dca6d20b9b4e6ddc8e15f50c47fe6d85f1fb97403" +dependencies = [ + "libc", + "pyo3-build-config", +] + +[[package]] +name = "pyo3-macros" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77b34069fc0682e11b31dbd10321cbf94808394c56fd996796ce45217dfac53c" +dependencies = [ + "proc-macro2", + "pyo3-macros-backend", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "pyo3-macros-backend" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08260721f32db5e1a5beae69a55553f56b99bd0e1c3e6e0a5e8851a9d0f5a85c" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "pyo3-build-config", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "pyo3-polars" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e726fef8618531b0ec1777f430a9225a909f9ffeacaad7bca7b43877fc3cd42" +dependencies = [ + "polars 0.40.0", + "polars-core 0.40.0", + "pyo3", + "thiserror", +] + [[package]] name = "quick-xml" version = "0.31.0" @@ -3602,6 +3857,12 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1bbb9f3c5c463a01705937a24fdabc5047929ac764b2d5b9cf681c1f5041ed5" +[[package]] +name = "target-lexicon" +version = "0.12.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" + [[package]] name = "tempfile" version = "3.10.1" @@ -3887,6 +4148,12 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +[[package]] +name = "unindent" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" + [[package]] name = "untrusted" version = "0.9.0" diff --git a/Cargo.toml b/Cargo.toml index 7332fde..9e68e11 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,7 @@ members = [ "popgetter", "popgetter_cli", + "popgetter_py" ] resolver = "2" diff --git a/popgetter/Cargo.lock b/popgetter/Cargo.lock new file mode 100644 index 0000000..43639f1 --- /dev/null +++ b/popgetter/Cargo.lock @@ -0,0 +1,4435 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "addr2line" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "getrandom", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "alloc-no-stdlib" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +dependencies = [ + "alloc-no-stdlib", +] + +[[package]] +name = "allocator-api2" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anstream" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" + +[[package]] +name = "anstyle-parse" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + +[[package]] +name = "anyhow" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" + +[[package]] +name = "approx" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" +dependencies = [ + "num-traits", +] + +[[package]] +name = "argminmax" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52424b59d69d69d5056d508b260553afd91c57e21849579cd1f50ee8b8b88eaa" +dependencies = [ + "num-traits", +] + +[[package]] +name = "array-init-cursor" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf7d0a018de4f6aa429b9d33d69edf69072b1c5b1cb8d3e4a5f7ef898fc3eb76" + +[[package]] +name = "ascii-canvas" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" +dependencies = [ + "term", +] + +[[package]] +name = "assert-json-diff" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47e4f2b81832e72834d7518d8487a0396a28cc408186a2e8854c0f98011faf12" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "async-attributes" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3203e79f4dd9bdda415ed03cf14dae5a2bf775c683a00f94e9cd1faf0f596e5" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener 2.5.3", + "futures-core", +] + +[[package]] +name = "async-channel" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-executor" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8828ec6e544c02b0d6691d21ed9f9218d0384a82542855073c2a3f58304aaf0" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand 2.1.0", + "futures-lite 2.3.0", + "slab", +] + +[[package]] +name = "async-global-executor" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" +dependencies = [ + "async-channel 2.3.1", + "async-executor", + "async-io 2.3.3", + "async-lock 3.4.0", + "blocking", + "futures-lite 2.3.0", + "once_cell", +] + +[[package]] +name = "async-io" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +dependencies = [ + "async-lock 2.8.0", + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-lite 1.13.0", + "log", + "parking", + "polling 2.8.0", + "rustix 0.37.27", + "slab", + "socket2 0.4.10", + "waker-fn", +] + +[[package]] +name = "async-io" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d6baa8f0178795da0e71bc42c9e5d13261aac7ee549853162e66a241ba17964" +dependencies = [ + "async-lock 3.4.0", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite 2.3.0", + "parking", + "polling 3.7.1", + "rustix 0.38.34", + "slab", + "tracing", + "windows-sys 0.52.0", +] + +[[package]] +name = "async-lock" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" +dependencies = [ + "event-listener 2.5.3", +] + +[[package]] +name = "async-lock" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" +dependencies = [ + "event-listener 5.3.1", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-object-pool" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aeb901c30ebc2fc4ab46395bbfbdba9542c16559d853645d75190c3056caf3bc" +dependencies = [ + "async-std", +] + +[[package]] +name = "async-process" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" +dependencies = [ + "async-io 1.13.0", + "async-lock 2.8.0", + "async-signal", + "blocking", + "cfg-if", + "event-listener 3.1.0", + "futures-lite 1.13.0", + "rustix 0.38.34", + "windows-sys 0.48.0", +] + +[[package]] +name = "async-signal" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "329972aa325176e89114919f2a80fdae4f4c040f66a370b1a1159c6c0f94e7aa" +dependencies = [ + "async-io 2.3.3", + "async-lock 3.4.0", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 0.38.34", + "signal-hook-registry", + "slab", + "windows-sys 0.52.0", +] + +[[package]] +name = "async-std" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" +dependencies = [ + "async-attributes", + "async-channel 1.9.0", + "async-global-executor", + "async-io 1.13.0", + "async-lock 2.8.0", + "async-process", + "crossbeam-utils", + "futures-channel", + "futures-core", + "futures-io", + "futures-lite 1.13.0", + "gloo-timers", + "kv-log-macro", + "log", + "memchr", + "once_cell", + "pin-project-lite", + "pin-utils", + "slab", + "wasm-bindgen-futures", +] + +[[package]] +name = "async-stream" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + +[[package]] +name = "async-trait" +version = "0.1.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "atoi" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" +dependencies = [ + "num-traits", +] + +[[package]] +name = "atoi_simd" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ae037714f313c1353189ead58ef9eec30a8e8dc101b2622d461418fd59e28a9" + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "backtrace" +version = "0.3.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17c6a35df3749d2e8bb1b7b21a976d82b15548788d2735b9d82f329268f71a11" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "basic-cookies" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67bd8fd42c16bdb08688243dc5f0cc117a3ca9efeeaba3a345a18a6159ad96f7" +dependencies = [ + "lalrpop", + "lalrpop-util", + "regex", +] + +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +dependencies = [ + "serde", +] + +[[package]] +name = "blocking" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" +dependencies = [ + "async-channel 2.3.1", + "async-task", + "futures-io", + "futures-lite 2.3.0", + "piper", +] + +[[package]] +name = "brotli" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d640d25bc63c50fb1f0b545ffd80207d2e10a4c965530809b40ba3386825c391" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "2.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "bytemuck" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78834c15cb5d5efe3452d58b1e8ba890dd62d21907f867f383358198e56ebca5" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" + +[[package]] +name = "cc" +version = "1.0.98" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" +dependencies = [ + "jobserver", + "libc", + "once_cell", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-targets 0.52.5", +] + +[[package]] +name = "chrono-tz" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59ae0466b83e838b81a54256c39d5d7c20b9d7daa10510a242d9b75abd5936e" +dependencies = [ + "chrono", + "chrono-tz-build", + "phf", +] + +[[package]] +name = "chrono-tz-build" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "433e39f13c9a060046954e0592a8d0a4bcb1040125cbf91cb8ee58964cfb350f" +dependencies = [ + "parse-zoneinfo", + "phf", + "phf_codegen", +] + +[[package]] +name = "clap" +version = "4.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "clap_lex" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" + +[[package]] +name = "colorchoice" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" + +[[package]] +name = "comfy-table" +version = "7.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b34115915337defe99b2aff5c2ce6771e5fbc4079f4b506301f5cf394c8452f7" +dependencies = [ + "crossterm", + "strum", + "strum_macros 0.26.4", + "unicode-width", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "crc32fast" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + +[[package]] +name = "crossterm" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" +dependencies = [ + "bitflags 2.5.0", + "crossterm_winapi", + "libc", + "parking_lot", + "winapi", +] + +[[package]] +name = "crossterm_winapi" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" +dependencies = [ + "winapi", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "csv" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" +dependencies = [ + "csv-core", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "csv-core" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" +dependencies = [ + "memchr", +] + +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if", + "dirs-sys-next", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "doc-comment" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" + +[[package]] +name = "dyn-clone" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" + +[[package]] +name = "earcutr" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79127ed59a85d7687c409e9978547cffb7dc79675355ed22da6b66fd5f6ead01" +dependencies = [ + "itertools 0.11.0", + "num-traits", +] + +[[package]] +name = "either" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" + +[[package]] +name = "ena" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d248bdd43ce613d87415282f69b9bb99d947d290b10962dd6c56233312c2ad5" +dependencies = [ + "log", +] + +[[package]] +name = "encoding_rs" +version = "0.8.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "enum_dispatch" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" +dependencies = [ + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "env_logger" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" +dependencies = [ + "humantime", + "is-terminal", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "ethnum" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b90ca2580b73ab6a1f724b76ca11ab632df820fd6040c336200d2c1df7b3c82c" + +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "event-listener" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener" +version = "5.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" +dependencies = [ + "event-listener 5.3.1", + "pin-project-lite", +] + +[[package]] +name = "fallible-streaming-iterator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" + +[[package]] +name = "fast-float" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95765f67b4b18863968b4a1bd5bb576f732b29a4a28c7cd84c09fa3e2875f33c" + +[[package]] +name = "fastrand" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +dependencies = [ + "instant", +] + +[[package]] +name = "fastrand" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" + +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + +[[package]] +name = "flatbuffers" +version = "23.5.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dac53e22462d78c16d64a1cd22371b54cc3fe94aa15e7886a2fa6e5d1ab8640" +dependencies = [ + "bitflags 1.3.2", + "rustc_version", +] + +[[package]] +name = "flate2" +version = "1.0.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "flatgeobuf" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b7d486286d0fc946e00b0133fa2ded824e08f03412450e5d9a1f446abcd589d" +dependencies = [ + "byteorder", + "bytes", + "fallible-streaming-iterator", + "flatbuffers", + "geozero", + "http-range-client", + "log", + "reqwest 0.11.27", + "tempfile", +] + +[[package]] +name = "float_next_after" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bf7cc16383c4b8d58b9905a8509f02926ce3058053c056376248d958c9df1e8" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "foreign_vec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee1b05cbd864bcaecbd3455d6d967862d446e4ebfc3c2e5e5b9841e53cba6673" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + +[[package]] +name = "futures-executor" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" + +[[package]] +name = "futures-lite" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +dependencies = [ + "fastrand 1.9.0", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite", + "waker-fn", +] + +[[package]] +name = "futures-lite" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" +dependencies = [ + "fastrand 2.1.0", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + +[[package]] +name = "futures-macro" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "futures-sink" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" + +[[package]] +name = "futures-task" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "geo" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f811f663912a69249fa620dcd2a005db7254529da2d8a0b23942e81f47084501" +dependencies = [ + "earcutr", + "float_next_after", + "geo-types", + "geographiclib-rs", + "log", + "num-traits", + "robust", + "rstar", + "spade", +] + +[[package]] +name = "geo-types" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ff16065e5720f376fbced200a5ae0f47ace85fd70b7e54269790281353b6d61" +dependencies = [ + "approx", + "num-traits", + "rstar", + "serde", +] + +[[package]] +name = "geographiclib-rs" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e5ed84f8089c70234b0a8e0aedb6dc733671612ddc0d37c6066052f9781960" +dependencies = [ + "libm", +] + +[[package]] +name = "geojson" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5d728c1df1fbf328d74151efe6cb0586f79ee813346ea981add69bd22c9241b" +dependencies = [ + "geo-types", + "log", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "geozero" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61d25cc15c7e5b86cd8dadea56bb78c46f346d4fb09022e7cbba0839c890d0a1" +dependencies = [ + "csv", + "geo-types", + "geojson", + "log", + "serde_json", + "thiserror", + "wkt", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "gimli" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "gloo-timers" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "h2" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 0.2.12", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.1.0", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hash32" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" +dependencies = [ + "byteorder", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", + "rayon", +] + +[[package]] +name = "heapless" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" +dependencies = [ + "hash32", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http 0.2.12", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +dependencies = [ + "bytes", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" +dependencies = [ + "bytes", + "futures-core", + "http 1.1.0", + "http-body 1.0.0", + "pin-project-lite", +] + +[[package]] +name = "http-range-client" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c724cf94381bf0f09a60c980ae732d1f2859ee2a98a0d6bce68ae509f915785c" +dependencies = [ + "async-trait", + "byteorder", + "bytes", + "read-logger", + "reqwest 0.11.27", + "thiserror", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "httpmock" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08ec9586ee0910472dec1a1f0f8acf52f0fdde93aea74d70d4a3107b4be0fd5b" +dependencies = [ + "assert-json-diff", + "async-object-pool", + "async-std", + "async-trait", + "base64 0.21.7", + "basic-cookies", + "crossbeam-utils", + "form_urlencoded", + "futures-util", + "hyper 0.14.29", + "lazy_static", + "levenshtein", + "log", + "regex", + "serde", + "serde_json", + "serde_regex", + "similar", + "tokio", + "url", +] + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "hyper" +version = "0.14.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2 0.5.7", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2 0.4.5", + "http 1.1.0", + "http-body 1.0.0", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http 0.2.12", + "hyper 0.14.29", + "rustls", + "tokio", + "tokio-rustls", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper 0.14.29", + "native-tls", + "tokio", + "tokio-native-tls", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper 1.3.1", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b875924a60b96e5d7b9ae7b066540b1dd1cbd90d1828f54c92e02a283351c56" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "hyper 1.3.1", + "pin-project-lite", + "socket2 0.5.7", + "tokio", + "tower", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown", + "serde", +] + +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "io-lifetimes" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +dependencies = [ + "hermit-abi", + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[package]] +name = "is-terminal" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +dependencies = [ + "hermit-abi", + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" + +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "itoap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9028f49264629065d057f340a86acb84867925865f73bbf8d47b4d149a7e88b8" + +[[package]] +name = "jobserver" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "kv-log-macro" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" +dependencies = [ + "log", +] + +[[package]] +name = "lalrpop" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" +dependencies = [ + "ascii-canvas", + "bit-set", + "ena", + "itertools 0.11.0", + "lalrpop-util", + "petgraph", + "pico-args", + "regex", + "regex-syntax", + "string_cache", + "term", + "tiny-keccak", + "unicode-xid", + "walkdir", +] + +[[package]] +name = "lalrpop-util" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" +dependencies = [ + "regex-automata", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "levenshtein" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db13adb97ab515a3691f56e4dbab09283d0b86cb45abd991d8634a9d6f501760" + +[[package]] +name = "libc" +version = "0.2.155" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" + +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.5.0", + "libc", +] + +[[package]] +name = "linux-raw-sys" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +dependencies = [ + "value-bag", +] + +[[package]] +name = "lz4" +version = "1.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1" +dependencies = [ + "libc", + "lz4-sys", +] + +[[package]] +name = "lz4-sys" +version = "1.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "memchr" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" + +[[package]] +name = "memmap2" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f49388d20533534cd19360ad3d6a7dadc885944aa802ba3995040c5ec11288c6" +dependencies = [ + "libc", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.48.0", +] + +[[package]] +name = "multiversion" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4851161a11d3ad0bf9402d90ffc3967bf231768bfd7aeb61755ad06dbf1a142" +dependencies = [ + "multiversion-macros", + "target-features", +] + +[[package]] +name = "multiversion-macros" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79a74ddee9e0c27d2578323c13905793e91622148f138ba29738f9dddb835e90" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "target-features", +] + +[[package]] +name = "native-tls" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[package]] +name = "now" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d89e9874397a1f0a52fc1f197a8effd9735223cb2390e9dcc83ac6cd02923d0" +dependencies = [ + "chrono", +] + +[[package]] +name = "ntapi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" +dependencies = [ + "winapi", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.35.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8ec7ab813848ba4522158d5517a6093db1ded27575b070f4177b8d12b41db5e" +dependencies = [ + "memchr", +] + +[[package]] +name = "object_store" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8718f8b65fdf67a45108d1548347d4af7d71fb81ce727bbf9e3b2535e079db3" +dependencies = [ + "async-trait", + "base64 0.21.7", + "bytes", + "chrono", + "futures", + "humantime", + "hyper 0.14.29", + "itertools 0.12.1", + "parking_lot", + "percent-encoding", + "quick-xml", + "rand", + "reqwest 0.11.27", + "ring", + "serde", + "serde_json", + "snafu", + "tokio", + "tracing", + "url", + "walkdir", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "openssl" +version = "0.10.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +dependencies = [ + "bitflags 2.5.0", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "parking" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" + +[[package]] +name = "parking_lot" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.52.5", +] + +[[package]] +name = "parquet-format-safe" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1131c54b167dd4e4799ce762e1ab01549ebb94d5bdd13e6ec1b467491c378e1f" +dependencies = [ + "async-trait", + "futures", +] + +[[package]] +name = "parse-zoneinfo" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f2a05b18d44e2957b88f96ba460715e295bc1d7510468a2f3d3b44535d26c24" +dependencies = [ + "regex", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "petgraph" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" +dependencies = [ + "fixedbitset", + "indexmap", +] + +[[package]] +name = "phf" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +dependencies = [ + "phf_shared 0.11.2", +] + +[[package]] +name = "phf_codegen" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" +dependencies = [ + "phf_generator", + "phf_shared 0.11.2", +] + +[[package]] +name = "phf_generator" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +dependencies = [ + "phf_shared 0.11.2", + "rand", +] + +[[package]] +name = "phf_shared" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +dependencies = [ + "siphasher", +] + +[[package]] +name = "phf_shared" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pico-args" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" + +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "piper" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae1d5c74c9876f070d3e8fd503d748c7d974c3e48da8f41350fa5222ef9b4391" +dependencies = [ + "atomic-waker", + "fastrand 2.1.0", + "futures-io", +] + +[[package]] +name = "pkg-config" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" + +[[package]] +name = "planus" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1691dd09e82f428ce8d6310bd6d5da2557c82ff17694d2a32cad7242aea89f" +dependencies = [ + "array-init-cursor", +] + +[[package]] +name = "polars" +version = "0.39.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea21b858b16b9c0e17a12db2800d11aa5b4bd182be6b3022eb537bbfc1f2db5" +dependencies = [ + "getrandom", + "polars-arrow", + "polars-core", + "polars-error", + "polars-io", + "polars-lazy", + "polars-ops", + "polars-parquet", + "polars-sql", + "polars-time", + "polars-utils", + "version_check", +] + +[[package]] +name = "polars-arrow" +version = "0.39.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "725b09f2b5ef31279b66e27bbab63c58d49d8f6696b66b1f46c7eaab95e80f75" +dependencies = [ + "ahash", + "atoi", + "atoi_simd", + "bytemuck", + "chrono", + "chrono-tz", + "dyn-clone", + "either", + "ethnum", + "fast-float", + "foreign_vec", + "futures", + "getrandom", + "hashbrown", + "itoa", + "itoap", + "lz4", + "multiversion", + "num-traits", + "polars-arrow-format", + "polars-error", + "polars-utils", + "ryu", + "serde", + "simdutf8", + "streaming-iterator", + "strength_reduce", + "version_check", + "zstd", +] + +[[package]] +name = "polars-arrow-format" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b0ef2474af9396b19025b189d96e992311e6a47f90c53cd998b36c4c64b84c" +dependencies = [ + "planus", + "serde", +] + +[[package]] +name = "polars-compute" +version = "0.39.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a796945b14b14fbb79b91ef0406e6fddca2be636e889f81ea5d6ee7d36efb4fe" +dependencies = [ + "bytemuck", + "either", + "num-traits", + "polars-arrow", + "polars-error", + "polars-utils", + "strength_reduce", + "version_check", +] + +[[package]] +name = "polars-core" +version = "0.39.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "465f70d3e96b6d0b1a43c358ba451286b8c8bd56696feff020d65702aa33e35c" +dependencies = [ + "ahash", + "bitflags 2.5.0", + "bytemuck", + "chrono", + "chrono-tz", + "comfy-table", + "either", + "hashbrown", + "indexmap", + "num-traits", + "once_cell", + "polars-arrow", + "polars-compute", + "polars-error", + "polars-row", + "polars-utils", + "rand", + "rand_distr", + "rayon", + "regex", + "serde", + "smartstring", + "thiserror", + "version_check", + "xxhash-rust", +] + +[[package]] +name = "polars-error" +version = "0.39.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5224d5d05e6b8a6f78b75951ae1b5f82c8ab1979e11ffaf5fd41941e3d5b0757" +dependencies = [ + "object_store", + "polars-arrow-format", + "regex", + "simdutf8", + "thiserror", +] + +[[package]] +name = "polars-io" +version = "0.39.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2c8589e418cbe4a48228d64b2a8a40284a82ec3c98817c0c2bcc0267701338b" +dependencies = [ + "ahash", + "async-trait", + "atoi_simd", + "bytes", + "chrono", + "fast-float", + "futures", + "home", + "itoa", + "memchr", + "memmap2", + "num-traits", + "object_store", + "once_cell", + "percent-encoding", + "polars-arrow", + "polars-core", + "polars-error", + "polars-parquet", + "polars-time", + "polars-utils", + "rayon", + "regex", + "ryu", + "serde", + "serde_json", + "simdutf8", + "smartstring", + "tokio", + "tokio-util", + "url", +] + +[[package]] +name = "polars-lazy" +version = "0.39.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b2632b1af668e2058d5f8f916d8fbde3cac63d03ae29a705f598e41dcfeb7f" +dependencies = [ + "ahash", + "bitflags 2.5.0", + "futures", + "glob", + "once_cell", + "polars-arrow", + "polars-core", + "polars-io", + "polars-ops", + "polars-pipe", + "polars-plan", + "polars-time", + "polars-utils", + "rayon", + "smartstring", + "tokio", + "version_check", +] + +[[package]] +name = "polars-ops" +version = "0.39.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efdbdb4d9a92109bc2e0ce8e17af5ae8ab643bb5b7ee9d1d74f0aeffd1fbc95f" +dependencies = [ + "ahash", + "argminmax", + "base64 0.21.7", + "bytemuck", + "chrono", + "chrono-tz", + "either", + "hashbrown", + "hex", + "indexmap", + "memchr", + "num-traits", + "polars-arrow", + "polars-compute", + "polars-core", + "polars-error", + "polars-utils", + "rayon", + "regex", + "smartstring", + "unicode-reverse", + "version_check", +] + +[[package]] +name = "polars-parquet" +version = "0.39.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b421d2196f786fdfe162db614c8485f8308fe41575d4de634a39bbe460d1eb6a" +dependencies = [ + "ahash", + "async-stream", + "base64 0.21.7", + "brotli", + "ethnum", + "flate2", + "futures", + "lz4", + "num-traits", + "parquet-format-safe", + "polars-arrow", + "polars-error", + "polars-utils", + "seq-macro", + "simdutf8", + "snap", + "streaming-decompression", + "zstd", +] + +[[package]] +name = "polars-pipe" +version = "0.39.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48700f1d5bd56a15451e581f465c09541492750360f18637b196f995470a015c" +dependencies = [ + "crossbeam-channel", + "crossbeam-queue", + "enum_dispatch", + "futures", + "hashbrown", + "num-traits", + "polars-arrow", + "polars-compute", + "polars-core", + "polars-io", + "polars-ops", + "polars-plan", + "polars-row", + "polars-utils", + "rayon", + "smartstring", + "tokio", + "uuid", + "version_check", +] + +[[package]] +name = "polars-plan" +version = "0.39.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fb8e2302e20c44defd5be8cad9c96e75face63c3a5f609aced8c4ec3b3ac97d" +dependencies = [ + "ahash", + "bytemuck", + "chrono-tz", + "futures", + "hashbrown", + "once_cell", + "percent-encoding", + "polars-arrow", + "polars-core", + "polars-io", + "polars-ops", + "polars-parquet", + "polars-time", + "polars-utils", + "rayon", + "recursive", + "regex", + "smartstring", + "strum_macros 0.25.3", + "version_check", +] + +[[package]] +name = "polars-row" +version = "0.39.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a515bdc68c2ae3702e3de70d89601f3b71ca8137e282a226dddb53ee4bacfa2e" +dependencies = [ + "bytemuck", + "polars-arrow", + "polars-error", + "polars-utils", +] + +[[package]] +name = "polars-sql" +version = "0.39.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b4bb7cc1c04c3023d1953b2f1dec50515e8fd8169a5a2bf4967b3b082232db7" +dependencies = [ + "hex", + "polars-arrow", + "polars-core", + "polars-error", + "polars-lazy", + "polars-plan", + "rand", + "serde", + "serde_json", + "sqlparser", +] + +[[package]] +name = "polars-time" +version = "0.39.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efc18e3ad92eec55db89d88f16c22d436559ba7030cf76f86f6ed7a754b673f1" +dependencies = [ + "atoi", + "chrono", + "chrono-tz", + "now", + "once_cell", + "polars-arrow", + "polars-core", + "polars-error", + "polars-ops", + "polars-utils", + "regex", + "smartstring", +] + +[[package]] +name = "polars-utils" +version = "0.39.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c760b6c698cfe2fbbbd93d6cfb408db14ececfe1d92445dae2229ce1b5b21ae8" +dependencies = [ + "ahash", + "bytemuck", + "hashbrown", + "indexmap", + "num-traits", + "once_cell", + "polars-error", + "raw-cpuid", + "rayon", + "smartstring", + "stacker", + "sysinfo", + "version_check", +] + +[[package]] +name = "polling" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +dependencies = [ + "autocfg", + "bitflags 1.3.2", + "cfg-if", + "concurrent-queue", + "libc", + "log", + "pin-project-lite", + "windows-sys 0.48.0", +] + +[[package]] +name = "polling" +version = "3.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6a007746f34ed64099e88783b0ae369eaa3da6392868ba262e2af9b8fbaea1" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi", + "pin-project-lite", + "rustix 0.38.34", + "tracing", + "windows-sys 0.52.0", +] + +[[package]] +name = "popgetter_cli" +version = "0.1.0" +dependencies = [ + "anyhow", + "chrono", + "clap", + "comfy-table", + "enum_dispatch", + "flatgeobuf", + "futures", + "geo", + "geojson", + "geozero", + "httpmock", + "itertools 0.13.0", + "log", + "polars", + "pretty_env_logger", + "regex", + "reqwest 0.12.4", + "serde", + "serde_json", + "strum", + "strum_macros 0.26.4", + "thiserror", + "tokio", + "toml", + "typify", + "wkb", + "wkt", + "xdg", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + +[[package]] +name = "pretty_env_logger" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "865724d4dbe39d9f3dd3b52b88d859d66bcb2d6a0acfd5ea68a65fb66d4bdc1c" +dependencies = [ + "env_logger", + "log", +] + +[[package]] +name = "proc-macro2" +version = "1.0.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "psm" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" +dependencies = [ + "cc", +] + +[[package]] +name = "quick-xml" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rand_distr" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" +dependencies = [ + "num-traits", + "rand", +] + +[[package]] +name = "raw-cpuid" +version = "11.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e29830cbb1290e404f24c73af91c5d8d631ce7e128691e9477556b540cd01ecd" +dependencies = [ + "bitflags 2.5.0", +] + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "read-logger" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7f715a23c7db804b71eb9162a9cf210b89e99db9c3649a2a038d13b7594a99" +dependencies = [ + "log", +] + +[[package]] +name = "recursive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0786a43debb760f491b1bc0269fe5e84155353c67482b9e60d0cfb596054b43e" +dependencies = [ + "recursive-proc-macro-impl", + "stacker", +] + +[[package]] +name = "recursive-proc-macro-impl" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76009fbe0614077fc1a2ce255e3a1881a2e3a3527097d5dc6d8212c585e7e38b" +dependencies = [ + "quote", + "syn 2.0.66", +] + +[[package]] +name = "redox_syscall" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +dependencies = [ + "bitflags 2.5.0", +] + +[[package]] +name = "redox_users" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +dependencies = [ + "getrandom", + "libredox", + "thiserror", +] + +[[package]] +name = "regex" +version = "1.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" + +[[package]] +name = "regress" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f5f39ba4513916c1b2657b72af6ec671f091cd637992f58d0ede5cae4e5dea0" +dependencies = [ + "hashbrown", + "memchr", +] + +[[package]] +name = "reqwest" +version = "0.11.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +dependencies = [ + "base64 0.21.7", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.29", + "hyper-rustls", + "hyper-tls 0.5.0", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls", + "rustls-native-certs", + "rustls-pemfile 1.0.4", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-native-tls", + "tokio-rustls", + "tokio-util", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "winreg 0.50.0", +] + +[[package]] +name = "reqwest" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" +dependencies = [ + "base64 0.22.1", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2 0.4.5", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.3.1", + "hyper-tls 0.6.0", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile 2.1.2", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg 0.52.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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbf4a6aa5f6d6888f39e980649f3ad6b666acdce1d78e95b8a2cb076e687ae30" + +[[package]] +name = "rstar" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "133315eb94c7b1e8d0cb097e5a710d850263372fd028fff18969de708afc7008" +dependencies = [ + "heapless", + "num-traits", + "smallvec", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.37.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" +dependencies = [ + "bitflags 1.3.2", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags 2.5.0", + "errno", + "libc", + "linux-raw-sys 0.4.14", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.21.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +dependencies = [ + "log", + "ring", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +dependencies = [ + "openssl-probe", + "rustls-pemfile 1.0.4", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.7", +] + +[[package]] +name = "rustls-pemfile" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +dependencies = [ + "base64 0.22.1", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "schemars" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" +dependencies = [ + "dyn-clone", + "schemars_derive", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.66", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "security-framework" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +dependencies = [ + "bitflags 2.5.0", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" + +[[package]] +name = "seq-macro" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" + +[[package]] +name = "serde" +version = "1.0.203" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.203" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "serde_derive_internals" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "serde_json" +version = "1.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_regex" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8136f1a4ea815d7eac4101cfd0b16dc0cb5e1fe1b8609dfd728058656b7badf" +dependencies = [ + "regex", + "serde", +] + +[[package]] +name = "serde_spanned" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_tokenstream" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a00ffd23fd882d096f09fcaae2a9de8329a328628e86027e049ee051dc1621f" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "syn 2.0.66", +] + +[[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 = "signal-hook-registry" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +dependencies = [ + "libc", +] + +[[package]] +name = "simdutf8" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" + +[[package]] +name = "similar" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa42c91313f1d05da9b26f267f931cf178d4aba455b4c4622dd7355eb80c6640" + +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "smartstring" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29" +dependencies = [ + "autocfg", + "serde", + "static_assertions", + "version_check", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" + +[[package]] +name = "socket2" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "socket2" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "spade" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b20a809169ae442497e41a997fc5f14e2eea04e6ac590816a910d5d8068c8c0" +dependencies = [ + "hashbrown", + "num-traits", + "robust", + "smallvec", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "sqlparser" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743b4dc2cbde11890ccb254a8fc9d537fa41b36da00de2a1c5e9848c9bc42bd7" +dependencies = [ + "log", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "stacker" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce" +dependencies = [ + "cc", + "cfg-if", + "libc", + "psm", + "winapi", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "streaming-decompression" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf6cc3b19bfb128a8ad11026086e31d3ce9ad23f8ea37354b31383a187c44cf3" +dependencies = [ + "fallible-streaming-iterator", +] + +[[package]] +name = "streaming-iterator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b2231b7c3057d5e4ad0156fb3dc807d900806020c5ffa3ee6ff2c8c76fb8520" + +[[package]] +name = "strength_reduce" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe895eb47f22e2ddd4dabc02bce419d2e643c8e3b585c78158b349195bc24d82" + +[[package]] +name = "string_cache" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" +dependencies = [ + "new_debug_unreachable", + "once_cell", + "parking_lot", + "phf_shared 0.10.0", + "precomputed-hash", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "strum" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" + +[[package]] +name = "strum_macros" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.66", +] + +[[package]] +name = "strum_macros" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.66", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "sysinfo" +version = "0.30.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "732ffa00f53e6b2af46208fba5718d9662a421049204e156328b66791ffa15ae" +dependencies = [ + "cfg-if", + "core-foundation-sys", + "libc", + "ntapi", + "once_cell", + "windows", +] + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "target-features" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1bbb9f3c5c463a01705937a24fdabc5047929ac764b2d5b9cf681c1f5041ed5" + +[[package]] +name = "tempfile" +version = "3.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +dependencies = [ + "cfg-if", + "fastrand 2.1.0", + "rustix 0.38.34", + "windows-sys 0.52.0", +] + +[[package]] +name = "term" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +dependencies = [ + "dirs-next", + "rustversion", + "winapi", +] + +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "thiserror" +version = "1.0.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +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.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2 0.5.7", + "tokio-macros", + "windows-sys 0.48.0", +] + +[[package]] +name = "tokio-macros" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +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 = "typify" +version = "0.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c61e9db210bbff218e6535c664b37ec47da449169b98e7866d0580d0db75529" +dependencies = [ + "typify-impl", + "typify-macro", +] + +[[package]] +name = "typify-impl" +version = "0.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95e32f38493804f88e2dc7a5412eccd872ea5452b4db9b0a77de4df180f2a87e" +dependencies = [ + "heck 0.4.1", + "log", + "proc-macro2", + "quote", + "regress", + "schemars", + "serde_json", + "syn 2.0.66", + "thiserror", + "unicode-ident", +] + +[[package]] +name = "typify-macro" +version = "0.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc09508b72f63d521d68e42c7f172c7416d67986df44b3c7d1f7f9963948ed32" +dependencies = [ + "proc-macro2", + "quote", + "schemars", + "serde", + "serde_json", + "serde_tokenstream", + "syn 2.0.66", + "typify-impl", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-reverse" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b6f4888ebc23094adfb574fdca9fdc891826287a6397d2cd28802ffd6f20c76" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "unicode-segmentation" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" + +[[package]] +name = "unicode-width" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" + +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + +[[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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[package]] +name = "uuid" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +dependencies = [ + "getrandom", +] + +[[package]] +name = "value-bag" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a84c137d37ab0142f0f2ddfe332651fdbf252e7b7dbb4e67b6c1f1b2e925101" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "waker-fn" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.66", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" + +[[package]] +name = "wasm-streams" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "web-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +dependencies = [ + "windows-core", + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +dependencies = [ + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" + +[[package]] +name = "winnow" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41ff33f391015ecab21cd092389215eb265ef9496a9a07b6bee7d3529831deda" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "winreg" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "wkb" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66c806dac841607a62b0e8babf620fea51429f6ea005545491198fcbfd9004a2" +dependencies = [ + "geo-types", + "num-traits", +] + +[[package]] +name = "wkt" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3c2252781f8927974e8ba6a67c965a759a2b88ea2b1825f6862426bbb1c8f41" +dependencies = [ + "geo-types", + "log", + "num-traits", + "thiserror", +] + +[[package]] +name = "xdg" +version = "2.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546" + +[[package]] +name = "xxhash-rust" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "927da81e25be1e1a2901d59b81b37dd2efd1fc9c9345a55007f09bf5a2d3ee03" + +[[package]] +name = "zerocopy" +version = "0.7.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "zstd" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "7.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.10+zstd.1.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/popgetter/Cargo.toml b/popgetter/Cargo.toml new file mode 100644 index 0000000..5aa02f5 --- /dev/null +++ b/popgetter/Cargo.toml @@ -0,0 +1,42 @@ +[package] +name = "popgetter" +version = "0.1.0" +edition = "2021" + +[lib] +name = "popgetter" +path = "src/lib.rs" + +[dependencies] +anyhow = "1.0.75" +serde = { version = "1.0", features = ["derive"] } +serde_json = {version="1.0"} +tokio = { version = "1.30.0", features = ["full"] } +clap = { version = "4.5.0", features = ["derive"] } +polars = {version ="0.39.2", features = ["lazy","is_in","http","streaming", "parquet","polars-io","regex","strings","rows"]} +chrono = {version="0.4.37", features=['serde']} +reqwest = {version = "0.12.3", features = ["json"]} +strum = "0.26" +strum_macros = "0.26" +enum_dispatch = "0.3" +flatgeobuf = "~4.1.0" +geozero = {version = "0.12.0", features= ["with-csv","with-geojson"]} +httpmock = "0.7.0-rc.1" +geojson={version="0.24.1", optional=true } +geo = "0.28.0" +wkt = "0.10.3" +wkb = "0.7.1" +log = "0.4.21" +pretty_env_logger = "0.5.0" +futures = "0.3.30" +toml = "0.8.13" +xdg = "2.5.2" +regex = "1.10.4" +itertools = "0.13.0" +comfy-table = "7.1.1" +thiserror = "1" + + +[features] +default = ["formatters"] +formatters= ["dep:geojson"] diff --git a/popgetter_py/.github/workflows/CI.yml b/popgetter_py/.github/workflows/CI.yml new file mode 100644 index 0000000..5cd9e32 --- /dev/null +++ b/popgetter_py/.github/workflows/CI.yml @@ -0,0 +1,118 @@ +# This file is autogenerated by maturin v1.5.0 +# To update, run +# +# maturin generate-ci github +# +name: CI + +on: + push: + branches: + - main + - master + tags: + - '*' + pull_request: + workflow_dispatch: + +permissions: + contents: read + +jobs: + linux: + runs-on: ubuntu-latest + strategy: + matrix: + target: [x86_64, x86, aarch64, armv7, s390x, ppc64le] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.target }} + args: --release --out dist --find-interpreter + sccache: 'true' + manylinux: auto + - name: Upload wheels + uses: actions/upload-artifact@v4 + with: + name: wheels-linux-${{ matrix.target }} + path: dist + + windows: + runs-on: windows-latest + strategy: + matrix: + target: [x64, x86] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.10' + architecture: ${{ matrix.target }} + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.target }} + args: --release --out dist --find-interpreter + sccache: 'true' + - name: Upload wheels + uses: actions/upload-artifact@v4 + with: + name: wheels-windows-${{ matrix.target }} + path: dist + + macos: + runs-on: macos-latest + strategy: + matrix: + target: [x86_64, aarch64] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.target }} + args: --release --out dist --find-interpreter + sccache: 'true' + - name: Upload wheels + uses: actions/upload-artifact@v4 + with: + name: wheels-macos-${{ matrix.target }} + path: dist + + sdist: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Build sdist + uses: PyO3/maturin-action@v1 + with: + command: sdist + args: --out dist + - name: Upload sdist + uses: actions/upload-artifact@v4 + with: + name: wheels-sdist + path: dist + + release: + name: Release + runs-on: ubuntu-latest + if: "startsWith(github.ref, 'refs/tags/')" + needs: [linux, windows, macos, sdist] + steps: + - uses: actions/download-artifact@v4 + - name: Publish to PyPI + uses: PyO3/maturin-action@v1 + env: + MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} + with: + command: upload + args: --non-interactive --skip-existing wheels-*/* diff --git a/popgetter_py/.gitignore b/popgetter_py/.gitignore new file mode 100644 index 0000000..c8f0442 --- /dev/null +++ b/popgetter_py/.gitignore @@ -0,0 +1,72 @@ +/target + +# Byte-compiled / optimized / DLL files +__pycache__/ +.pytest_cache/ +*.py[cod] + +# C extensions +*.so + +# Distribution / packaging +.Python +.venv/ +env/ +bin/ +build/ +develop-eggs/ +dist/ +eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +include/ +man/ +venv/ +*.egg-info/ +.installed.cfg +*.egg + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt +pip-selfcheck.json + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.cache +nosetests.xml +coverage.xml + +# Translations +*.mo + +# Mr Developer +.mr.developer.cfg +.project +.pydevproject + +# Rope +.ropeproject + +# Django stuff: +*.log +*.pot + +.DS_Store + +# Sphinx documentation +docs/_build/ + +# PyCharm +.idea/ + +# VSCode +.vscode/ + +# Pyenv +.python-version diff --git a/popgetter_py/Cargo.toml b/popgetter_py/Cargo.toml index 1b651ec..e3bc7c2 100644 --- a/popgetter_py/Cargo.toml +++ b/popgetter_py/Cargo.toml @@ -9,5 +9,6 @@ name = "popgetter_py" crate-type = ["cdylib"] [dependencies] -pyo3 = "0.20.0" +pyo3 = "^0.21.0" pyo3-polars="0.14.0" +popgetter= {path="../popgetter"} diff --git a/popgetter_py/pyproject.toml b/popgetter_py/pyproject.toml new file mode 100644 index 0000000..ee21719 --- /dev/null +++ b/popgetter_py/pyproject.toml @@ -0,0 +1,15 @@ +[build-system] +requires = ["maturin>=1.5,<2.0"] +build-backend = "maturin" + +[project] +name = "popgetter" +requires-python = ">=3.8" +classifiers = [ + "Programming Language :: Rust", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", +] +dynamic = ["version"] +[tool.maturin] +features = ["pyo3/extension-module"] diff --git a/popgetter_py/src/lib.rs b/popgetter_py/src/lib.rs new file mode 100644 index 0000000..1b340f0 --- /dev/null +++ b/popgetter_py/src/lib.rs @@ -0,0 +1,24 @@ +use std::{any::Any, sync::Arc}; + +use popgetter::Popgetter; +use pyo3::prelude::*; +use pyo3_polars::PyDataFrame; + +/// Formats the sum of two numbers as string. +#[pyfunction] +fn sum_as_string(a: usize, b: usize) -> PyResult { + Ok((a + b).to_string()) +} + +#[pyfunction] +fn config() -> PyResult { + let popgetter = Popgetter::new(); + Ok("test".into()) +} +/// A Python module implemented in Rust. +#[pymodule] +fn popgetter_py(_py: Python, m: &PyModule) -> PyResult<()> { + m.add_function(wrap_pyfunction!(sum_as_string, m)?)?; + m.add_function(wrap_pyfunction!(config, m)?)?; + Ok(()) +} From 9c506226214eadb36b287f2f6283fa280941c739 Mon Sep 17 00:00:00 2001 From: Stuart Lynn Date: Wed, 12 Jun 2024 13:38:19 +0100 Subject: [PATCH 03/22] Stubbing out basic python interface --- Cargo.lock | 311 +++++++++++++++++++++++++++++++++++++--- popgetter/Cargo.toml | 2 +- popgetter/src/cli.rs | 4 +- popgetter/src/lib.rs | 6 + popgetter_py/Cargo.toml | 7 +- popgetter_py/src/lib.rs | 91 ++++++++++-- 6 files changed, 381 insertions(+), 40 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f74d247..141bf3d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -520,7 +520,18 @@ checksum = "d640d25bc63c50fb1f0b545ffd80207d2e10a4c965530809b40ba3386825c391" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", - "brotli-decompressor", + "brotli-decompressor 2.5.1", +] + +[[package]] +name = "brotli" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19483b140a7ac7174d34b5a581b406c64f84da5409d3e09cf4fff604f9270e67" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor 4.0.1", ] [[package]] @@ -533,6 +544,16 @@ dependencies = [ "alloc-stdlib", ] +[[package]] +name = "brotli-decompressor" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + [[package]] name = "bumpalo" version = "3.16.0" @@ -2299,12 +2320,12 @@ dependencies = [ "polars-arrow 0.39.2", "polars-core 0.39.2", "polars-error 0.39.2", - "polars-io", - "polars-lazy", - "polars-ops", + "polars-io 0.39.2", + "polars-lazy 0.39.2", + "polars-ops 0.39.2", "polars-parquet 0.39.2", - "polars-sql", - "polars-time", + "polars-sql 0.39.2", + "polars-time 0.39.2", "polars-utils 0.39.2", "version_check", ] @@ -2319,7 +2340,12 @@ dependencies = [ "polars-arrow 0.40.0", "polars-core 0.40.0", "polars-error 0.40.0", + "polars-io 0.40.0", + "polars-lazy 0.40.0", + "polars-ops 0.40.0", "polars-parquet 0.40.0", + "polars-sql 0.40.0", + "polars-time 0.40.0", "polars-utils 0.40.0", "version_check", ] @@ -2368,27 +2394,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1cb5e11cd0752ae022fa6ca3afa50a14b0301b7ce53c0135828fbb0f4fa8303e" dependencies = [ "ahash", + "atoi", "atoi_simd", "bytemuck", "chrono", + "chrono-tz", "dyn-clone", "either", "ethnum", "fast-float", "foreign_vec", + "futures", "getrandom", "hashbrown", "itoa", + "itoap", + "lz4", "multiversion", "num-traits", "polars-arrow-format", "polars-error 0.40.0", "polars-utils 0.40.0", "ryu", + "serde", "simdutf8", "streaming-iterator", "strength_reduce", "version_check", + "zstd", ] [[package]] @@ -2475,6 +2508,9 @@ dependencies = [ "ahash", "bitflags 2.5.0", "bytemuck", + "chrono", + "chrono-tz", + "comfy-table", "either", "hashbrown", "indexmap", @@ -2485,7 +2521,11 @@ dependencies = [ "polars-error 0.40.0", "polars-row 0.40.0", "polars-utils 0.40.0", + "rand", + "rand_distr", "rayon", + "regex", + "serde", "smartstring", "thiserror", "version_check", @@ -2511,11 +2551,33 @@ version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08888f58e61599b00f5ea0c2ccdc796b54b9859559cc0d4582733509451fa01a" dependencies = [ + "object_store", "polars-arrow-format", + "regex", "simdutf8", "thiserror", ] +[[package]] +name = "polars-expr" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4173591920fe56ad55af025f92eb0d08421ca85705c326a640c43856094e3484" +dependencies = [ + "ahash", + "bitflags 2.5.0", + "once_cell", + "polars-arrow 0.40.0", + "polars-core 0.40.0", + "polars-io 0.40.0", + "polars-ops 0.40.0", + "polars-plan 0.40.0", + "polars-time 0.40.0", + "polars-utils 0.40.0", + "rayon", + "smartstring", +] + [[package]] name = "polars-io" version = "0.39.2" @@ -2541,7 +2603,7 @@ dependencies = [ "polars-core 0.39.2", "polars-error 0.39.2", "polars-parquet 0.39.2", - "polars-time", + "polars-time 0.39.2", "polars-utils 0.39.2", "rayon", "regex", @@ -2555,6 +2617,45 @@ dependencies = [ "url", ] +[[package]] +name = "polars-io" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5842896aea46d975b425d63f156f412aed3cfde4c257b64fb1f43ceea288074e" +dependencies = [ + "ahash", + "async-trait", + "atoi_simd", + "bytes", + "chrono", + "fast-float", + "futures", + "home", + "itoa", + "memchr", + "memmap2", + "num-traits", + "object_store", + "once_cell", + "percent-encoding", + "polars-arrow 0.40.0", + "polars-core 0.40.0", + "polars-error 0.40.0", + "polars-parquet 0.40.0", + "polars-time 0.40.0", + "polars-utils 0.40.0", + "rayon", + "regex", + "ryu", + "serde", + "serde_json", + "simdutf8", + "smartstring", + "tokio", + "tokio-util", + "url", +] + [[package]] name = "polars-lazy" version = "0.39.2" @@ -2568,11 +2669,11 @@ dependencies = [ "once_cell", "polars-arrow 0.39.2", "polars-core 0.39.2", - "polars-io", - "polars-ops", - "polars-pipe", - "polars-plan", - "polars-time", + "polars-io 0.39.2", + "polars-ops 0.39.2", + "polars-pipe 0.39.2", + "polars-plan 0.39.2", + "polars-time 0.39.2", "polars-utils 0.39.2", "rayon", "smartstring", @@ -2580,6 +2681,32 @@ dependencies = [ "version_check", ] +[[package]] +name = "polars-lazy" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e805ea2ebbc6b7749b0afb31b7fc5d32b42b57ba29b984549d43d3a16114c4a5" +dependencies = [ + "ahash", + "bitflags 2.5.0", + "futures", + "glob", + "once_cell", + "polars-arrow 0.40.0", + "polars-core 0.40.0", + "polars-expr", + "polars-io 0.40.0", + "polars-ops 0.40.0", + "polars-pipe 0.40.0", + "polars-plan 0.40.0", + "polars-time 0.40.0", + "polars-utils 0.40.0", + "rayon", + "smartstring", + "tokio", + "version_check", +] + [[package]] name = "polars-ops" version = "0.39.2" @@ -2610,6 +2737,36 @@ dependencies = [ "version_check", ] +[[package]] +name = "polars-ops" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b0aed7e169c81b98457641cf82b251f52239a668916c2e683abd1f38df00d58" +dependencies = [ + "ahash", + "argminmax", + "base64 0.22.1", + "bytemuck", + "chrono", + "chrono-tz", + "either", + "hashbrown", + "hex", + "indexmap", + "memchr", + "num-traits", + "polars-arrow 0.40.0", + "polars-compute 0.40.0", + "polars-core 0.40.0", + "polars-error 0.40.0", + "polars-utils 0.40.0", + "rayon", + "regex", + "smartstring", + "unicode-reverse", + "version_check", +] + [[package]] name = "polars-parquet" version = "0.39.2" @@ -2619,7 +2776,7 @@ dependencies = [ "ahash", "async-stream", "base64 0.21.7", - "brotli", + "brotli 3.5.0", "ethnum", "flate2", "futures", @@ -2643,8 +2800,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c70670a9e51cac66d0e77fd20b5cc957dbcf9f2660d410633862bb72f846d5b8" dependencies = [ "ahash", + "async-stream", "base64 0.22.1", + "brotli 5.0.0", "ethnum", + "flate2", + "futures", + "lz4", "num-traits", "parquet-format-safe", "polars-arrow 0.40.0", @@ -2652,7 +2814,9 @@ dependencies = [ "polars-utils 0.40.0", "seq-macro", "simdutf8", + "snap", "streaming-decompression", + "zstd", ] [[package]] @@ -2670,9 +2834,9 @@ dependencies = [ "polars-arrow 0.39.2", "polars-compute 0.39.2", "polars-core 0.39.2", - "polars-io", - "polars-ops", - "polars-plan", + "polars-io 0.39.2", + "polars-ops 0.39.2", + "polars-plan 0.39.2", "polars-row 0.39.2", "polars-utils 0.39.2", "rayon", @@ -2682,6 +2846,34 @@ dependencies = [ "version_check", ] +[[package]] +name = "polars-pipe" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a40ae1b3c74ee07e2d1f7cbf56c5d6e15969e45d9b6f0903bd2acaf783ba436" +dependencies = [ + "crossbeam-channel", + "crossbeam-queue", + "enum_dispatch", + "futures", + "hashbrown", + "num-traits", + "polars-arrow 0.40.0", + "polars-compute 0.40.0", + "polars-core 0.40.0", + "polars-expr", + "polars-io 0.40.0", + "polars-ops 0.40.0", + "polars-plan 0.40.0", + "polars-row 0.40.0", + "polars-utils 0.40.0", + "rayon", + "smartstring", + "tokio", + "uuid", + "version_check", +] + [[package]] name = "polars-plan" version = "0.39.2" @@ -2697,10 +2889,10 @@ dependencies = [ "percent-encoding", "polars-arrow 0.39.2", "polars-core 0.39.2", - "polars-io", - "polars-ops", + "polars-io 0.39.2", + "polars-ops 0.39.2", "polars-parquet 0.39.2", - "polars-time", + "polars-time 0.39.2", "polars-utils 0.39.2", "rayon", "recursive", @@ -2710,6 +2902,35 @@ dependencies = [ "version_check", ] +[[package]] +name = "polars-plan" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8daa3541ae7e9af311a4389bc2b21f83349c34c723cc67fa524cdefdaa172d90" +dependencies = [ + "ahash", + "bytemuck", + "chrono-tz", + "either", + "futures", + "hashbrown", + "once_cell", + "percent-encoding", + "polars-arrow 0.40.0", + "polars-core 0.40.0", + "polars-io 0.40.0", + "polars-ops 0.40.0", + "polars-parquet 0.40.0", + "polars-time 0.40.0", + "polars-utils 0.40.0", + "rayon", + "recursive", + "regex", + "smartstring", + "strum_macros 0.26.4", + "version_check", +] + [[package]] name = "polars-row" version = "0.39.2" @@ -2744,8 +2965,27 @@ dependencies = [ "polars-arrow 0.39.2", "polars-core 0.39.2", "polars-error 0.39.2", - "polars-lazy", - "polars-plan", + "polars-lazy 0.39.2", + "polars-plan 0.39.2", + "rand", + "serde", + "serde_json", + "sqlparser", +] + +[[package]] +name = "polars-sql" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a724f699d194cb02c25124d3832f7d4d77f387f1a89ee42f6b9e88ec561d4ad9" +dependencies = [ + "hex", + "once_cell", + "polars-arrow 0.40.0", + "polars-core 0.40.0", + "polars-error 0.40.0", + "polars-lazy 0.40.0", + "polars-plan 0.40.0", "rand", "serde", "serde_json", @@ -2766,12 +3006,33 @@ dependencies = [ "polars-arrow 0.39.2", "polars-core 0.39.2", "polars-error 0.39.2", - "polars-ops", + "polars-ops 0.39.2", "polars-utils 0.39.2", "regex", "smartstring", ] +[[package]] +name = "polars-time" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ebec238d8b6200d9f0c3ce411c8441e950bd5a7df7806b8172d06c1d5a4b97" +dependencies = [ + "atoi", + "bytemuck", + "chrono", + "chrono-tz", + "now", + "once_cell", + "polars-arrow 0.40.0", + "polars-core 0.40.0", + "polars-error 0.40.0", + "polars-ops 0.40.0", + "polars-utils 0.40.0", + "regex", + "smartstring", +] + [[package]] name = "polars-utils" version = "0.39.2" @@ -2810,6 +3071,7 @@ dependencies = [ "rayon", "smartstring", "stacker", + "sysinfo", "version_check", ] @@ -2861,7 +3123,7 @@ dependencies = [ "httpmock", "itertools 0.13.0", "log", - "polars 0.39.2", + "polars 0.40.0", "pretty_env_logger", "regex", "reqwest 0.12.4", @@ -2906,9 +3168,12 @@ dependencies = [ name = "popgetter_py" version = "0.1.0" dependencies = [ + "futures", + "polars 0.40.0", "popgetter", "pyo3", "pyo3-polars", + "tokio", ] [[package]] diff --git a/popgetter/Cargo.toml b/popgetter/Cargo.toml index 5aa02f5..1eb24b6 100644 --- a/popgetter/Cargo.toml +++ b/popgetter/Cargo.toml @@ -13,7 +13,7 @@ serde = { version = "1.0", features = ["derive"] } serde_json = {version="1.0"} tokio = { version = "1.30.0", features = ["full"] } clap = { version = "4.5.0", features = ["derive"] } -polars = {version ="0.39.2", features = ["lazy","is_in","http","streaming", "parquet","polars-io","regex","strings","rows"]} +polars = {version ="^0.40.0", features = ["lazy","is_in","http","streaming", "parquet","polars-io","regex","strings","rows"]} chrono = {version="0.4.37", features=['serde']} reqwest = {version = "0.12.3", features = ["json"]} strum = "0.26" diff --git a/popgetter/src/cli.rs b/popgetter/src/cli.rs index 0a2416c..5fa546f 100644 --- a/popgetter/src/cli.rs +++ b/popgetter/src/cli.rs @@ -251,10 +251,10 @@ impl RunCommand for MetricsCommand { census_table: self.source_metric_id.clone().map(SourceMetricId), }; let popgetter = Popgetter::new_with_config(config).await?; - let metadata = popgetter.metadata; - let search_results = search_request.search_results(&metadata)?; + let search_results = popgetter.search(&search_request).await?; let len_requests = search_results.0.shape().0; + println!("Found {} metrics.", len_requests); if len_requests > 50 && !self.full { diff --git a/popgetter/src/lib.rs b/popgetter/src/lib.rs index 02f7601..974129a 100644 --- a/popgetter/src/lib.rs +++ b/popgetter/src/lib.rs @@ -1,9 +1,11 @@ use anyhow::Result; use data_request_spec::DataRequestSpec; +use flatgeobuf::packed_r_tree::SearchResultItem; use log::debug; use metadata::Metadata; use parquet::get_metrics; use polars::{frame::DataFrame, prelude::DataFrameJoinOps}; +use search::{SearchRequest, SearchResults}; use tokio::try_join; use crate::{config::Config, geo::get_geometries}; @@ -62,4 +64,8 @@ impl Popgetter { let result = geoms.inner_join(&metrics?, ["GEOID"], ["GEO_ID"])?; Ok(result) } + + pub async fn search(&self,search_request: &SearchRequest)->Result{ + search_request.clone().search_results(&self.metadata) + } } diff --git a/popgetter_py/Cargo.toml b/popgetter_py/Cargo.toml index e3bc7c2..87c7ac5 100644 --- a/popgetter_py/Cargo.toml +++ b/popgetter_py/Cargo.toml @@ -5,10 +5,13 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] -name = "popgetter_py" +name = "popgetter" crate-type = ["cdylib"] [dependencies] -pyo3 = "^0.21.0" +pyo3 = {version= "^0.21.0", features=["experimental-async"]} pyo3-polars="0.14.0" popgetter= {path="../popgetter"} +polars = {version ="^0.40.0", features = ["lazy","is_in","http","streaming", "parquet","polars-io","regex","strings","rows"]} +futures = "0.3.30" +tokio = "1.38.0" diff --git a/popgetter_py/src/lib.rs b/popgetter_py/src/lib.rs index 1b340f0..75a922c 100644 --- a/popgetter_py/src/lib.rs +++ b/popgetter_py/src/lib.rs @@ -1,24 +1,91 @@ -use std::{any::Any, sync::Arc}; +use std::default::Default; -use popgetter::Popgetter; -use pyo3::prelude::*; +use ::popgetter::{ + data_request_spec::{DataRequestSpec, GeometrySpec, MetricSpec}, + search::{SearchContext, SearchRequest, SearchResults, SearchText}}; +use pyo3::{prelude::*, types::{PyDict, PyString}}; use pyo3_polars::PyDataFrame; +use polars::prelude::DataFrame; + +async fn _search()-> DataFrame{ + let search_request: SearchRequest = SearchRequest::default(); + let popgetter = ::popgetter::Popgetter::new().await.unwrap(); + let search_results = popgetter.search(&search_request).await.unwrap(); + search_results.0.select(&["metric_id","human_readable_name", "metric_description", "metric_hxl_tag","geometry_level"]).unwrap() +} + + +// async fn _data()-> DataFrame{ +// let search_request: SearchRequest = SearchRequest::default(); +// let popgetter = Popgetter::new().await.unwrap(); +// popgetter.search(&search_request).await.unwrap() +// } + +fn get_search(obj: &Bound<'_, PyAny>) -> PyResult { + + if let Ok(text) = obj.downcast::(){ + println!("object is a string {}",text); + let search_text = SearchText{ + text: text.to_string(), + ..SearchText::default() + }; + return Ok(SearchRequest{ + text:vec![search_text], + ..SearchRequest::default() + }) + } + + if let Ok(dict)= obj.downcast::(){ + println!("Object is a dict {}",dict); + return Ok(SearchRequest::default()) + }; + + Ok(SearchRequest::default()) +} + +fn get_data_request(obj: &Bound<'_, PyAny>) -> PyResult { + Ok(DataRequestSpec{ + geometry: GeometrySpec{include_geoms:true, geometry_level:None}, + region: vec![], + metrics: vec![MetricSpec::Metric(::popgetter::metadata::MetricId::Hxl(r"\#population\+adults".into()))], + years: None, + }) +} + +async fn _get_data(data_request: &DataRequestSpec)->DataFrame{ + + let popgetter = ::popgetter::Popgetter::new().await.unwrap(); + println!("running data request {:#?}",data_request); + popgetter.get_data_request(data_request).await.unwrap() +} -/// Formats the sum of two numbers as string. #[pyfunction] -fn sum_as_string(a: usize, b: usize) -> PyResult { - Ok((a + b).to_string()) +fn get(#[pyo3(from_py_with = "get_data_request")] data_request: DataRequestSpec)->PyResult{ + + let rt = tokio::runtime::Builder::new_current_thread() + .enable_all() + .build()?; + + // Call the asynchronous connect method using the runtime. + let result= rt.block_on(_get_data(&data_request)); + Ok(PyDataFrame(result)) } #[pyfunction] -fn config() -> PyResult { - let popgetter = Popgetter::new(); - Ok("test".into()) +fn search(#[pyo3(from_py_with = "get_search")] search_query: SearchRequest) -> PyResult { + let rt = tokio::runtime::Builder::new_current_thread() + .enable_all() + .build()?; + + // Call the asynchronous connect method using the runtime. + let result= rt.block_on(_search()); + Ok(PyDataFrame(result)) } + /// A Python module implemented in Rust. #[pymodule] -fn popgetter_py(_py: Python, m: &PyModule) -> PyResult<()> { - m.add_function(wrap_pyfunction!(sum_as_string, m)?)?; - m.add_function(wrap_pyfunction!(config, m)?)?; +fn popgetter(_py: Python, m: &PyModule) -> PyResult<()> { + m.add_function(wrap_pyfunction!(search, m)?)?; + m.add_function(wrap_pyfunction!(get, m)?)?; Ok(()) } From aaae45b6228702627dfef98490be41e8ce25cc9d Mon Sep 17 00:00:00 2001 From: Stuart Lynn Date: Wed, 12 Jun 2024 13:43:26 +0100 Subject: [PATCH 04/22] Format --- popgetter_py/src/lib.rs | 82 +++++++++++++++++++++++++---------------- 1 file changed, 50 insertions(+), 32 deletions(-) diff --git a/popgetter_py/src/lib.rs b/popgetter_py/src/lib.rs index 75a922c..b57730d 100644 --- a/popgetter_py/src/lib.rs +++ b/popgetter_py/src/lib.rs @@ -1,20 +1,32 @@ use std::default::Default; use ::popgetter::{ - data_request_spec::{DataRequestSpec, GeometrySpec, MetricSpec}, - search::{SearchContext, SearchRequest, SearchResults, SearchText}}; -use pyo3::{prelude::*, types::{PyDict, PyString}}; -use pyo3_polars::PyDataFrame; + data_request_spec::{DataRequestSpec, GeometrySpec, MetricSpec}, + search::{SearchContext, SearchRequest, SearchResults, SearchText}, +}; use polars::prelude::DataFrame; +use pyo3::{ + prelude::*, + types::{PyDict, PyString}, +}; +use pyo3_polars::PyDataFrame; -async fn _search()-> DataFrame{ +async fn _search() -> DataFrame { let search_request: SearchRequest = SearchRequest::default(); let popgetter = ::popgetter::Popgetter::new().await.unwrap(); let search_results = popgetter.search(&search_request).await.unwrap(); - search_results.0.select(&["metric_id","human_readable_name", "metric_description", "metric_hxl_tag","geometry_level"]).unwrap() + search_results + .0 + .select(&[ + "metric_id", + "human_readable_name", + "metric_description", + "metric_hxl_tag", + "geometry_level", + ]) + .unwrap() } - // async fn _data()-> DataFrame{ // let search_request: SearchRequest = SearchRequest::default(); // let popgetter = Popgetter::new().await.unwrap(); @@ -22,63 +34,69 @@ async fn _search()-> DataFrame{ // } fn get_search(obj: &Bound<'_, PyAny>) -> PyResult { - - if let Ok(text) = obj.downcast::(){ - println!("object is a string {}",text); - let search_text = SearchText{ + if let Ok(text) = obj.downcast::() { + println!("object is a string {}", text); + let search_text = SearchText { text: text.to_string(), ..SearchText::default() }; - return Ok(SearchRequest{ - text:vec![search_text], + return Ok(SearchRequest { + text: vec![search_text], ..SearchRequest::default() - }) + }); } - if let Ok(dict)= obj.downcast::(){ - println!("Object is a dict {}",dict); - return Ok(SearchRequest::default()) + if let Ok(dict) = obj.downcast::() { + println!("Object is a dict {}", dict); + return Ok(SearchRequest::default()); }; Ok(SearchRequest::default()) } fn get_data_request(obj: &Bound<'_, PyAny>) -> PyResult { - Ok(DataRequestSpec{ - geometry: GeometrySpec{include_geoms:true, geometry_level:None}, + Ok(DataRequestSpec { + geometry: GeometrySpec { + include_geoms: true, + geometry_level: None, + }, region: vec![], - metrics: vec![MetricSpec::Metric(::popgetter::metadata::MetricId::Hxl(r"\#population\+adults".into()))], + metrics: vec![MetricSpec::Metric(::popgetter::metadata::MetricId::Hxl( + r"\#population\+adults".into(), + ))], years: None, }) } -async fn _get_data(data_request: &DataRequestSpec)->DataFrame{ - +async fn _get_data(data_request: &DataRequestSpec) -> DataFrame { let popgetter = ::popgetter::Popgetter::new().await.unwrap(); - println!("running data request {:#?}",data_request); + println!("running data request {:#?}", data_request); popgetter.get_data_request(data_request).await.unwrap() } #[pyfunction] -fn get(#[pyo3(from_py_with = "get_data_request")] data_request: DataRequestSpec)->PyResult{ - - let rt = tokio::runtime::Builder::new_current_thread() +fn get( + #[pyo3(from_py_with = "get_data_request")] data_request: DataRequestSpec, +) -> PyResult { + let rt = tokio::runtime::Builder::new_current_thread() .enable_all() .build()?; - // Call the asynchronous connect method using the runtime. - let result= rt.block_on(_get_data(&data_request)); + // Call the asynchronous connect method using the runtime. + let result = rt.block_on(_get_data(&data_request)); Ok(PyDataFrame(result)) } #[pyfunction] -fn search(#[pyo3(from_py_with = "get_search")] search_query: SearchRequest) -> PyResult { - let rt = tokio::runtime::Builder::new_current_thread() +fn search( + #[pyo3(from_py_with = "get_search")] search_query: SearchRequest, +) -> PyResult { + let rt = tokio::runtime::Builder::new_current_thread() .enable_all() .build()?; - // Call the asynchronous connect method using the runtime. - let result= rt.block_on(_search()); + // Call the asynchronous connect method using the runtime. + let result = rt.block_on(_search()); Ok(PyDataFrame(result)) } From 3ba1b752c59fc8055863d49d05b65799ec789ad4 Mon Sep 17 00:00:00 2001 From: Sam Greenbury Date: Tue, 16 Jul 2024 16:26:55 +0100 Subject: [PATCH 05/22] Revise following changes for v0.2.0 --- Cargo.toml | 5 +- popgetter/Cargo.lock | 4435 -------------------------------------- popgetter/Cargo.toml | 38 +- popgetter/src/cli.rs | 380 ---- popgetter/src/lib.rs | 4 - popgetter/src/main.rs | 40 - popgetter/src/search.rs | 2 +- popgetter_cli/Cargo.toml | 28 +- popgetter_py/Cargo.toml | 18 +- popgetter_py/src/lib.rs | 25 +- 10 files changed, 71 insertions(+), 4904 deletions(-) delete mode 100644 popgetter/Cargo.lock delete mode 100644 popgetter/src/cli.rs delete mode 100644 popgetter/src/main.rs diff --git a/Cargo.toml b/Cargo.toml index a3f3d1d..9e68e11 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,4 @@ -[package] -name = "popgetter_cli" -version = "0.2.0" -edition = "2021" +[workspace] members = [ "popgetter", diff --git a/popgetter/Cargo.lock b/popgetter/Cargo.lock deleted file mode 100644 index 43639f1..0000000 --- a/popgetter/Cargo.lock +++ /dev/null @@ -1,4435 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "getrandom", - "once_cell", - "version_check", - "zerocopy", -] - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "alloc-no-stdlib" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" - -[[package]] -name = "alloc-stdlib" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" -dependencies = [ - "alloc-no-stdlib", -] - -[[package]] -name = "allocator-api2" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anstream" -version = "0.6.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is_terminal_polyfill", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" - -[[package]] -name = "anstyle-parse" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" -dependencies = [ - "anstyle", - "windows-sys 0.52.0", -] - -[[package]] -name = "anyhow" -version = "1.0.86" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" - -[[package]] -name = "approx" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" -dependencies = [ - "num-traits", -] - -[[package]] -name = "argminmax" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52424b59d69d69d5056d508b260553afd91c57e21849579cd1f50ee8b8b88eaa" -dependencies = [ - "num-traits", -] - -[[package]] -name = "array-init-cursor" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7d0a018de4f6aa429b9d33d69edf69072b1c5b1cb8d3e4a5f7ef898fc3eb76" - -[[package]] -name = "ascii-canvas" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" -dependencies = [ - "term", -] - -[[package]] -name = "assert-json-diff" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47e4f2b81832e72834d7518d8487a0396a28cc408186a2e8854c0f98011faf12" -dependencies = [ - "serde", - "serde_json", -] - -[[package]] -name = "async-attributes" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3203e79f4dd9bdda415ed03cf14dae5a2bf775c683a00f94e9cd1faf0f596e5" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "async-channel" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" -dependencies = [ - "concurrent-queue", - "event-listener 2.5.3", - "futures-core", -] - -[[package]] -name = "async-channel" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" -dependencies = [ - "concurrent-queue", - "event-listener-strategy", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-executor" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8828ec6e544c02b0d6691d21ed9f9218d0384a82542855073c2a3f58304aaf0" -dependencies = [ - "async-task", - "concurrent-queue", - "fastrand 2.1.0", - "futures-lite 2.3.0", - "slab", -] - -[[package]] -name = "async-global-executor" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" -dependencies = [ - "async-channel 2.3.1", - "async-executor", - "async-io 2.3.3", - "async-lock 3.4.0", - "blocking", - "futures-lite 2.3.0", - "once_cell", -] - -[[package]] -name = "async-io" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" -dependencies = [ - "async-lock 2.8.0", - "autocfg", - "cfg-if", - "concurrent-queue", - "futures-lite 1.13.0", - "log", - "parking", - "polling 2.8.0", - "rustix 0.37.27", - "slab", - "socket2 0.4.10", - "waker-fn", -] - -[[package]] -name = "async-io" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6baa8f0178795da0e71bc42c9e5d13261aac7ee549853162e66a241ba17964" -dependencies = [ - "async-lock 3.4.0", - "cfg-if", - "concurrent-queue", - "futures-io", - "futures-lite 2.3.0", - "parking", - "polling 3.7.1", - "rustix 0.38.34", - "slab", - "tracing", - "windows-sys 0.52.0", -] - -[[package]] -name = "async-lock" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" -dependencies = [ - "event-listener 2.5.3", -] - -[[package]] -name = "async-lock" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" -dependencies = [ - "event-listener 5.3.1", - "event-listener-strategy", - "pin-project-lite", -] - -[[package]] -name = "async-object-pool" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aeb901c30ebc2fc4ab46395bbfbdba9542c16559d853645d75190c3056caf3bc" -dependencies = [ - "async-std", -] - -[[package]] -name = "async-process" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" -dependencies = [ - "async-io 1.13.0", - "async-lock 2.8.0", - "async-signal", - "blocking", - "cfg-if", - "event-listener 3.1.0", - "futures-lite 1.13.0", - "rustix 0.38.34", - "windows-sys 0.48.0", -] - -[[package]] -name = "async-signal" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "329972aa325176e89114919f2a80fdae4f4c040f66a370b1a1159c6c0f94e7aa" -dependencies = [ - "async-io 2.3.3", - "async-lock 3.4.0", - "atomic-waker", - "cfg-if", - "futures-core", - "futures-io", - "rustix 0.38.34", - "signal-hook-registry", - "slab", - "windows-sys 0.52.0", -] - -[[package]] -name = "async-std" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" -dependencies = [ - "async-attributes", - "async-channel 1.9.0", - "async-global-executor", - "async-io 1.13.0", - "async-lock 2.8.0", - "async-process", - "crossbeam-utils", - "futures-channel", - "futures-core", - "futures-io", - "futures-lite 1.13.0", - "gloo-timers", - "kv-log-macro", - "log", - "memchr", - "once_cell", - "pin-project-lite", - "pin-utils", - "slab", - "wasm-bindgen-futures", -] - -[[package]] -name = "async-stream" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" -dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-stream-impl" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "async-task" -version = "4.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" - -[[package]] -name = "async-trait" -version = "0.1.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "atoi" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" -dependencies = [ - "num-traits", -] - -[[package]] -name = "atoi_simd" -version = "0.15.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ae037714f313c1353189ead58ef9eec30a8e8dc101b2622d461418fd59e28a9" - -[[package]] -name = "atomic-waker" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - -[[package]] -name = "autocfg" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" - -[[package]] -name = "backtrace" -version = "0.3.72" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17c6a35df3749d2e8bb1b7b21a976d82b15548788d2735b9d82f329268f71a11" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - -[[package]] -name = "basic-cookies" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67bd8fd42c16bdb08688243dc5f0cc117a3ca9efeeaba3a345a18a6159ad96f7" -dependencies = [ - "lalrpop", - "lalrpop-util", - "regex", -] - -[[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" -dependencies = [ - "serde", -] - -[[package]] -name = "blocking" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" -dependencies = [ - "async-channel 2.3.1", - "async-task", - "futures-io", - "futures-lite 2.3.0", - "piper", -] - -[[package]] -name = "brotli" -version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d640d25bc63c50fb1f0b545ffd80207d2e10a4c965530809b40ba3386825c391" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", - "brotli-decompressor", -] - -[[package]] -name = "brotli-decompressor" -version = "2.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", -] - -[[package]] -name = "bumpalo" -version = "3.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" - -[[package]] -name = "bytemuck" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78834c15cb5d5efe3452d58b1e8ba890dd62d21907f867f383358198e56ebca5" -dependencies = [ - "bytemuck_derive", -] - -[[package]] -name = "bytemuck_derive" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" - -[[package]] -name = "cc" -version = "1.0.98" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" -dependencies = [ - "jobserver", - "libc", - "once_cell", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", - "num-traits", - "serde", - "wasm-bindgen", - "windows-targets 0.52.5", -] - -[[package]] -name = "chrono-tz" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59ae0466b83e838b81a54256c39d5d7c20b9d7daa10510a242d9b75abd5936e" -dependencies = [ - "chrono", - "chrono-tz-build", - "phf", -] - -[[package]] -name = "chrono-tz-build" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433e39f13c9a060046954e0592a8d0a4bcb1040125cbf91cb8ee58964cfb350f" -dependencies = [ - "parse-zoneinfo", - "phf", - "phf_codegen", -] - -[[package]] -name = "clap" -version = "4.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_derive" -version = "4.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" -dependencies = [ - "heck 0.5.0", - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "clap_lex" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" - -[[package]] -name = "colorchoice" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" - -[[package]] -name = "comfy-table" -version = "7.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b34115915337defe99b2aff5c2ce6771e5fbc4079f4b506301f5cf394c8452f7" -dependencies = [ - "crossterm", - "strum", - "strum_macros 0.26.4", - "unicode-width", -] - -[[package]] -name = "concurrent-queue" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" - -[[package]] -name = "crc32fast" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-queue" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" - -[[package]] -name = "crossterm" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" -dependencies = [ - "bitflags 2.5.0", - "crossterm_winapi", - "libc", - "parking_lot", - "winapi", -] - -[[package]] -name = "crossterm_winapi" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" -dependencies = [ - "winapi", -] - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "csv" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" -dependencies = [ - "csv-core", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "csv-core" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" -dependencies = [ - "memchr", -] - -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - -[[package]] -name = "doc-comment" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" - -[[package]] -name = "dyn-clone" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" - -[[package]] -name = "earcutr" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79127ed59a85d7687c409e9978547cffb7dc79675355ed22da6b66fd5f6ead01" -dependencies = [ - "itertools 0.11.0", - "num-traits", -] - -[[package]] -name = "either" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" - -[[package]] -name = "ena" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d248bdd43ce613d87415282f69b9bb99d947d290b10962dd6c56233312c2ad5" -dependencies = [ - "log", -] - -[[package]] -name = "encoding_rs" -version = "0.8.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "enum_dispatch" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" -dependencies = [ - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "env_logger" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" -dependencies = [ - "humantime", - "is-terminal", - "log", - "regex", - "termcolor", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "ethnum" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b90ca2580b73ab6a1f724b76ca11ab632df820fd6040c336200d2c1df7b3c82c" - -[[package]] -name = "event-listener" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" - -[[package]] -name = "event-listener" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener" -version = "5.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener-strategy" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" -dependencies = [ - "event-listener 5.3.1", - "pin-project-lite", -] - -[[package]] -name = "fallible-streaming-iterator" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" - -[[package]] -name = "fast-float" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95765f67b4b18863968b4a1bd5bb576f732b29a4a28c7cd84c09fa3e2875f33c" - -[[package]] -name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - -[[package]] -name = "fastrand" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" - -[[package]] -name = "fixedbitset" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" - -[[package]] -name = "flatbuffers" -version = "23.5.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dac53e22462d78c16d64a1cd22371b54cc3fe94aa15e7886a2fa6e5d1ab8640" -dependencies = [ - "bitflags 1.3.2", - "rustc_version", -] - -[[package]] -name = "flate2" -version = "1.0.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "flatgeobuf" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b7d486286d0fc946e00b0133fa2ded824e08f03412450e5d9a1f446abcd589d" -dependencies = [ - "byteorder", - "bytes", - "fallible-streaming-iterator", - "flatbuffers", - "geozero", - "http-range-client", - "log", - "reqwest 0.11.27", - "tempfile", -] - -[[package]] -name = "float_next_after" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf7cc16383c4b8d58b9905a8509f02926ce3058053c056376248d958c9df1e8" - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "foreign_vec" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee1b05cbd864bcaecbd3455d6d967862d446e4ebfc3c2e5e5b9841e53cba6673" - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "futures" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" - -[[package]] -name = "futures-executor" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" - -[[package]] -name = "futures-lite" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" -dependencies = [ - "fastrand 1.9.0", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite", - "waker-fn", -] - -[[package]] -name = "futures-lite" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" -dependencies = [ - "fastrand 2.1.0", - "futures-core", - "futures-io", - "parking", - "pin-project-lite", -] - -[[package]] -name = "futures-macro" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "futures-sink" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" - -[[package]] -name = "futures-task" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" - -[[package]] -name = "futures-util" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "geo" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f811f663912a69249fa620dcd2a005db7254529da2d8a0b23942e81f47084501" -dependencies = [ - "earcutr", - "float_next_after", - "geo-types", - "geographiclib-rs", - "log", - "num-traits", - "robust", - "rstar", - "spade", -] - -[[package]] -name = "geo-types" -version = "0.7.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ff16065e5720f376fbced200a5ae0f47ace85fd70b7e54269790281353b6d61" -dependencies = [ - "approx", - "num-traits", - "rstar", - "serde", -] - -[[package]] -name = "geographiclib-rs" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6e5ed84f8089c70234b0a8e0aedb6dc733671612ddc0d37c6066052f9781960" -dependencies = [ - "libm", -] - -[[package]] -name = "geojson" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5d728c1df1fbf328d74151efe6cb0586f79ee813346ea981add69bd22c9241b" -dependencies = [ - "geo-types", - "log", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "geozero" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61d25cc15c7e5b86cd8dadea56bb78c46f346d4fb09022e7cbba0839c890d0a1" -dependencies = [ - "csv", - "geo-types", - "geojson", - "log", - "serde_json", - "thiserror", - "wkt", -] - -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi", - "wasm-bindgen", -] - -[[package]] -name = "gimli" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "gloo-timers" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "h2" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" -dependencies = [ - "atomic-waker", - "bytes", - "fnv", - "futures-core", - "futures-sink", - "http 1.1.0", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "hash32" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" -dependencies = [ - "byteorder", -] - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", - "allocator-api2", - "rayon", -] - -[[package]] -name = "heapless" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" -dependencies = [ - "hash32", - "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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - -[[package]] -name = "http-body" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" -dependencies = [ - "bytes", - "http 1.1.0", -] - -[[package]] -name = "http-body-util" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" -dependencies = [ - "bytes", - "futures-core", - "http 1.1.0", - "http-body 1.0.0", - "pin-project-lite", -] - -[[package]] -name = "http-range-client" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c724cf94381bf0f09a60c980ae732d1f2859ee2a98a0d6bce68ae509f915785c" -dependencies = [ - "async-trait", - "byteorder", - "bytes", - "read-logger", - "reqwest 0.11.27", - "thiserror", -] - -[[package]] -name = "httparse" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "httpmock" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08ec9586ee0910472dec1a1f0f8acf52f0fdde93aea74d70d4a3107b4be0fd5b" -dependencies = [ - "assert-json-diff", - "async-object-pool", - "async-std", - "async-trait", - "base64 0.21.7", - "basic-cookies", - "crossbeam-utils", - "form_urlencoded", - "futures-util", - "hyper 0.14.29", - "lazy_static", - "levenshtein", - "log", - "regex", - "serde", - "serde_json", - "serde_regex", - "similar", - "tokio", - "url", -] - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - -[[package]] -name = "hyper" -version = "0.14.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2 0.5.7", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "h2 0.4.5", - "http 1.1.0", - "http-body 1.0.0", - "httparse", - "itoa", - "pin-project-lite", - "smallvec", - "tokio", - "want", -] - -[[package]] -name = "hyper-rustls" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" -dependencies = [ - "futures-util", - "http 0.2.12", - "hyper 0.14.29", - "rustls", - "tokio", - "tokio-rustls", -] - -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper 0.14.29", - "native-tls", - "tokio", - "tokio-native-tls", -] - -[[package]] -name = "hyper-tls" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" -dependencies = [ - "bytes", - "http-body-util", - "hyper 1.3.1", - "hyper-util", - "native-tls", - "tokio", - "tokio-native-tls", - "tower-service", -] - -[[package]] -name = "hyper-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b875924a60b96e5d7b9ae7b066540b1dd1cbd90d1828f54c92e02a283351c56" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http 1.1.0", - "http-body 1.0.0", - "hyper 1.3.1", - "pin-project-lite", - "socket2 0.5.7", - "tokio", - "tower", - "tower-service", - "tracing", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "idna" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "indexmap" -version = "2.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" -dependencies = [ - "equivalent", - "hashbrown", - "serde", -] - -[[package]] -name = "instant" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "ipnet" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" - -[[package]] -name = "is-terminal" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "is_terminal_polyfill" -version = "1.70.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" - -[[package]] -name = "itertools" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" - -[[package]] -name = "itoap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9028f49264629065d057f340a86acb84867925865f73bbf8d47b4d149a7e88b8" - -[[package]] -name = "jobserver" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" -dependencies = [ - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "kv-log-macro" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" -dependencies = [ - "log", -] - -[[package]] -name = "lalrpop" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" -dependencies = [ - "ascii-canvas", - "bit-set", - "ena", - "itertools 0.11.0", - "lalrpop-util", - "petgraph", - "pico-args", - "regex", - "regex-syntax", - "string_cache", - "term", - "tiny-keccak", - "unicode-xid", - "walkdir", -] - -[[package]] -name = "lalrpop-util" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" -dependencies = [ - "regex-automata", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "levenshtein" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db13adb97ab515a3691f56e4dbab09283d0b86cb45abd991d8634a9d6f501760" - -[[package]] -name = "libc" -version = "0.2.155" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" - -[[package]] -name = "libm" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" - -[[package]] -name = "libredox" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" -dependencies = [ - "bitflags 2.5.0", - "libc", -] - -[[package]] -name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - -[[package]] -name = "linux-raw-sys" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" - -[[package]] -name = "lock_api" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" -dependencies = [ - "value-bag", -] - -[[package]] -name = "lz4" -version = "1.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1" -dependencies = [ - "libc", - "lz4-sys", -] - -[[package]] -name = "lz4-sys" -version = "1.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "memchr" -version = "2.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" - -[[package]] -name = "memmap2" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f49388d20533534cd19360ad3d6a7dadc885944aa802ba3995040c5ec11288c6" -dependencies = [ - "libc", -] - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "miniz_oxide" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" -dependencies = [ - "libc", - "wasi", - "windows-sys 0.48.0", -] - -[[package]] -name = "multiversion" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4851161a11d3ad0bf9402d90ffc3967bf231768bfd7aeb61755ad06dbf1a142" -dependencies = [ - "multiversion-macros", - "target-features", -] - -[[package]] -name = "multiversion-macros" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79a74ddee9e0c27d2578323c13905793e91622148f138ba29738f9dddb835e90" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "target-features", -] - -[[package]] -name = "native-tls" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" -dependencies = [ - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "new_debug_unreachable" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" - -[[package]] -name = "now" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d89e9874397a1f0a52fc1f197a8effd9735223cb2390e9dcc83ac6cd02923d0" -dependencies = [ - "chrono", -] - -[[package]] -name = "ntapi" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" -dependencies = [ - "winapi", -] - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", - "libm", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "object" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8ec7ab813848ba4522158d5517a6093db1ded27575b070f4177b8d12b41db5e" -dependencies = [ - "memchr", -] - -[[package]] -name = "object_store" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8718f8b65fdf67a45108d1548347d4af7d71fb81ce727bbf9e3b2535e079db3" -dependencies = [ - "async-trait", - "base64 0.21.7", - "bytes", - "chrono", - "futures", - "humantime", - "hyper 0.14.29", - "itertools 0.12.1", - "parking_lot", - "percent-encoding", - "quick-xml", - "rand", - "reqwest 0.11.27", - "ring", - "serde", - "serde_json", - "snafu", - "tokio", - "tracing", - "url", - "walkdir", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "openssl" -version = "0.10.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" -dependencies = [ - "bitflags 2.5.0", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-sys" -version = "0.9.102" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "parking" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" - -[[package]] -name = "parking_lot" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets 0.52.5", -] - -[[package]] -name = "parquet-format-safe" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1131c54b167dd4e4799ce762e1ab01549ebb94d5bdd13e6ec1b467491c378e1f" -dependencies = [ - "async-trait", - "futures", -] - -[[package]] -name = "parse-zoneinfo" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f2a05b18d44e2957b88f96ba460715e295bc1d7510468a2f3d3b44535d26c24" -dependencies = [ - "regex", -] - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "petgraph" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" -dependencies = [ - "fixedbitset", - "indexmap", -] - -[[package]] -name = "phf" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" -dependencies = [ - "phf_shared 0.11.2", -] - -[[package]] -name = "phf_codegen" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" -dependencies = [ - "phf_generator", - "phf_shared 0.11.2", -] - -[[package]] -name = "phf_generator" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" -dependencies = [ - "phf_shared 0.11.2", - "rand", -] - -[[package]] -name = "phf_shared" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" -dependencies = [ - "siphasher", -] - -[[package]] -name = "phf_shared" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" -dependencies = [ - "siphasher", -] - -[[package]] -name = "pico-args" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" - -[[package]] -name = "pin-project" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "piper" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1d5c74c9876f070d3e8fd503d748c7d974c3e48da8f41350fa5222ef9b4391" -dependencies = [ - "atomic-waker", - "fastrand 2.1.0", - "futures-io", -] - -[[package]] -name = "pkg-config" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" - -[[package]] -name = "planus" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc1691dd09e82f428ce8d6310bd6d5da2557c82ff17694d2a32cad7242aea89f" -dependencies = [ - "array-init-cursor", -] - -[[package]] -name = "polars" -version = "0.39.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea21b858b16b9c0e17a12db2800d11aa5b4bd182be6b3022eb537bbfc1f2db5" -dependencies = [ - "getrandom", - "polars-arrow", - "polars-core", - "polars-error", - "polars-io", - "polars-lazy", - "polars-ops", - "polars-parquet", - "polars-sql", - "polars-time", - "polars-utils", - "version_check", -] - -[[package]] -name = "polars-arrow" -version = "0.39.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "725b09f2b5ef31279b66e27bbab63c58d49d8f6696b66b1f46c7eaab95e80f75" -dependencies = [ - "ahash", - "atoi", - "atoi_simd", - "bytemuck", - "chrono", - "chrono-tz", - "dyn-clone", - "either", - "ethnum", - "fast-float", - "foreign_vec", - "futures", - "getrandom", - "hashbrown", - "itoa", - "itoap", - "lz4", - "multiversion", - "num-traits", - "polars-arrow-format", - "polars-error", - "polars-utils", - "ryu", - "serde", - "simdutf8", - "streaming-iterator", - "strength_reduce", - "version_check", - "zstd", -] - -[[package]] -name = "polars-arrow-format" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b0ef2474af9396b19025b189d96e992311e6a47f90c53cd998b36c4c64b84c" -dependencies = [ - "planus", - "serde", -] - -[[package]] -name = "polars-compute" -version = "0.39.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a796945b14b14fbb79b91ef0406e6fddca2be636e889f81ea5d6ee7d36efb4fe" -dependencies = [ - "bytemuck", - "either", - "num-traits", - "polars-arrow", - "polars-error", - "polars-utils", - "strength_reduce", - "version_check", -] - -[[package]] -name = "polars-core" -version = "0.39.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465f70d3e96b6d0b1a43c358ba451286b8c8bd56696feff020d65702aa33e35c" -dependencies = [ - "ahash", - "bitflags 2.5.0", - "bytemuck", - "chrono", - "chrono-tz", - "comfy-table", - "either", - "hashbrown", - "indexmap", - "num-traits", - "once_cell", - "polars-arrow", - "polars-compute", - "polars-error", - "polars-row", - "polars-utils", - "rand", - "rand_distr", - "rayon", - "regex", - "serde", - "smartstring", - "thiserror", - "version_check", - "xxhash-rust", -] - -[[package]] -name = "polars-error" -version = "0.39.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5224d5d05e6b8a6f78b75951ae1b5f82c8ab1979e11ffaf5fd41941e3d5b0757" -dependencies = [ - "object_store", - "polars-arrow-format", - "regex", - "simdutf8", - "thiserror", -] - -[[package]] -name = "polars-io" -version = "0.39.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2c8589e418cbe4a48228d64b2a8a40284a82ec3c98817c0c2bcc0267701338b" -dependencies = [ - "ahash", - "async-trait", - "atoi_simd", - "bytes", - "chrono", - "fast-float", - "futures", - "home", - "itoa", - "memchr", - "memmap2", - "num-traits", - "object_store", - "once_cell", - "percent-encoding", - "polars-arrow", - "polars-core", - "polars-error", - "polars-parquet", - "polars-time", - "polars-utils", - "rayon", - "regex", - "ryu", - "serde", - "serde_json", - "simdutf8", - "smartstring", - "tokio", - "tokio-util", - "url", -] - -[[package]] -name = "polars-lazy" -version = "0.39.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2632b1af668e2058d5f8f916d8fbde3cac63d03ae29a705f598e41dcfeb7f" -dependencies = [ - "ahash", - "bitflags 2.5.0", - "futures", - "glob", - "once_cell", - "polars-arrow", - "polars-core", - "polars-io", - "polars-ops", - "polars-pipe", - "polars-plan", - "polars-time", - "polars-utils", - "rayon", - "smartstring", - "tokio", - "version_check", -] - -[[package]] -name = "polars-ops" -version = "0.39.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efdbdb4d9a92109bc2e0ce8e17af5ae8ab643bb5b7ee9d1d74f0aeffd1fbc95f" -dependencies = [ - "ahash", - "argminmax", - "base64 0.21.7", - "bytemuck", - "chrono", - "chrono-tz", - "either", - "hashbrown", - "hex", - "indexmap", - "memchr", - "num-traits", - "polars-arrow", - "polars-compute", - "polars-core", - "polars-error", - "polars-utils", - "rayon", - "regex", - "smartstring", - "unicode-reverse", - "version_check", -] - -[[package]] -name = "polars-parquet" -version = "0.39.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b421d2196f786fdfe162db614c8485f8308fe41575d4de634a39bbe460d1eb6a" -dependencies = [ - "ahash", - "async-stream", - "base64 0.21.7", - "brotli", - "ethnum", - "flate2", - "futures", - "lz4", - "num-traits", - "parquet-format-safe", - "polars-arrow", - "polars-error", - "polars-utils", - "seq-macro", - "simdutf8", - "snap", - "streaming-decompression", - "zstd", -] - -[[package]] -name = "polars-pipe" -version = "0.39.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48700f1d5bd56a15451e581f465c09541492750360f18637b196f995470a015c" -dependencies = [ - "crossbeam-channel", - "crossbeam-queue", - "enum_dispatch", - "futures", - "hashbrown", - "num-traits", - "polars-arrow", - "polars-compute", - "polars-core", - "polars-io", - "polars-ops", - "polars-plan", - "polars-row", - "polars-utils", - "rayon", - "smartstring", - "tokio", - "uuid", - "version_check", -] - -[[package]] -name = "polars-plan" -version = "0.39.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fb8e2302e20c44defd5be8cad9c96e75face63c3a5f609aced8c4ec3b3ac97d" -dependencies = [ - "ahash", - "bytemuck", - "chrono-tz", - "futures", - "hashbrown", - "once_cell", - "percent-encoding", - "polars-arrow", - "polars-core", - "polars-io", - "polars-ops", - "polars-parquet", - "polars-time", - "polars-utils", - "rayon", - "recursive", - "regex", - "smartstring", - "strum_macros 0.25.3", - "version_check", -] - -[[package]] -name = "polars-row" -version = "0.39.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a515bdc68c2ae3702e3de70d89601f3b71ca8137e282a226dddb53ee4bacfa2e" -dependencies = [ - "bytemuck", - "polars-arrow", - "polars-error", - "polars-utils", -] - -[[package]] -name = "polars-sql" -version = "0.39.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4bb7cc1c04c3023d1953b2f1dec50515e8fd8169a5a2bf4967b3b082232db7" -dependencies = [ - "hex", - "polars-arrow", - "polars-core", - "polars-error", - "polars-lazy", - "polars-plan", - "rand", - "serde", - "serde_json", - "sqlparser", -] - -[[package]] -name = "polars-time" -version = "0.39.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efc18e3ad92eec55db89d88f16c22d436559ba7030cf76f86f6ed7a754b673f1" -dependencies = [ - "atoi", - "chrono", - "chrono-tz", - "now", - "once_cell", - "polars-arrow", - "polars-core", - "polars-error", - "polars-ops", - "polars-utils", - "regex", - "smartstring", -] - -[[package]] -name = "polars-utils" -version = "0.39.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c760b6c698cfe2fbbbd93d6cfb408db14ececfe1d92445dae2229ce1b5b21ae8" -dependencies = [ - "ahash", - "bytemuck", - "hashbrown", - "indexmap", - "num-traits", - "once_cell", - "polars-error", - "raw-cpuid", - "rayon", - "smartstring", - "stacker", - "sysinfo", - "version_check", -] - -[[package]] -name = "polling" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if", - "concurrent-queue", - "libc", - "log", - "pin-project-lite", - "windows-sys 0.48.0", -] - -[[package]] -name = "polling" -version = "3.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6a007746f34ed64099e88783b0ae369eaa3da6392868ba262e2af9b8fbaea1" -dependencies = [ - "cfg-if", - "concurrent-queue", - "hermit-abi", - "pin-project-lite", - "rustix 0.38.34", - "tracing", - "windows-sys 0.52.0", -] - -[[package]] -name = "popgetter_cli" -version = "0.1.0" -dependencies = [ - "anyhow", - "chrono", - "clap", - "comfy-table", - "enum_dispatch", - "flatgeobuf", - "futures", - "geo", - "geojson", - "geozero", - "httpmock", - "itertools 0.13.0", - "log", - "polars", - "pretty_env_logger", - "regex", - "reqwest 0.12.4", - "serde", - "serde_json", - "strum", - "strum_macros 0.26.4", - "thiserror", - "tokio", - "toml", - "typify", - "wkb", - "wkt", - "xdg", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "precomputed-hash" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" - -[[package]] -name = "pretty_env_logger" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "865724d4dbe39d9f3dd3b52b88d859d66bcb2d6a0acfd5ea68a65fb66d4bdc1c" -dependencies = [ - "env_logger", - "log", -] - -[[package]] -name = "proc-macro2" -version = "1.0.85" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "psm" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" -dependencies = [ - "cc", -] - -[[package]] -name = "quick-xml" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" -dependencies = [ - "memchr", - "serde", -] - -[[package]] -name = "quote" -version = "1.0.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rand_distr" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" -dependencies = [ - "num-traits", - "rand", -] - -[[package]] -name = "raw-cpuid" -version = "11.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e29830cbb1290e404f24c73af91c5d8d631ce7e128691e9477556b540cd01ecd" -dependencies = [ - "bitflags 2.5.0", -] - -[[package]] -name = "rayon" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - -[[package]] -name = "read-logger" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7f715a23c7db804b71eb9162a9cf210b89e99db9c3649a2a038d13b7594a99" -dependencies = [ - "log", -] - -[[package]] -name = "recursive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0786a43debb760f491b1bc0269fe5e84155353c67482b9e60d0cfb596054b43e" -dependencies = [ - "recursive-proc-macro-impl", - "stacker", -] - -[[package]] -name = "recursive-proc-macro-impl" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76009fbe0614077fc1a2ce255e3a1881a2e3a3527097d5dc6d8212c585e7e38b" -dependencies = [ - "quote", - "syn 2.0.66", -] - -[[package]] -name = "redox_syscall" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" -dependencies = [ - "bitflags 2.5.0", -] - -[[package]] -name = "redox_users" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" -dependencies = [ - "getrandom", - "libredox", - "thiserror", -] - -[[package]] -name = "regex" -version = "1.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" - -[[package]] -name = "regress" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f5f39ba4513916c1b2657b72af6ec671f091cd637992f58d0ede5cae4e5dea0" -dependencies = [ - "hashbrown", - "memchr", -] - -[[package]] -name = "reqwest" -version = "0.11.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" -dependencies = [ - "base64 0.21.7", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.29", - "hyper-rustls", - "hyper-tls 0.5.0", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls", - "rustls-native-certs", - "rustls-pemfile 1.0.4", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "system-configuration", - "tokio", - "tokio-native-tls", - "tokio-rustls", - "tokio-util", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-streams", - "web-sys", - "winreg 0.50.0", -] - -[[package]] -name = "reqwest" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" -dependencies = [ - "base64 0.22.1", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2 0.4.5", - "http 1.1.0", - "http-body 1.0.0", - "http-body-util", - "hyper 1.3.1", - "hyper-tls 0.6.0", - "hyper-util", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls-pemfile 2.1.2", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "system-configuration", - "tokio", - "tokio-native-tls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg 0.52.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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf4a6aa5f6d6888f39e980649f3ad6b666acdce1d78e95b8a2cb076e687ae30" - -[[package]] -name = "rstar" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "133315eb94c7b1e8d0cb097e5a710d850263372fd028fff18969de708afc7008" -dependencies = [ - "heapless", - "num-traits", - "smallvec", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver", -] - -[[package]] -name = "rustix" -version = "0.37.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - -[[package]] -name = "rustix" -version = "0.38.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" -dependencies = [ - "bitflags 2.5.0", - "errno", - "libc", - "linux-raw-sys 0.4.14", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustls" -version = "0.21.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" -dependencies = [ - "log", - "ring", - "rustls-webpki", - "sct", -] - -[[package]] -name = "rustls-native-certs" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" -dependencies = [ - "openssl-probe", - "rustls-pemfile 1.0.4", - "schannel", - "security-framework", -] - -[[package]] -name = "rustls-pemfile" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" -dependencies = [ - "base64 0.21.7", -] - -[[package]] -name = "rustls-pemfile" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" -dependencies = [ - "base64 0.22.1", - "rustls-pki-types", -] - -[[package]] -name = "rustls-pki-types" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" - -[[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "rustversion" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" - -[[package]] -name = "ryu" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "schannel" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "schemars" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" -dependencies = [ - "dyn-clone", - "schemars_derive", - "serde", - "serde_json", -] - -[[package]] -name = "schemars_derive" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" -dependencies = [ - "proc-macro2", - "quote", - "serde_derive_internals", - "syn 2.0.66", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "security-framework" -version = "2.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" -dependencies = [ - "bitflags 2.5.0", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "semver" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" - -[[package]] -name = "seq-macro" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" - -[[package]] -name = "serde" -version = "1.0.203" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.203" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "serde_derive_internals" -version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "serde_json" -version = "1.0.117" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_regex" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8136f1a4ea815d7eac4101cfd0b16dc0cb5e1fe1b8609dfd728058656b7badf" -dependencies = [ - "regex", - "serde", -] - -[[package]] -name = "serde_spanned" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_tokenstream" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a00ffd23fd882d096f09fcaae2a9de8329a328628e86027e049ee051dc1621f" -dependencies = [ - "proc-macro2", - "quote", - "serde", - "syn 2.0.66", -] - -[[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 = "signal-hook-registry" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" -dependencies = [ - "libc", -] - -[[package]] -name = "simdutf8" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" - -[[package]] -name = "similar" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa42c91313f1d05da9b26f267f931cf178d4aba455b4c4622dd7355eb80c6640" - -[[package]] -name = "siphasher" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - -[[package]] -name = "smartstring" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29" -dependencies = [ - "autocfg", - "serde", - "static_assertions", - "version_check", -] - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" - -[[package]] -name = "socket2" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "socket2" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "spade" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b20a809169ae442497e41a997fc5f14e2eea04e6ac590816a910d5d8068c8c0" -dependencies = [ - "hashbrown", - "num-traits", - "robust", - "smallvec", -] - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - -[[package]] -name = "sqlparser" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "743b4dc2cbde11890ccb254a8fc9d537fa41b36da00de2a1c5e9848c9bc42bd7" -dependencies = [ - "log", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "stacker" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce" -dependencies = [ - "cc", - "cfg-if", - "libc", - "psm", - "winapi", -] - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "streaming-decompression" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf6cc3b19bfb128a8ad11026086e31d3ce9ad23f8ea37354b31383a187c44cf3" -dependencies = [ - "fallible-streaming-iterator", -] - -[[package]] -name = "streaming-iterator" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2231b7c3057d5e4ad0156fb3dc807d900806020c5ffa3ee6ff2c8c76fb8520" - -[[package]] -name = "strength_reduce" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe895eb47f22e2ddd4dabc02bce419d2e643c8e3b585c78158b349195bc24d82" - -[[package]] -name = "string_cache" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" -dependencies = [ - "new_debug_unreachable", - "once_cell", - "parking_lot", - "phf_shared 0.10.0", - "precomputed-hash", -] - -[[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - -[[package]] -name = "strum" -version = "0.26.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" - -[[package]] -name = "strum_macros" -version = "0.25.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.66", -] - -[[package]] -name = "strum_macros" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" -dependencies = [ - "heck 0.5.0", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.66", -] - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.66" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - -[[package]] -name = "sysinfo" -version = "0.30.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "732ffa00f53e6b2af46208fba5718d9662a421049204e156328b66791ffa15ae" -dependencies = [ - "cfg-if", - "core-foundation-sys", - "libc", - "ntapi", - "once_cell", - "windows", -] - -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "target-features" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1bbb9f3c5c463a01705937a24fdabc5047929ac764b2d5b9cf681c1f5041ed5" - -[[package]] -name = "tempfile" -version = "3.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" -dependencies = [ - "cfg-if", - "fastrand 2.1.0", - "rustix 0.38.34", - "windows-sys 0.52.0", -] - -[[package]] -name = "term" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" -dependencies = [ - "dirs-next", - "rustversion", - "winapi", -] - -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "thiserror" -version = "1.0.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -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.38.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "num_cpus", - "parking_lot", - "pin-project-lite", - "signal-hook-registry", - "socket2 0.5.7", - "tokio-macros", - "windows-sys 0.48.0", -] - -[[package]] -name = "tokio-macros" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "toml" -version = "0.8.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", -] - -[[package]] -name = "toml_datetime" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.22.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" -dependencies = [ - "indexmap", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", -] - -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "pin-project-lite", - "tokio", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-layer" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" - -[[package]] -name = "tower-service" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" - -[[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "tracing-core" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -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 = "typify" -version = "0.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c61e9db210bbff218e6535c664b37ec47da449169b98e7866d0580d0db75529" -dependencies = [ - "typify-impl", - "typify-macro", -] - -[[package]] -name = "typify-impl" -version = "0.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95e32f38493804f88e2dc7a5412eccd872ea5452b4db9b0a77de4df180f2a87e" -dependencies = [ - "heck 0.4.1", - "log", - "proc-macro2", - "quote", - "regress", - "schemars", - "serde_json", - "syn 2.0.66", - "thiserror", - "unicode-ident", -] - -[[package]] -name = "typify-macro" -version = "0.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc09508b72f63d521d68e42c7f172c7416d67986df44b3c7d1f7f9963948ed32" -dependencies = [ - "proc-macro2", - "quote", - "schemars", - "serde", - "serde_json", - "serde_tokenstream", - "syn 2.0.66", - "typify-impl", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-reverse" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6f4888ebc23094adfb574fdca9fdc891826287a6397d2cd28802ffd6f20c76" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "unicode-segmentation" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" - -[[package]] -name = "unicode-width" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" - -[[package]] -name = "unicode-xid" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" - -[[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.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "utf8parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" - -[[package]] -name = "uuid" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" -dependencies = [ - "getrandom", -] - -[[package]] -name = "value-bag" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a84c137d37ab0142f0f2ddfe332651fdbf252e7b7dbb4e67b6c1f1b2e925101" - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "waker-fn" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" - -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.66", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" - -[[package]] -name = "wasm-streams" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" -dependencies = [ - "futures-util", - "js-sys", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "web-sys" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" -dependencies = [ - "windows-core", - "windows-targets 0.52.5", -] - -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.5", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.5", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" -dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", - "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" - -[[package]] -name = "winnow" -version = "0.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ff33f391015ecab21cd092389215eb265ef9496a9a07b6bee7d3529831deda" -dependencies = [ - "memchr", -] - -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - -[[package]] -name = "winreg" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - -[[package]] -name = "wkb" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66c806dac841607a62b0e8babf620fea51429f6ea005545491198fcbfd9004a2" -dependencies = [ - "geo-types", - "num-traits", -] - -[[package]] -name = "wkt" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c2252781f8927974e8ba6a67c965a759a2b88ea2b1825f6862426bbb1c8f41" -dependencies = [ - "geo-types", - "log", - "num-traits", - "thiserror", -] - -[[package]] -name = "xdg" -version = "2.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546" - -[[package]] -name = "xxhash-rust" -version = "0.8.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927da81e25be1e1a2901d59b81b37dd2efd1fc9c9345a55007f09bf5a2d3ee03" - -[[package]] -name = "zerocopy" -version = "0.7.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "zstd" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "7.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a" -dependencies = [ - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "2.0.10+zstd.1.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" -dependencies = [ - "cc", - "pkg-config", -] diff --git a/popgetter/Cargo.toml b/popgetter/Cargo.toml index 1eb24b6..5304bed 100644 --- a/popgetter/Cargo.toml +++ b/popgetter/Cargo.toml @@ -9,33 +9,35 @@ path = "src/lib.rs" [dependencies] anyhow = "1.0.75" -serde = { version = "1.0", features = ["derive"] } -serde_json = {version="1.0"} -tokio = { version = "1.30.0", features = ["full"] } -clap = { version = "4.5.0", features = ["derive"] } -polars = {version ="^0.40.0", features = ["lazy","is_in","http","streaming", "parquet","polars-io","regex","strings","rows"]} chrono = {version="0.4.37", features=['serde']} -reqwest = {version = "0.12.3", features = ["json"]} -strum = "0.26" -strum_macros = "0.26" +clap = { version = "4.5.0", features = ["derive"] } +comfy-table = "7.1.1" enum_dispatch = "0.3" flatgeobuf = "~4.1.0" -geozero = {version = "0.12.0", features= ["with-csv","with-geojson"]} -httpmock = "0.7.0-rc.1" -geojson={version="0.24.1", optional=true } geo = "0.28.0" -wkt = "0.10.3" -wkb = "0.7.1" +geojson={version="0.24.1", optional=true } +geozero = {version = "0.12.0", features= ["with-csv","with-geojson"]} +futures = "0.3.30" +itertools = "0.13.0" log = "0.4.21" +polars = {version ="0.40.0", features = ["lazy","is_in","http","streaming","parquet","polars-io","regex","strings","rows"]} pretty_env_logger = "0.5.0" -futures = "0.3.30" -toml = "0.8.13" -xdg = "2.5.2" regex = "1.10.4" -itertools = "0.13.0" -comfy-table = "7.1.1" +reqwest = {version = "0.12.3", features = ["json"]} +serde = { version = "1.0", features = ["derive"] } +serde_json = {version="1.0"} +strum_macros = "0.26" +strum = "0.26" +tokio = { version = "1.30.0", features = ["full"] } thiserror = "1" +toml = "0.8.13" +wkt = "0.10.3" +wkb = "0.7.1" +xdg = "2.5.2" +nonempty = { version = "0.10.0", features = ["serialize"] } +[dev-dependencies] +httpmock = "0.7.0-rc.1" [features] default = ["formatters"] diff --git a/popgetter/src/cli.rs b/popgetter/src/cli.rs deleted file mode 100644 index 5fa546f..0000000 --- a/popgetter/src/cli.rs +++ /dev/null @@ -1,380 +0,0 @@ -// FromStr is required by EnumString. The compiler seems to not be able to -// see that and so is giving a warning. Dont remove it -use anyhow::Result; -use clap::{Args, Parser, Subcommand}; -use enum_dispatch::enum_dispatch; -use log::{debug, info}; -use popgetter::{ - config::Config, - data_request_spec::{BBox, DataRequestSpec, GeometrySpec, MetricSpec, RegionSpec}, - formatters::{ - CSVFormatter, GeoJSONFormatter, GeoJSONSeqFormatter, OutputFormatter, OutputGenerator, - }, - metadata::MetricId, - search::*, - Popgetter, -}; -use serde::{Deserialize, Serialize}; -use std::fs::{self, File}; -use strum_macros::EnumString; - -use crate::display::display_search_results; - -/// Defines the output formats we are able to produce data in. -#[derive(Clone, Debug, Deserialize, Serialize, EnumString, PartialEq, Eq)] -#[strum(ascii_case_insensitive)] -pub enum OutputFormat { - GeoJSON, - GeoJSONSeq, - Csv, - GeoParquet, - FlatGeobuf, -} - -/// Trait that defines what to run when a given subcommand is invoked. -#[enum_dispatch] -pub trait RunCommand { - async fn run(&self, config: Config) -> Result<()>; -} - -/// The Data command is the one we invoke to get a set of metrics and geometry -/// for some given region and set of metrics. Currently it takes two arguments -/// - bbox: A Bounding box -/// - metrics: A comma seperated list of metrics to retrive. -/// -/// The Data command can be converted into a `DataRequestSpec` which is the processed -/// by the core library. -#[derive(Args, Debug)] -pub struct DataCommand { - /// Only get data in bounding box ([min_lat,min_lng,max_lat,max_lng]) - #[arg( - short, - long, - allow_hyphen_values(true), - help = "Bounding box in which to get the results. Format is: min_lon, min_lat, max_lon, max_lat " - )] - bbox: Option, - /// Specify a metric by hxl - #[arg( - short = 'h', - long, - help = "Specify a metric by Humanitarian Exchange Language tag" - )] - hxl: Option>, - - // Specify a metric by id - #[arg( - short = 'i', - long, - help = "Specify a metric by uuid, can be a partial uuid" - )] - id: Option>, - - // Specify a metric by name - #[arg(short = 'n', long, help = "Specify a metric by Human readable name")] - name: Option>, - - /// Specify output format - #[arg(short = 'f', long, help = "One of GeoJSON, CSV, GeoJSONSeq")] - output_format: OutputFormat, - - /// Specify where the result should be saved - #[arg(short = 'o', long, help = "Output file to place the results")] - output_file: String, - - /// Specify the years we should get the result for - #[arg( - short = 'y', - long, - help = "Specify the year ranges for which you are interested in the metrics" - )] - years: Option>, -} - -impl DataCommand { - pub fn gather_metric_requests(&self) -> Vec { - let mut metric_ids: Vec = vec![]; - - if let Some(ids) = &self.id { - for id in ids { - metric_ids.push(MetricId::Id(id.clone())); - } - } - - if let Some(hxls) = &self.hxl { - for hxl in hxls { - metric_ids.push(MetricId::Hxl(hxl.clone())); - } - } - - if let Some(names) = &self.name { - for name in names { - metric_ids.push(MetricId::CommonName(name.clone())); - } - } - - metric_ids - } -} - -impl From<&OutputFormat> for OutputFormatter { - fn from(value: &OutputFormat) -> Self { - match value { - OutputFormat::GeoJSON => OutputFormatter::GeoJSON(GeoJSONFormatter), - OutputFormat::Csv => OutputFormatter::Csv(CSVFormatter::default()), - OutputFormat::GeoJSONSeq => OutputFormatter::GeoJSONSeq(GeoJSONSeqFormatter), - _ => todo!("output format not implemented"), - } - } -} - -impl From for OutputFormatter { - fn from(value: OutputFormat) -> Self { - Self::from(&value) - } -} - -impl RunCommand for DataCommand { - async fn run(&self, config: Config) -> Result<()> { - info!("Running `data` subcommand"); - - let popgetter = Popgetter::new_with_config(config).await?; - let data_request = DataRequestSpec::from(self); - let mut results = popgetter.get_data_request(&data_request).await?; - - debug!("{results:#?}"); - let mut f = File::create(&self.output_file)?; - let formatter: OutputFormatter = (&self.output_format).into(); - formatter.save(&mut f, &mut results)?; - - Ok(()) - } -} - -impl From<&DataCommand> for DataRequestSpec { - fn from(value: &DataCommand) -> Self { - let region = if let Some(bbox) = value.bbox.clone() { - vec![RegionSpec::BoundingBox(bbox)] - } else { - vec![] - }; - - let metrics = value - .gather_metric_requests() - .into_iter() - .map(MetricSpec::Metric) - .collect(); - - DataRequestSpec { - geometry: GeometrySpec::default(), - region, - metrics, - years: None, - } - } -} - -/// The Metrics command allows a user to search for a set of metrics by bounding box and filter. -/// The set of ways to search will likley increase over time -#[derive(Args, Debug)] -pub struct MetricsCommand { - #[arg( - short, - long, - value_name = "min_lat,min_lng,max_lat,max_lng", - help = "Bounding box in which to get the results" - )] - bbox: Option, - #[arg(short, long, help = "Filter by year")] - year: Option>, - #[arg(short, long, help = "Filter by geometry level")] - geometry_level: Option>, - #[arg(short, long, help = "Filter by source data release name")] - source_data_release: Option>, - #[arg(short, long, help = "Filter by data publisher name")] - publisher: Option>, - #[arg(short, long, help = "Filter by country")] - country: Option>, - #[arg( - long, - help = "Filter by source metric ID (i.e. the name of the table in the original data release)" - )] - source_metric_id: Option>, - // Filters for text - #[arg(long, help="Filter by HXL tag", num_args=0..)] - hxl: Vec, - #[arg(long, help="Filter by metric name", num_args=0..)] - name: Vec, - #[arg(long, help="Filter by metric description", num_args=0..)] - description: Vec, - #[arg(short, long, help="Filter by HXL tag, name, or description", num_args=0..)] - text: Vec, - // Output options - #[arg( - short, - long, - help = "Show all metrics even if there are a large number" - )] - full: bool, -} - -impl RunCommand for MetricsCommand { - async fn run(&self, config: Config) -> Result<()> { - info!("Running `metrics` subcommand"); - debug!("{:#?}", self); - - let mut all_text_searches: Vec = vec![]; - all_text_searches.extend(self.hxl.iter().map(|t| SearchText { - text: t.clone(), - context: vec![SearchContext::Hxl], - })); - all_text_searches.extend(self.name.iter().map(|t| SearchText { - text: t.clone(), - context: vec![SearchContext::HumanReadableName], - })); - all_text_searches.extend(self.description.iter().map(|t| SearchText { - text: t.clone(), - context: vec![SearchContext::Description], - })); - all_text_searches.extend(self.text.iter().map(|t| SearchText { - text: t.clone(), - context: SearchContext::all(), - })); - - let search_request = SearchRequest { - text: all_text_searches, - year: self.year.clone().map(Year), - geometry_level: self.geometry_level.clone().map(GeometryLevel), - source_data_release: self.source_data_release.clone().map(SourceDataRelease), - data_publisher: self.publisher.clone().map(DataPublisher), - country: self.country.clone().map(Country), - census_table: self.source_metric_id.clone().map(SourceMetricId), - }; - let popgetter = Popgetter::new_with_config(config).await?; - - let search_results = popgetter.search(&search_request).await?; - let len_requests = search_results.0.shape().0; - - println!("Found {} metrics.", len_requests); - - if len_requests > 50 && !self.full { - display_search_results(search_results, Some(50)); - println!( - "{} more results not shown. Use --full to show all results.", - len_requests - 50 - ); - } else { - display_search_results(search_results, None); - } - Ok(()) - } -} - -/// The Countries command should return information about the various countries we have data for. -/// This could include metrics like the number of surveys / metrics / geographies avaliable for each country. -#[derive(Args, Debug)] -pub struct CountriesCommand; - -impl RunCommand for CountriesCommand { - async fn run(&self, config: Config) -> Result<()> { - let _popgetter = Popgetter::new_with_config(config).await?; - Ok(()) - } -} - -/// The Surveys command should list the various surveys that popgetter has access to and releated -/// stastistics. -#[derive(Args, Debug)] -pub struct SurveysCommand; - -impl RunCommand for SurveysCommand { - async fn run(&self, config: Config) -> Result<()> { - info!("Running `surveys` subcommand"); - Ok(()) - } -} - -/// The Recipe command loads a recipy file and generates the output data requested -#[derive(Args, Debug)] -pub struct RecipeCommand { - #[arg(index = 1)] - recipe_file: String, - - #[arg(short = 'f', long)] - output_format: OutputFormat, - - #[arg(short = 'o', long)] - output_file: String, -} - -impl RunCommand for RecipeCommand { - async fn run(&self, config: Config) -> Result<()> { - let popgetter = Popgetter::new_with_config(config).await?; - let config = fs::read_to_string(&self.recipe_file)?; - let data_request: DataRequestSpec = serde_json::from_str(&config)?; - let mut results = popgetter.get_data_request(&data_request).await?; - println!("{results}"); - let formatter: OutputFormatter = (&self.output_format).into(); - let mut f = File::create(&self.output_file)?; - formatter.save(&mut f, &mut results)?; - Ok(()) - } -} - -/// The entrypoint for the CLI. -#[derive(Parser, Debug)] -#[command(version, about, long_about = None, name="popgetter", long_about="Popgetter is a tool to quickly get the data you need!")] -pub struct Cli { - #[command(subcommand)] - pub command: Option, -} - -/// Commands contains the list of subcommands avaliable for use in the CLI. -/// Each command should implmement the RunCommand trait and specify the list -/// of required args for that command. -#[derive(Subcommand, Debug)] -#[enum_dispatch(RunCommand)] -pub enum Commands { - /// List countries for which data are available - Countries(CountriesCommand), - /// Output data for a given region and set of metrics - Data(DataCommand), - /// List and filter available metrics. Multiple filters are applied conjunctively, i.e. this - /// command only returns metrics that match all filters. - Metrics(MetricsCommand), - /// Surveys - Surveys(SurveysCommand), - /// From recipe - Recipe(RecipeCommand), -} - -#[cfg(test)] -mod tests { - use std::str::FromStr; - - use super::*; - - #[test] - fn output_type_should_deserialize_properly() { - let output_format = OutputFormat::from_str("GeoJSON"); - assert_eq!( - output_format.unwrap(), - OutputFormat::GeoJSON, - "geojson format should be parsed correctly" - ); - let output_format = OutputFormat::from_str("GeoJson"); - assert_eq!( - output_format.unwrap(), - OutputFormat::GeoJSON, - "parsing should be case insensitive" - ); - let output_format = OutputFormat::from_str("geoparquet"); - assert_eq!( - output_format.unwrap(), - OutputFormat::GeoParquet, - "correct variants should parse correctly" - ); - let output_format = OutputFormat::from_str("awesome_tiny_model"); - assert!(output_format.is_err(), "non listed formats should fail"); - } -} diff --git a/popgetter/src/lib.rs b/popgetter/src/lib.rs index 38ac10b..225eea4 100644 --- a/popgetter/src/lib.rs +++ b/popgetter/src/lib.rs @@ -42,8 +42,4 @@ impl Popgetter { pub fn search(&self, search_params: SearchParams) -> SearchResults { search_params.search(&self.metadata.combined_metric_source_geometry()) } - - pub async fn search(&self, search_request: &SearchRequest) -> Result { - search_request.clone().search_results(&self.metadata) - } } diff --git a/popgetter/src/main.rs b/popgetter/src/main.rs deleted file mode 100644 index c3bda74..0000000 --- a/popgetter/src/main.rs +++ /dev/null @@ -1,40 +0,0 @@ -mod cli; -mod display; - -use anyhow::Result; -use clap::Parser; -use cli::{Cli, RunCommand}; -use log::debug; -use popgetter::config::Config; - -#[tokio::main] -async fn main() -> Result<()> { - pretty_env_logger::init_timed(); - - let args = Cli::parse(); - debug!("args: {args:?}"); - let config: Config = read_config_from_toml(); - debug!("config: {config:?}"); - - if let Some(command) = args.command { - command.run(config).await?; - } - Ok(()) -} - -fn read_config_from_toml() -> Config { - // macOS: ~/.config/popgetter/config.toml - let xdg_dirs = xdg::BaseDirectories::with_prefix("popgetter").unwrap(); - let file_path = xdg_dirs.place_config_file("config.toml").unwrap(); - - match std::fs::read_to_string(file_path) { - Ok(contents) => toml::from_str(&contents).expect("Invalid TOML in config file"), - Err(e) => { - if e.kind() == std::io::ErrorKind::NotFound { - Config::default() - } else { - panic!("Error reading config file: {:#?}", e); - } - } - } -} diff --git a/popgetter/src/search.rs b/popgetter/src/search.rs index a81e897..3244342 100644 --- a/popgetter/src/search.rs +++ b/popgetter/src/search.rs @@ -244,7 +244,7 @@ pub struct SourceMetricId(pub String); /// However, if a parameter has multiple values (e.g. multiple text strings), these are combined /// with an OR operation. So searching for multiple text strings will return metrics that satisfy /// any of the text strings. -#[derive(Clone, Debug, Deserialize, Serialize)] +#[derive(Clone, Debug, Deserialize, Serialize, Default)] pub struct SearchParams { pub text: Vec, pub year_range: Option>, diff --git a/popgetter_cli/Cargo.toml b/popgetter_cli/Cargo.toml index f35b03a..952144c 100644 --- a/popgetter_cli/Cargo.toml +++ b/popgetter_cli/Cargo.toml @@ -1,23 +1,37 @@ [package] name = "popgetter_cli" -version = "0.1.0" +version = "0.2.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[[bin]] +name = "popgetter" +path = "src/main.rs" + [dependencies] anyhow = "1.0.75" serde = { version = "1.0", features = ["derive"] } -serde_json = {version="1.0"} +serde_json = { version = "1.0" } tokio = { version = "1.30.0", features = ["full"] } clap = { version = "4.5.0", features = ["derive"] } -polars = {version ="0.39.2", features = ["lazy","is_in","http","streaming", "parquet","polars-io","regex","strings","rows"]} -reqwest = {version = "0.12.3", features = ["json"]} +polars = { version = "0.40.0", features = [ + "lazy", + "is_in", + "http", + "streaming", + "parquet", + "polars-io", + "regex", + "strings", + "rows", +] } +reqwest = { version = "0.12.3", features = ["json"] } enum_dispatch = "0.3" flatgeobuf = "~4.1.0" -geozero = {version = "0.12.0", features= ["with-csv","with-geojson"]} +geozero = { version = "0.12.0", features = ["with-csv", "with-geojson"] } toml = "0.8.13" -popgetter= {path="../popgetter"} +popgetter = { path = "../popgetter" } comfy-table = "7.1.1" itertools = "0.13.0" strum_macros = "0.26.4" @@ -25,3 +39,5 @@ xdg = "2.5.2" log = "0.4.21" pretty_env_logger = "0.5.0" strum = "0.26" +spinners = "4.1.1" +nonempty = { version = "0.10.0", features = ["serialize"] } diff --git a/popgetter_py/Cargo.toml b/popgetter_py/Cargo.toml index 87c7ac5..26134fc 100644 --- a/popgetter_py/Cargo.toml +++ b/popgetter_py/Cargo.toml @@ -9,9 +9,19 @@ name = "popgetter" crate-type = ["cdylib"] [dependencies] -pyo3 = {version= "^0.21.0", features=["experimental-async"]} -pyo3-polars="0.14.0" -popgetter= {path="../popgetter"} -polars = {version ="^0.40.0", features = ["lazy","is_in","http","streaming", "parquet","polars-io","regex","strings","rows"]} +pyo3 = { version = "^0.21.0", features = ["experimental-async"] } +pyo3-polars = "0.14.0" +popgetter = { path = "../popgetter" } +polars = { version = "0.40.0", features = [ + "lazy", + "is_in", + "http", + "streaming", + "parquet", + "polars-io", + "regex", + "strings", + "rows", +] } futures = "0.3.30" tokio = "1.38.0" diff --git a/popgetter_py/src/lib.rs b/popgetter_py/src/lib.rs index b57730d..9f4da51 100644 --- a/popgetter_py/src/lib.rs +++ b/popgetter_py/src/lib.rs @@ -2,7 +2,7 @@ use std::default::Default; use ::popgetter::{ data_request_spec::{DataRequestSpec, GeometrySpec, MetricSpec}, - search::{SearchContext, SearchRequest, SearchResults, SearchText}, + search::{SearchParams, SearchText}, }; use polars::prelude::DataFrame; use pyo3::{ @@ -12,12 +12,12 @@ use pyo3::{ use pyo3_polars::PyDataFrame; async fn _search() -> DataFrame { - let search_request: SearchRequest = SearchRequest::default(); + let search_params: SearchParams = SearchParams::default(); let popgetter = ::popgetter::Popgetter::new().await.unwrap(); - let search_results = popgetter.search(&search_request).await.unwrap(); + let search_results = popgetter.search(search_params); search_results .0 - .select(&[ + .select([ "metric_id", "human_readable_name", "metric_description", @@ -33,25 +33,25 @@ async fn _search() -> DataFrame { // popgetter.search(&search_request).await.unwrap() // } -fn get_search(obj: &Bound<'_, PyAny>) -> PyResult { +fn get_search(obj: &Bound<'_, PyAny>) -> PyResult { if let Ok(text) = obj.downcast::() { println!("object is a string {}", text); let search_text = SearchText { text: text.to_string(), ..SearchText::default() }; - return Ok(SearchRequest { + return Ok(SearchParams { text: vec![search_text], - ..SearchRequest::default() + ..SearchParams::default() }); } if let Ok(dict) = obj.downcast::() { println!("Object is a dict {}", dict); - return Ok(SearchRequest::default()); + return Ok(SearchParams::default()); }; - Ok(SearchRequest::default()) + Ok(SearchParams::default()) } fn get_data_request(obj: &Bound<'_, PyAny>) -> PyResult { @@ -61,7 +61,7 @@ fn get_data_request(obj: &Bound<'_, PyAny>) -> PyResult { geometry_level: None, }, region: vec![], - metrics: vec![MetricSpec::Metric(::popgetter::metadata::MetricId::Hxl( + metrics: vec![MetricSpec::Metric(::popgetter::search::MetricId( r"\#population\+adults".into(), ))], years: None, @@ -71,7 +71,8 @@ fn get_data_request(obj: &Bound<'_, PyAny>) -> PyResult { async fn _get_data(data_request: &DataRequestSpec) -> DataFrame { let popgetter = ::popgetter::Popgetter::new().await.unwrap(); println!("running data request {:#?}", data_request); - popgetter.get_data_request(data_request).await.unwrap() + todo!("Uncomment the below when get_data_request implemented") + // popgetter.get_data_request(data_request).await.unwrap() } #[pyfunction] @@ -89,7 +90,7 @@ fn get( #[pyfunction] fn search( - #[pyo3(from_py_with = "get_search")] search_query: SearchRequest, + #[pyo3(from_py_with = "get_search")] search_query: SearchParams, ) -> PyResult { let rt = tokio::runtime::Builder::new_current_thread() .enable_all() From 13a48542294e7ee70065222012a5e9441a1d094c Mon Sep 17 00:00:00 2001 From: Sam Greenbury Date: Tue, 16 Jul 2024 20:09:25 +0100 Subject: [PATCH 06/22] Fix version --- popgetter/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/popgetter/Cargo.toml b/popgetter/Cargo.toml index 5304bed..b7e18e3 100644 --- a/popgetter/Cargo.toml +++ b/popgetter/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "popgetter" -version = "0.1.0" +version = "0.2.0" edition = "2021" [lib] From b7c4c93a002aab287a3c407e2f6f51fa074d774b Mon Sep 17 00:00:00 2001 From: Sam Greenbury Date: Wed, 17 Jul 2024 07:19:11 +0100 Subject: [PATCH 07/22] Add data request config --- src/cli.rs | 29 +++++++++++++++++++++++++---- src/data_request_spec.rs | 12 +++++++++--- src/search.rs | 18 ++++++++++-------- 3 files changed, 44 insertions(+), 15 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 6a804ad..1ce77e0 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -7,7 +7,7 @@ use log::{debug, info}; use nonempty::nonempty; use popgetter::{ config::Config, - data_request_spec::{DataRequestSpec, GeometrySpec, RegionSpec}, + data_request_spec::{DataRequestConfig, DataRequestSpec, GeometrySpec, RegionSpec}, formatters::{ CSVFormatter, GeoJSONFormatter, GeoJSONSeqFormatter, OutputFormatter, OutputGenerator, }, @@ -20,7 +20,7 @@ use popgetter::{ }; use serde::{Deserialize, Serialize}; use spinners::{Spinner, Spinners}; -use std::fs::File; +use std::{default, fs::File}; use std::{io, process}; use strum_macros::EnumString; @@ -118,6 +118,25 @@ impl From<&DataCommand> for DataRequestSpec { } } +impl From<&DataCommand> for DataRequestConfig { + fn from(value: &DataCommand) -> Self { + let region_spec = value + .bbox + .as_ref() + .map(|bbox| vec![RegionSpec::BoundingBox(bbox.clone())]) + .unwrap_or_default(); + + Self { + include_geoms: if value.bbox.is_some() { + true + } else { + !value.no_geometry + }, + region_spec, + } + } +} + impl From<&OutputFormat> for OutputFormatter { fn from(value: &OutputFormat) -> Self { match value { @@ -150,7 +169,7 @@ impl RunCommand for DataCommand { // Make DataRequestSpec // TODO: consider alternative `From` impls as part of #67 - let data_request_spec = self.into(); + let data_request_config: DataRequestConfig = self.into(); // sp.stop_and_persist is potentially a better method, but not obvious how to // store the timing. Leaving below until that option is ruled out. @@ -180,7 +199,7 @@ impl RunCommand for DataCommand { ) }); let mut data = search_results - .download(&popgetter.config, data_request_spec) + .download(&popgetter.config, &data_request_config) .await?; if let Some(mut s) = sp { s.stop_with_symbol(COMPLETE_PROGRESS_STRING); @@ -359,6 +378,8 @@ impl From for SearchParams { country: args.country.clone().map(Country), source_metric_id: args.source_metric_id.clone().map(SourceMetricId), metric_id: args.id.clone().into_iter().map(MetricId).collect(), + include_geoms: true, + region_spec: vec![], } } } diff --git a/src/data_request_spec.rs b/src/data_request_spec.rs index 2e0564e..5fab5ea 100644 --- a/src/data_request_spec.rs +++ b/src/data_request_spec.rs @@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize}; use crate::geo::BBox; -use crate::search::MetricId; +use crate::search::{MetricId, SearchParams}; #[derive(Serialize, Deserialize, Debug, Default)] pub struct DataRequestSpec { @@ -14,6 +14,12 @@ pub struct DataRequestSpec { pub years: Option>, } +#[derive(Serialize, Deserialize, Debug, Default)] +pub struct DataRequestConfig { + pub include_geoms: bool, + pub region_spec: Vec, +} + // #[derive(Debug)] // pub struct MetricRequestResult { // pub metrics: Vec, @@ -77,7 +83,7 @@ impl Default for GeometrySpec { } } -#[derive(Serialize, Deserialize, Debug)] +#[derive(Clone, Serialize, Deserialize, Debug)] pub enum RegionSpec { BoundingBox(BBox), Polygon(Polygon), @@ -93,7 +99,7 @@ impl RegionSpec { } } -#[derive(Serialize, Deserialize, Debug)] +#[derive(Clone, Serialize, Deserialize, Debug)] pub struct Polygon; #[cfg(test)] diff --git a/src/search.rs b/src/search.rs index a81e897..0800fed 100644 --- a/src/search.rs +++ b/src/search.rs @@ -2,7 +2,7 @@ use crate::{ config::Config, - data_request_spec::DataRequestSpec, + data_request_spec::{DataRequestConfig, DataRequestSpec, RegionSpec}, geo::get_geometries, metadata::ExpandedMetadata, parquet::{get_metrics, MetricRequest}, @@ -244,7 +244,7 @@ pub struct SourceMetricId(pub String); /// However, if a parameter has multiple values (e.g. multiple text strings), these are combined /// with an OR operation. So searching for multiple text strings will return metrics that satisfy /// any of the text strings. -#[derive(Clone, Debug, Deserialize, Serialize)] +#[derive(Clone, Debug, Deserialize, Serialize, Default)] pub struct SearchParams { pub text: Vec, pub year_range: Option>, @@ -254,6 +254,8 @@ pub struct SearchParams { pub data_publisher: Option, pub country: Option, pub source_metric_id: Option, + pub include_geoms: bool, + pub region_spec: Vec, } impl SearchParams { @@ -356,7 +358,7 @@ impl SearchResults { pub async fn download( self, config: &Config, - data_request_spec: DataRequestSpec, + data_request_config: &DataRequestConfig, ) -> anyhow::Result { let metric_requests = self.to_metric_requests(config); debug!("metric_requests = {:#?}", metric_requests); @@ -372,16 +374,16 @@ impl SearchResults { unimplemented!("Multiple geometries not supported in current release"); } - let result = if data_request_spec.geometry.include_geoms { + let result = if data_request_config.include_geoms { // TODO Pass in the bbox as the second argument here - if data_request_spec.region.len() > 1 { + if data_request_config.region_spec.len() > 1 { todo!( "Multiple region specifications are not yet supported: {:#?}", - data_request_spec.region + data_request_config.region_spec ); } - let bbox = data_request_spec - .region + let bbox = data_request_config + .region_spec .first() .and_then(|region_spec| region_spec.bbox().clone()); From b1eebb9eccd92ae2614568318e94d75bcd25789b Mon Sep 17 00:00:00 2001 From: Sam Greenbury Date: Wed, 17 Jul 2024 21:51:01 +0100 Subject: [PATCH 08/22] Add FromStr impl for YearRange --- src/search.rs | 50 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 8 deletions(-) diff --git a/src/search.rs b/src/search.rs index 0800fed..eb6474d 100644 --- a/src/search.rs +++ b/src/search.rs @@ -2,19 +2,20 @@ use crate::{ config::Config, - data_request_spec::{DataRequestConfig, DataRequestSpec, RegionSpec}, + data_request_spec::RegionSpec, geo::get_geometries, metadata::ExpandedMetadata, parquet::{get_metrics, MetricRequest}, COL, }; +use anyhow::bail; use chrono::NaiveDate; use log::{debug, warn}; use nonempty::{nonempty, NonEmpty}; use polars::lazy::dsl::{col, lit, Expr}; use polars::prelude::{DataFrame, DataFrameJoinOps, IntoLazy, LazyFrame}; use serde::{Deserialize, Serialize}; -use std::collections::HashSet; +use std::{collections::HashSet, str::FromStr}; use tokio::try_join; // TODO: add trait/struct for combine_exprs @@ -211,6 +212,39 @@ pub enum YearRange { Between(u16, u16), } +impl FromStr for YearRange { + type Err = anyhow::Error; + + fn from_str(s: &str) -> Result { + fn str_to_option_u16(value: &str) -> Result, anyhow::Error> { + if value.is_empty() { + return Ok(None); + } + match value.parse::() { + Ok(value) => Ok(Some(value)), + Err(_) => bail!("Invalid year range"), + } + } + let parts: Vec> = s + .split("...") + .map(str_to_option_u16) + .collect::>, _>>()?; + match parts.as_slice() { + [Some(a)] => Ok(YearRange::Between(*a, *a)), + [None, Some(a)] => Ok(YearRange::Before(*a)), + [Some(a), None] => Ok(YearRange::After(*a)), + [Some(a), Some(b)] => { + if a > b { + bail!("Invalid year range") + } else { + Ok(YearRange::Between(*a, *b)) + } + } + _ => bail!("Invalid year range"), + } + } +} + /// Search over metric IDs #[derive(Clone, Debug, Deserialize, Serialize)] pub struct MetricId(pub String); @@ -254,7 +288,6 @@ pub struct SearchParams { pub data_publisher: Option, pub country: Option, pub source_metric_id: Option, - pub include_geoms: bool, pub region_spec: Vec, } @@ -358,7 +391,8 @@ impl SearchResults { pub async fn download( self, config: &Config, - data_request_config: &DataRequestConfig, + search_params: &SearchParams, + include_geoms: bool, ) -> anyhow::Result { let metric_requests = self.to_metric_requests(config); debug!("metric_requests = {:#?}", metric_requests); @@ -374,15 +408,15 @@ impl SearchResults { unimplemented!("Multiple geometries not supported in current release"); } - let result = if data_request_config.include_geoms { + let result = if include_geoms { // TODO Pass in the bbox as the second argument here - if data_request_config.region_spec.len() > 1 { + if search_params.region_spec.len() > 1 { todo!( "Multiple region specifications are not yet supported: {:#?}", - data_request_config.region_spec + search_params.region_spec ); } - let bbox = data_request_config + let bbox = search_params .region_spec .first() .and_then(|region_spec| region_spec.bbox().clone()); From b3f5475cda443b1754d5f12ae3a6062d4d6b9188 Mon Sep 17 00:00:00 2001 From: Sam Greenbury Date: Wed, 17 Jul 2024 21:51:34 +0100 Subject: [PATCH 09/22] Add try_from for DataRequestSpec into SearchParams --- src/data_request_spec.rs | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/src/data_request_spec.rs b/src/data_request_spec.rs index 5fab5ea..bd6e47e 100644 --- a/src/data_request_spec.rs +++ b/src/data_request_spec.rs @@ -1,10 +1,11 @@ // TODO: this module to be refactored following implementation of SearchParams. // See [#67](https://github.com/Urban-Analytics-Technology-Platform/popgetter-cli/issues/67) +use itertools::Itertools; use serde::{Deserialize, Serialize}; use crate::geo::BBox; -use crate::search::{MetricId, SearchParams}; +use crate::search::{GeometryLevel, MetricId, SearchParams, YearRange}; #[derive(Serialize, Deserialize, Debug, Default)] pub struct DataRequestSpec { @@ -14,10 +15,39 @@ pub struct DataRequestSpec { pub years: Option>, } -#[derive(Serialize, Deserialize, Debug, Default)] -pub struct DataRequestConfig { - pub include_geoms: bool, - pub region_spec: Vec, +impl TryFrom for SearchParams { + type Error = anyhow::Error; + fn try_from(value: DataRequestSpec) -> Result { + Ok(Self { + text: vec![], + year_range: if let Some(v) = value.years { + Some( + v.iter() + .map(|year| format!("{year}...{year}").parse::()) + .collect::, anyhow::Error>>()?, + ) + } else { + None + }, + metric_id: value + .metrics + .iter() + .filter_map(|metric| { + match metric { + MetricSpec::Metric(m) => Some(m.clone()), + // TODO: handle DataProduct variant + MetricSpec::DataProduct(_) => None, + } + }) + .collect_vec(), + geometry_level: value.geometry.geometry_level.map(GeometryLevel), + source_data_release: None, + data_publisher: None, + country: None, + source_metric_id: None, + region_spec: value.region, + }) + } } // #[derive(Debug)] From e3b20cc78b62d84473b14099df13b260e7001ca0 Mon Sep 17 00:00:00 2001 From: Sam Greenbury Date: Wed, 17 Jul 2024 21:52:16 +0100 Subject: [PATCH 10/22] Add bbox to search params, use FromStr impl --- src/cli.rs | 160 ++++++++++++++--------------------------------------- 1 file changed, 41 insertions(+), 119 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 1ce77e0..d762d12 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -7,7 +7,7 @@ use log::{debug, info}; use nonempty::nonempty; use popgetter::{ config::Config, - data_request_spec::{DataRequestConfig, DataRequestSpec, GeometrySpec, RegionSpec}, + data_request_spec::RegionSpec, formatters::{ CSVFormatter, GeoJSONFormatter, GeoJSONSeqFormatter, OutputFormatter, OutputGenerator, }, @@ -20,7 +20,7 @@ use popgetter::{ }; use serde::{Deserialize, Serialize}; use spinners::{Spinner, Spinners}; -use std::{default, fs::File}; +use std::fs::File; use std::{io, process}; use strum_macros::EnumString; @@ -52,21 +52,6 @@ pub trait RunCommand { /// The `data` command downloads and outputs metrics for a given region in a given format. #[derive(Args, Debug)] pub struct DataCommand { - #[arg( - short, - long, - value_name = "LEFT,BOTTOM,RIGHT,TOP", - allow_hyphen_values = true, - help = "\ - Bounding box in which to get the results. The bounding box provided must be in\n\ - the same coordinate system as used in the requested geometry file. For\n\ - example, United States has geometries with latitude and longitude (EPSG:4326),\n\ - Great Britain has geometries with the British National Grid (EPSG:27700),\n\ - Northern Ireland has geometries with the Irish Grid (EPSG:29902), and\n\ - Beligum has geometries with the Belgian Lambert 2008 reference system\n\ - (EPSG:3812)." - )] - bbox: Option, #[arg( short = 'f', long, @@ -94,49 +79,6 @@ pub struct DataCommand { quiet: bool, } -impl From<&DataCommand> for DataRequestSpec { - fn from(value: &DataCommand) -> Self { - let region = value - .bbox - .as_ref() - .map(|bbox| vec![RegionSpec::BoundingBox(bbox.clone())]) - .unwrap_or_default(); - let geometry = GeometrySpec { - // If region_spec provided, override and always include_geoms - include_geoms: if region.len().gt(&0) { - true - } else { - !value.no_geometry - }, - ..Default::default() - }; - Self { - geometry, - region, - ..Default::default() - } - } -} - -impl From<&DataCommand> for DataRequestConfig { - fn from(value: &DataCommand) -> Self { - let region_spec = value - .bbox - .as_ref() - .map(|bbox| vec![RegionSpec::BoundingBox(bbox.clone())]) - .unwrap_or_default(); - - Self { - include_geoms: if value.bbox.is_some() { - true - } else { - !value.no_geometry - }, - region_spec, - } - } -} - impl From<&OutputFormat> for OutputFormatter { fn from(value: &OutputFormat) -> Self { match value { @@ -165,11 +107,12 @@ impl RunCommand for DataCommand { ) }); let popgetter = Popgetter::new_with_config(config).await?; - let search_results = popgetter.search(self.search_params_args.clone().into()); + let search_params: SearchParams = self.search_params_args.clone().into(); + let search_results = popgetter.search(search_params.clone()); // Make DataRequestSpec // TODO: consider alternative `From` impls as part of #67 - let data_request_config: DataRequestConfig = self.into(); + // let data_request_config: DataRequestConfig = (self, &search_params).into(); // sp.stop_and_persist is potentially a better method, but not obvious how to // store the timing. Leaving below until that option is ruled out. @@ -199,7 +142,7 @@ impl RunCommand for DataCommand { ) }); let mut data = search_results - .download(&popgetter.config, &data_request_config) + .download(&popgetter.config, &search_params, !self.no_geometry) .await?; if let Some(mut s) = sp { s.stop_with_symbol(COMPLETE_PROGRESS_STRING); @@ -222,16 +165,6 @@ impl RunCommand for DataCommand { /// The set of ways to search will likley increase over time #[derive(Args, Debug)] pub struct MetricsCommand { - // TODO: consider implementation of bbox for metrics subcommand as part of: - // [#67](https://github.com/Urban-Analytics-Technology-Platform/popgetter-cli/issues/67) - // #[arg( - // short, - // long, - // value_name = "LEFT,BOTTOM,RIGHT,TOP", - // allow_hyphen_values=true, - // help = "TODO" - // )] - // bbox: Option, #[arg( short, long, @@ -292,44 +225,31 @@ struct SearchParamsArgs { description: Vec, #[arg(short, long, help="Filter by HXL tag, name, or description", num_args=0..)] text: Vec, + #[arg( + short, + long, + value_name = "LEFT,BOTTOM,RIGHT,TOP", + allow_hyphen_values = true, + help = "\ + Bounding box in which to get the results. The bounding box provided must be in\n\ + the same coordinate system as used in the requested geometry file. For\n\ + example, United States has geometries with latitude and longitude (EPSG:4326),\n\ + Great Britain has geometries with the British National Grid (EPSG:27700),\n\ + Northern Ireland has geometries with the Irish Grid (EPSG:29902), and\n\ + Beligum has geometries with the Belgian Lambert 2008 reference system\n\ + (EPSG:3812)." + )] + bbox: Option, } /// Expected behaviour: /// N.. -> After(N); ..N -> Before(N); M..N -> Between(M, N); N -> Between(N, N) /// Year ranges can be comma-separated -fn parse_year_range(value: &str) -> Result, &'static str> { - fn parse_single_year_range(value: &str) -> Result { - fn str_to_option_u16(value: &str) -> Result, &'static str> { - if value.is_empty() { - return Ok(None); - } - match value.parse::() { - Ok(value) => Ok(Some(value)), - Err(_) => Err("Invalid year range"), - } - } - let parts: Vec> = value - .split("...") - .map(str_to_option_u16) - .collect::>, &'static str>>()?; - match parts.as_slice() { - [Some(a)] => Ok(YearRange::Between(*a, *a)), - [None, Some(a)] => Ok(YearRange::Before(*a)), - [Some(a), None] => Ok(YearRange::After(*a)), - [Some(a), Some(b)] => { - if a > b { - Err("Invalid year range") - } else { - Ok(YearRange::Between(*a, *b)) - } - } - _ => Err("Invalid year range"), - } - } +fn parse_year_range(value: &str) -> Result, anyhow::Error> { value .split(',') - .map(parse_single_year_range) - .collect::, &'static str>>() + .map(|range| range.parse()) + .collect::, anyhow::Error>>() } // A simple function to manage similaries across multiple cases. @@ -378,8 +298,10 @@ impl From for SearchParams { country: args.country.clone().map(Country), source_metric_id: args.source_metric_id.clone().map(SourceMetricId), metric_id: args.id.clone().into_iter().map(MetricId).collect(), - include_geoms: true, - region_spec: vec![], + region_spec: args + .bbox + .map(|bbox| vec![RegionSpec::BoundingBox(bbox)]) + .unwrap_or_default(), } } } @@ -530,32 +452,32 @@ mod tests { #[test] fn test_parse_year_range() { assert_eq!( - parse_year_range("2000"), - Ok(vec![YearRange::Between(2000, 2000)]) + parse_year_range("2000").unwrap(), + vec![YearRange::Between(2000, 2000)] ); assert_eq!( - parse_year_range("2000..."), - Ok(vec![YearRange::After(2000)]) + parse_year_range("2000...").unwrap(), + vec![YearRange::After(2000)] ); assert_eq!( - parse_year_range("...2000"), - Ok(vec![YearRange::Before(2000)]) + parse_year_range("...2000").unwrap(), + vec![YearRange::Before(2000)] ); assert_eq!( - parse_year_range("2000...2001"), - Ok(vec![YearRange::Between(2000, 2001)]) + parse_year_range("2000...2001").unwrap(), + vec![YearRange::Between(2000, 2001)] ); assert_eq!( - parse_year_range("2000...2001,2005..."), - Ok(vec![YearRange::Between(2000, 2001), YearRange::After(2005)]) + parse_year_range("2000...2001,2005...").unwrap(), + vec![YearRange::Between(2000, 2001), YearRange::After(2005)] ); assert_eq!( - parse_year_range("...2001,2005,2009"), - Ok(vec![ + parse_year_range("...2001,2005,2009").unwrap(), + vec![ YearRange::Before(2001), YearRange::Between(2005, 2005), YearRange::Between(2009, 2009) - ]) + ] ); } From f380178e0ee9a908306b11b183d07e8f61ad298f Mon Sep 17 00:00:00 2001 From: Sam Greenbury Date: Wed, 17 Jul 2024 22:06:24 +0100 Subject: [PATCH 11/22] Reimplement recipe command, make geometry spec optional --- src/cli.rs | 72 ++++++++++++++++++++++++---------------- src/data_request_spec.rs | 6 ++-- test_recipe.json | 7 ++-- 3 files changed, 52 insertions(+), 33 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index d762d12..a64ce9e 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -7,7 +7,7 @@ use log::{debug, info}; use nonempty::nonempty; use popgetter::{ config::Config, - data_request_spec::RegionSpec, + data_request_spec::{DataRequestSpec, RegionSpec}, formatters::{ CSVFormatter, GeoJSONFormatter, GeoJSONSeqFormatter, OutputFormatter, OutputGenerator, }, @@ -380,32 +380,46 @@ impl RunCommand for SurveysCommand { } // // TODO: Reimplement this -// /// The Recipe command loads a recipe file and generates the output data requested -// #[derive(Args, Debug)] -// pub struct RecipeCommand { -// #[arg(index = 1)] -// recipe_file: String, - -// #[arg(short = 'f', long)] -// output_format: OutputFormat, - -// #[arg(short = 'o', long)] -// output_file: String, -// } - -// impl RunCommand for RecipeCommand { -// async fn run(&self, config: Config) -> Result<()> { -// let popgetter = Popgetter::new_with_config(config).await?; -// let recipe = fs::read_to_string(&self.recipe_file)?; -// let data_request: DataRequestSpec = serde_json::from_str(&recipe)?; -// let mut results = popgetter.get_data_request(&data_request).await?; -// println!("{results}"); -// let formatter: OutputFormatter = (&self.output_format).into(); -// let mut f = File::create(&self.output_file)?; -// formatter.save(&mut f, &mut results)?; -// Ok(()) -// } -// } +/// The Recipe command loads a recipe file and generates the output data requested +#[derive(Args, Debug)] +pub struct RecipeCommand { + #[arg(index = 1)] + recipe_file: String, + + #[arg(short = 'f', long)] + output_format: OutputFormat, + + #[arg(short = 'o', long)] + output_file: Option, +} + +impl RunCommand for RecipeCommand { + async fn run(&self, config: Config) -> Result<()> { + let popgetter = Popgetter::new_with_config(config).await?; + let recipe = std::fs::read_to_string(&self.recipe_file)?; + let data_request: DataRequestSpec = serde_json::from_str(&recipe)?; + let include_geoms = data_request + .geometry + .as_ref() + .map(|geo| geo.include_geoms) + .unwrap_or(true); + let search_params: SearchParams = data_request.try_into()?; + let search_results = popgetter.search(search_params.clone()); + let mut data = search_results + .download(&popgetter.config, &search_params, include_geoms) + .await?; + debug!("{data:#?}"); + let formatter: OutputFormatter = (&self.output_format).into(); + if let Some(output_file) = &self.output_file { + let mut f = File::create(output_file)?; + formatter.save(&mut f, &mut data)?; + } else { + let mut stdout_lock = std::io::stdout().lock(); + formatter.save(&mut stdout_lock, &mut data)?; + }; + Ok(()) + } +} /// The entrypoint for the CLI. #[derive(Parser, Debug)] @@ -439,8 +453,8 @@ pub enum Commands { Metrics(MetricsCommand), /// Surveys Surveys(SurveysCommand), - // /// From recipe - // Recipe(RecipeCommand), + /// From recipe + Recipe(RecipeCommand), } #[cfg(test)] diff --git a/src/data_request_spec.rs b/src/data_request_spec.rs index bd6e47e..c6d1885 100644 --- a/src/data_request_spec.rs +++ b/src/data_request_spec.rs @@ -9,7 +9,7 @@ use crate::search::{GeometryLevel, MetricId, SearchParams, YearRange}; #[derive(Serialize, Deserialize, Debug, Default)] pub struct DataRequestSpec { - pub geometry: GeometrySpec, + pub geometry: Option, pub region: Vec, pub metrics: Vec, pub years: Option>, @@ -40,7 +40,9 @@ impl TryFrom for SearchParams { } }) .collect_vec(), - geometry_level: value.geometry.geometry_level.map(GeometryLevel), + geometry_level: value + .geometry + .and_then(|geometry| geometry.geometry_level.map(GeometryLevel)), source_data_release: None, data_publisher: None, country: None, diff --git a/test_recipe.json b/test_recipe.json index 8d585b0..2940bfc 100644 --- a/test_recipe.json +++ b/test_recipe.json @@ -11,10 +11,13 @@ ], "metrics": [ { - "NamedMetric": "B01001_E002" + "Metric": "f29c1976" }, { - "NamedMetric": "B01001_E001" + "Metric": "079f3ba3" + }, + { + "Metric": "81cae95d" } ] } From cc65265aa15745cc462eaaaa453a9baa0be35ca0 Mon Sep 17 00:00:00 2001 From: Sam Greenbury Date: Thu, 25 Jul 2024 09:15:41 +0100 Subject: [PATCH 12/22] Refactor writing output --- src/cli.rs | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index a64ce9e..1522f6b 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -5,6 +5,7 @@ use clap::{Args, Parser, Subcommand}; use enum_dispatch::enum_dispatch; use log::{debug, info}; use nonempty::nonempty; +use polars::frame::DataFrame; use popgetter::{ config::Config, data_request_spec::{DataRequestSpec, RegionSpec}, @@ -20,7 +21,7 @@ use popgetter::{ }; use serde::{Deserialize, Serialize}; use spinners::{Spinner, Spinners}; -use std::fs::File; +use std::{fs::File, path::Path}; use std::{io, process}; use strum_macros::EnumString; @@ -43,6 +44,25 @@ pub enum OutputFormat { Stdout, } +fn write_output( + output_generator: T, + mut data: DataFrame, + output_file: Option, +) -> anyhow::Result<()> +where + T: OutputGenerator, + U: AsRef, +{ + if let Some(output_file) = output_file { + let mut f = File::create(output_file)?; + output_generator.save(&mut f, &mut data)?; + } else { + let mut stdout_lock = std::io::stdout().lock(); + output_generator.save(&mut stdout_lock, &mut data)?; + }; + Ok(()) +} + /// Trait that defines what to run when a given subcommand is invoked. #[enum_dispatch] pub trait RunCommand { @@ -141,7 +161,7 @@ impl RunCommand for DataCommand { "Downloading metrics".to_string() + RUNNING_TAIL_STRING, ) }); - let mut data = search_results + let data = search_results .download(&popgetter.config, &search_params, !self.no_geometry) .await?; if let Some(mut s) = sp { @@ -150,13 +170,7 @@ impl RunCommand for DataCommand { debug!("{data:#?}"); let formatter: OutputFormatter = (&self.output_format).into(); - if let Some(output_file) = &self.output_file { - let mut f = File::create(output_file)?; - formatter.save(&mut f, &mut data)?; - } else { - let mut stdout_lock = std::io::stdout().lock(); - formatter.save(&mut stdout_lock, &mut data)?; - }; + write_output(formatter, data, self.output_file.as_deref())?; Ok(()) } } @@ -405,18 +419,12 @@ impl RunCommand for RecipeCommand { .unwrap_or(true); let search_params: SearchParams = data_request.try_into()?; let search_results = popgetter.search(search_params.clone()); - let mut data = search_results + let data = search_results .download(&popgetter.config, &search_params, include_geoms) .await?; debug!("{data:#?}"); let formatter: OutputFormatter = (&self.output_format).into(); - if let Some(output_file) = &self.output_file { - let mut f = File::create(output_file)?; - formatter.save(&mut f, &mut data)?; - } else { - let mut stdout_lock = std::io::stdout().lock(); - formatter.save(&mut stdout_lock, &mut data)?; - }; + write_output(formatter, data, self.output_file.as_deref())?; Ok(()) } } From 7a39e7b23132873aaaa8e04b2384136631c241b3 Mon Sep 17 00:00:00 2001 From: Sam Greenbury Date: Thu, 25 Jul 2024 09:38:17 +0100 Subject: [PATCH 13/22] Include additional error handling for recipes --- src/search.rs | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/search.rs b/src/search.rs index eb6474d..017f4df 100644 --- a/src/search.rs +++ b/src/search.rs @@ -396,18 +396,32 @@ impl SearchResults { ) -> anyhow::Result { let metric_requests = self.to_metric_requests(config); debug!("metric_requests = {:#?}", metric_requests); + + if metric_requests.is_empty() { + bail!( + "No metric requests were derived from given `search_params`: {:#?}", + search_params + ) + } + let all_geom_files: HashSet = metric_requests .iter() .map(|m| m.geom_file.clone()) .collect(); - // Required because polars is blocking - let metrics = tokio::task::spawn_blocking(move || get_metrics(&metric_requests, None)); - // TODO Handle multiple responses + // TODO Handle multiple geometries if all_geom_files.len() > 1 { unimplemented!("Multiple geometries not supported in current release"); + } else if all_geom_files.len() == 0 { + bail!( + "No geometry files for the following `metric_requests`: {:#?}", + metric_requests + ) } + // Required because polars is blocking + let metrics = tokio::task::spawn_blocking(move || get_metrics(&metric_requests, None)); + let result = if include_geoms { // TODO Pass in the bbox as the second argument here if search_params.region_spec.len() > 1 { From f57460f3c1b8f5da615741ad319397c49ef20359 Mon Sep 17 00:00:00 2001 From: Sam Greenbury Date: Thu, 25 Jul 2024 18:25:11 +0100 Subject: [PATCH 14/22] Add MetricText for search params from data request spec --- src/data_request_spec.rs | 35 +++++++++++++++++++++++++---------- test_recipe.json | 23 +++++++++++++---------- 2 files changed, 38 insertions(+), 20 deletions(-) diff --git a/src/data_request_spec.rs b/src/data_request_spec.rs index c6d1885..e810351 100644 --- a/src/data_request_spec.rs +++ b/src/data_request_spec.rs @@ -2,10 +2,11 @@ // See [#67](https://github.com/Urban-Analytics-Technology-Platform/popgetter-cli/issues/67) use itertools::Itertools; +use nonempty::nonempty; use serde::{Deserialize, Serialize}; use crate::geo::BBox; -use crate::search::{GeometryLevel, MetricId, SearchParams, YearRange}; +use crate::search::{GeometryLevel, MetricId, SearchContext, SearchParams, SearchText, YearRange}; #[derive(Serialize, Deserialize, Debug, Default)] pub struct DataRequestSpec { @@ -18,12 +19,28 @@ pub struct DataRequestSpec { impl TryFrom for SearchParams { type Error = anyhow::Error; fn try_from(value: DataRequestSpec) -> Result { + // TODO: handle MetricSpec::DataProduct variant Ok(Self { - text: vec![], + // TODO: consider updating for regex field following [#66](https://github.com/Urban-Analytics-Technology-Platform/popgetter-cli/issues/66) + text: value + .metrics + .iter() + .filter_map(|metric| match metric { + MetricSpec::MetricText(text) => Some(SearchText { + text: text.clone(), + context: nonempty![ + SearchContext::HumanReadableName, + SearchContext::Hxl, + SearchContext::Description + ], + }), + _ => None, + }) + .collect_vec(), year_range: if let Some(v) = value.years { Some( v.iter() - .map(|year| format!("{year}...{year}").parse::()) + .map(|year| year.parse::()) .collect::, anyhow::Error>>()?, ) } else { @@ -32,12 +49,9 @@ impl TryFrom for SearchParams { metric_id: value .metrics .iter() - .filter_map(|metric| { - match metric { - MetricSpec::Metric(m) => Some(m.clone()), - // TODO: handle DataProduct variant - MetricSpec::DataProduct(_) => None, - } + .filter_map(|metric| match metric { + MetricSpec::MetricId(m) => Some(m.clone()), + _ => None, }) .collect_vec(), geometry_level: value @@ -96,7 +110,8 @@ impl TryFrom for SearchParams { #[derive(Serialize, Deserialize, Debug)] pub enum MetricSpec { - Metric(MetricId), + MetricId(MetricId), + MetricText(String), DataProduct(String), } diff --git a/test_recipe.json b/test_recipe.json index 2940bfc..0c3f117 100644 --- a/test_recipe.json +++ b/test_recipe.json @@ -1,23 +1,26 @@ { "region": [ { - "BoundingBox": [ - -74.251785, - 40.647043, - -73.673286, - 40.91014 - ] + "BoundingBox": [-74.251785, 40.647043, -73.673286, 40.91014] } ], "metrics": [ { - "Metric": "f29c1976" + "MetricId": "f29c1976" }, { - "Metric": "079f3ba3" + "MetricId": "079f3ba3" }, { - "Metric": "81cae95d" + "MetricId": "81cae95d" + }, + { + "MetricText": "Key: uniqueID, Value: B01001_001;" } - ] + ], + "years": ["2021"], + "geometry": { + "geometry_level": "tract", + "include_geoms": true + } } From dbd1c6086ef8c7b10b72319ae1a2167fe7d3ef0d Mon Sep 17 00:00:00 2001 From: Sam Greenbury Date: Fri, 26 Jul 2024 11:07:00 +0100 Subject: [PATCH 15/22] Update gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0592392..51c924c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /target .DS_Store +.vscode From 7d73d94a6596816d3297bc21af93840f03673238 Mon Sep 17 00:00:00 2001 From: Sam Greenbury Date: Fri, 26 Jul 2024 12:52:39 +0100 Subject: [PATCH 16/22] Add get API for popgetter --- src/lib.rs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 225eea4..810bbb6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,8 @@ use anyhow::Result; +use data_request_spec::DataRequestSpec; use log::debug; use metadata::Metadata; +use polars::frame::DataFrame; use search::{SearchParams, SearchResults}; use crate::config::Config; @@ -20,6 +22,7 @@ pub mod metadata; pub mod parquet; pub mod search; +/// Type for popgetter data and API pub struct Popgetter { pub metadata: Metadata, pub config: Config, @@ -42,4 +45,29 @@ impl Popgetter { pub fn search(&self, search_params: SearchParams) -> SearchResults { search_params.search(&self.metadata.combined_metric_source_geometry()) } + + /// Downloads results using popgetter given `SearchResults` + pub async fn get_data_request(&self, data_request_spec: DataRequestSpec) -> Result { + let include_geoms = data_request_spec + .geometry + .as_ref() + .map(|geo| geo.include_geoms) + .unwrap_or(true); + let search_params: SearchParams = data_request_spec.try_into()?; + let search_results = self.search(search_params.clone()); + search_results + .download(&self.config, &search_params, include_geoms) + .await + } + + /// Downloads results using popgetter given `SearchResults` + pub async fn get_search_params( + &self, + search_params: SearchParams, + include_geoms: bool, + ) -> Result { + self.search(search_params.clone()) + .download(&self.config, &search_params, include_geoms) + .await + } } From 1f98b0f9092c43ef0909663c26681db4a0cc5364 Mon Sep 17 00:00:00 2001 From: Sam Greenbury Date: Fri, 26 Jul 2024 15:56:27 +0100 Subject: [PATCH 17/22] Add popgetter_wasm crate Co-authored-by: griff-rees <60181741+griff-rees@users.noreply.github.com> --- Cargo.toml | 6 +-- popgetter_wasm/.gitignore | 6 +++ popgetter_wasm/Cargo.toml | 26 ++++++++++++ popgetter_wasm/README.md | 84 +++++++++++++++++++++++++++++++++++++ popgetter_wasm/src/lib.rs | 13 ++++++ popgetter_wasm/src/utils.rs | 10 +++++ popgetter_wasm/tests/web.rs | 13 ++++++ 7 files changed, 153 insertions(+), 5 deletions(-) create mode 100644 popgetter_wasm/.gitignore create mode 100644 popgetter_wasm/Cargo.toml create mode 100644 popgetter_wasm/README.md create mode 100644 popgetter_wasm/src/lib.rs create mode 100644 popgetter_wasm/src/utils.rs create mode 100644 popgetter_wasm/tests/web.rs diff --git a/Cargo.toml b/Cargo.toml index 9e68e11..e944f6b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,9 +1,5 @@ [workspace] -members = [ - "popgetter", - "popgetter_cli", - "popgetter_py" -] +members = ["popgetter", "popgetter_cli", "popgetter_py", "popgetter_wasm"] resolver = "2" diff --git a/popgetter_wasm/.gitignore b/popgetter_wasm/.gitignore new file mode 100644 index 0000000..4e30131 --- /dev/null +++ b/popgetter_wasm/.gitignore @@ -0,0 +1,6 @@ +/target +**/*.rs.bk +Cargo.lock +bin/ +pkg/ +wasm-pack.log diff --git a/popgetter_wasm/Cargo.toml b/popgetter_wasm/Cargo.toml new file mode 100644 index 0000000..fb3ba4e --- /dev/null +++ b/popgetter_wasm/Cargo.toml @@ -0,0 +1,26 @@ +[package] +name = "popgetter_wasm" +version = "0.1.0" +edition = "2021" + +[lib] +crate-type = ["cdylib", "rlib"] + +[features] +default = ["console_error_panic_hook"] + +[dependencies] +wasm-bindgen = "0.2.84" + +# The `console_error_panic_hook` crate provides better debugging of panics by +# logging them with `console.error`. This is great for development, but requires +# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for +# code size when deploying. +console_error_panic_hook = { version = "0.1.7", optional = true } + +[dev-dependencies] +wasm-bindgen-test = "0.3.34" + +[profile.release] +# Tell `rustc` to optimize for small code size. +opt-level = "s" diff --git a/popgetter_wasm/README.md b/popgetter_wasm/README.md new file mode 100644 index 0000000..6b68408 --- /dev/null +++ b/popgetter_wasm/README.md @@ -0,0 +1,84 @@ +
+ +

wasm-pack-template

+ + A template for kick starting a Rust and WebAssembly project using wasm-pack. + +

+ Build Status +

+ +

+ Tutorial + | + Chat +

+ + Built with 🦀🕸 by The Rust and WebAssembly Working Group +
+ +## About + +[**📚 Read this template tutorial! 📚**][template-docs] + +This template is designed for compiling Rust libraries into WebAssembly and +publishing the resulting package to NPM. + +Be sure to check out [other `wasm-pack` tutorials online][tutorials] for other +templates and usages of `wasm-pack`. + +[tutorials]: https://rustwasm.github.io/docs/wasm-pack/tutorials/index.html +[template-docs]: https://rustwasm.github.io/docs/wasm-pack/tutorials/npm-browser-packages/index.html + +## 🚴 Usage + +### 🐑 Use `cargo generate` to Clone this Template + +[Learn more about `cargo generate` here.](https://github.com/ashleygwilliams/cargo-generate) + +``` +cargo generate --git https://github.com/rustwasm/wasm-pack-template.git --name my-project +cd my-project +``` + +### 🛠️ Build with `wasm-pack build` + +``` +wasm-pack build +``` + +### 🔬 Test in Headless Browsers with `wasm-pack test` + +``` +wasm-pack test --headless --firefox +``` + +### 🎁 Publish to NPM with `wasm-pack publish` + +``` +wasm-pack publish +``` + +## 🔋 Batteries Included + +* [`wasm-bindgen`](https://github.com/rustwasm/wasm-bindgen) for communicating + between WebAssembly and JavaScript. +* [`console_error_panic_hook`](https://github.com/rustwasm/console_error_panic_hook) + for logging panic messages to the developer console. +* `LICENSE-APACHE` and `LICENSE-MIT`: most Rust projects are licensed this way, so these are included for you + +## License + +Licensed under either of + +* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) +* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) + +at your option. + +### Contribution + +Unless you explicitly state otherwise, any contribution intentionally +submitted for inclusion in the work by you, as defined in the Apache-2.0 +license, shall be dual licensed as above, without any additional terms or +conditions. diff --git a/popgetter_wasm/src/lib.rs b/popgetter_wasm/src/lib.rs new file mode 100644 index 0000000..4258a7a --- /dev/null +++ b/popgetter_wasm/src/lib.rs @@ -0,0 +1,13 @@ +mod utils; + +use wasm_bindgen::prelude::*; + +#[wasm_bindgen] +extern "C" { + fn alert(s: &str); +} + +#[wasm_bindgen] +pub fn greet() { + alert("Hello, popgetter-wasm!"); +} diff --git a/popgetter_wasm/src/utils.rs b/popgetter_wasm/src/utils.rs new file mode 100644 index 0000000..b1d7929 --- /dev/null +++ b/popgetter_wasm/src/utils.rs @@ -0,0 +1,10 @@ +pub fn set_panic_hook() { + // When the `console_error_panic_hook` feature is enabled, we can call the + // `set_panic_hook` function at least once during initialization, and then + // we will get better error messages if our code ever panics. + // + // For more details see + // https://github.com/rustwasm/console_error_panic_hook#readme + #[cfg(feature = "console_error_panic_hook")] + console_error_panic_hook::set_once(); +} diff --git a/popgetter_wasm/tests/web.rs b/popgetter_wasm/tests/web.rs new file mode 100644 index 0000000..de5c1da --- /dev/null +++ b/popgetter_wasm/tests/web.rs @@ -0,0 +1,13 @@ +//! Test suite for the Web and headless browsers. + +#![cfg(target_arch = "wasm32")] + +extern crate wasm_bindgen_test; +use wasm_bindgen_test::*; + +wasm_bindgen_test_configure!(run_in_browser); + +#[wasm_bindgen_test] +fn pass() { + assert_eq!(1 + 1, 2); +} From 46f04329beb5c99561070b26fc3f0e3842aa0bc9 Mon Sep 17 00:00:00 2001 From: Sam Greenbury Date: Tue, 30 Jul 2024 17:18:01 +0100 Subject: [PATCH 18/22] Update deps and features for wasm target * Adds dep on fork of polars with 'parquet' feature that compiles to wasm * Adds features 'wasm' and 'not_wasm' to enable target specific polars features to be be included --- .gitignore | 1 + Cargo.toml | 4 ++- popgetter/Cargo.toml | 67 +++++++++++++++++++++++++++++---------- popgetter/src/metadata.rs | 51 +++++++++++++++++++++++------ popgetter/src/parquet.rs | 57 +++++++++++++++++++++++---------- popgetter_cli/Cargo.toml | 9 ++---- 6 files changed, 140 insertions(+), 49 deletions(-) diff --git a/.gitignore b/.gitignore index 51c924c..aff7822 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /target .DS_Store .vscode +Cargo.lock \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index e944f6b..0e53a63 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,7 @@ [workspace] -members = ["popgetter", "popgetter_cli", "popgetter_py", "popgetter_wasm"] +# TODO: fix incompatibility of forked polars with pyo3-polars=0.14 +# members = ["popgetter", "popgetter_cli", "popgetter_py"] +members = ["popgetter", "popgetter_cli"] resolver = "2" diff --git a/popgetter/Cargo.toml b/popgetter/Cargo.toml index b7e18e3..403caa1 100644 --- a/popgetter/Cargo.toml +++ b/popgetter/Cargo.toml @@ -9,36 +9,71 @@ path = "src/lib.rs" [dependencies] anyhow = "1.0.75" -chrono = {version="0.4.37", features=['serde']} -clap = { version = "4.5.0", features = ["derive"] } -comfy-table = "7.1.1" +# Requires version 4.2.1 for WASM (see: https://github.com/flatgeobuf/flatgeobuf/pull/366) +flatgeobuf = "4.2.1" +chrono = { version = "0.4.37", features = ["serde"] } enum_dispatch = "0.3" -flatgeobuf = "~4.1.0" geo = "0.28.0" -geojson={version="0.24.1", optional=true } -geozero = {version = "0.12.0", features= ["with-csv","with-geojson"]} +geojson = { version = "0.24.1", optional = true } +geozero = { version = "0.13.0", default-features = false, features = [ + "with-csv", + "with-geojson", +] } +# TODO: check if not required +# http-range-client = { version = "0.7.2", optional = true, default-features = false, features = [ +# "reqwest-async", +# ] } futures = "0.3.30" itertools = "0.13.0" log = "0.4.21" -polars = {version ="0.40.0", features = ["lazy","is_in","http","streaming","parquet","polars-io","regex","strings","rows"]} -pretty_env_logger = "0.5.0" regex = "1.10.4" -reqwest = {version = "0.12.3", features = ["json"]} +reqwest ={ version = "0.11"} serde = { version = "1.0", features = ["derive"] } -serde_json = {version="1.0"} +serde_json = { version = "1.0" } strum_macros = "0.26" strum = "0.26" -tokio = { version = "1.30.0", features = ["full"] } +tokio = { version = "1", default-features = false, features = ["rt", "macros"] } thiserror = "1" -toml = "0.8.13" -wkt = "0.10.3" +wkt = "0.11" wkb = "0.7.1" -xdg = "2.5.2" nonempty = { version = "0.10.0", features = ["serialize"] } +# TODO: Exploring polars versions that can be compiled to WASM (see PR: https://github.com/pola-rs/polars/pull/16731) +# Current dependency is on a UATP fork where the "parquet" feature is updated to enable compilation +# to WASM. This will need to be temporary so a version pointing to a published crate remains +# possible (since crates.io requires no git deps) +polars = { git = "https://github.com/Urban-Analytics-Technology-Platform/polars.git", branch = "parquet-wasm", default-features = false} + [dev-dependencies] httpmock = "0.7.0-rc.1" [features] -default = ["formatters"] -formatters= ["dep:geojson"] +formatters = ["dep:geojson"] +default = ["formatters", "not_wasm"] +not_wasm = [ + "polars/csv", + "polars/temporal", + "polars/lazy", + "polars/is_in", + "polars/dtype-time", + "polars/parquet", + "polars/regex", + "polars/strings", + "polars/rows", + "polars/http", + "polars/streaming" +] +wasm = [ + "polars/csv", + "polars/temporal", + "polars/lazy", + "polars/is_in", + "polars/dtype-time", + "polars/parquet", + "polars/regex", + "polars/strings", + "polars/rows", + # "http" and "streaming" features do not compile to WASM due to dep "mio" that is introduced + # "polars/http", + # "polars/streaming" +] \ No newline at end of file diff --git a/popgetter/src/metadata.rs b/popgetter/src/metadata.rs index 9044903..8122da7 100644 --- a/popgetter/src/metadata.rs +++ b/popgetter/src/metadata.rs @@ -3,16 +3,22 @@ use std::fmt::Display; use anyhow::{anyhow, Result}; use futures::future::join_all; +#[cfg(target_arch = "wasm32")] +use polars::{io::SerReader, prelude::ParquetReader}; + use log::debug; use log::info; +#[cfg(not(target = "wasm32-unknown-unknown"))] +use polars::prelude::ScanArgsParquet; use polars::{ frame::DataFrame, lazy::{ dsl::col, - frame::{IntoLazy, LazyFrame, ScanArgsParquet}, + frame::{IntoLazy, LazyFrame}, }, prelude::{JoinArgs, JoinType, UnionArgs}, }; + use tokio::try_join; use crate::{config::Config, search::MetricId, COL}; @@ -85,7 +91,7 @@ impl Display for FullSelectionPlan { impl Metadata { /// Generate a Lazy DataFrame which joins the metrics, source and geometry metadata pub fn combined_metric_source_geometry(&self) -> ExpandedMetadata { - let df: LazyFrame = self + let mut df: LazyFrame = self .metrics .clone() .lazy() @@ -161,14 +167,29 @@ impl CountryMetadataLoader { /// Performs a load of a given metadata parquet file async fn load_metadata(&self, path: &str, config: &Config) -> Result { let full_path = format!("{}/{}/{path}", config.base_path, self.country); - let args = ScanArgsParquet::default(); + info!("Attempting to load dataframe from {full_path}"); - tokio::task::spawn_blocking(move || { - LazyFrame::scan_parquet(&full_path, args)? - .collect() - .map_err(|e| anyhow!("Failed to load '{full_path}': {e}")) - }) - .await? + #[cfg(not(target_arch = "wasm32"))] + { + let args = ScanArgsParquet::default(); + tokio::task::spawn_blocking(move || { + LazyFrame::scan_parquet(&full_path, args)? + .collect() + .map_err(|e| anyhow!("Failed to load '{full_path}': {e}")) + }) + .await? + } + #[cfg(target_arch = "wasm32")] + { + let bytes = reqwest::Client::new() + .get(&format!("{}/countries.txt", config.base_path)) + .send() + .await? + .bytes() + .await?; + let cursor = std::io::Cursor::new(bytes); + Ok(ParquetReader::new(cursor).finish()?) + } } } @@ -182,6 +203,18 @@ async fn get_country_names(config: &Config) -> anyhow::Result> { .lines() .map(|s| s.to_string()) .collect()) + // } + // #[cfg(target_arch = "wasm32")] + // { + // Ok(Request::get(&format!("{}/countries.txt", config.base_path)) + // .send() + // .await? + // .text() + // .await? + // .lines() + // .map(|s| s.to_string()) + // .collect()) + // } } /// Load the metadata for a list of countries and merge them into diff --git a/popgetter/src/parquet.rs b/popgetter/src/parquet.rs index f7cdd12..f53a3a2 100644 --- a/popgetter/src/parquet.rs +++ b/popgetter/src/parquet.rs @@ -15,28 +15,52 @@ pub struct MetricRequest { /// Given a `file_url` and a list of `columns`, return a `Result` /// with the requested columns, filtered by `geo_id`s if nessesary fn get_metrics_from_file( - file_url: &String, + file_url: &str, columns: &[String], geo_ids: Option<&[&str]>, ) -> Result { let mut cols: Vec = columns.iter().map(|c| col(c)).collect(); cols.push(col(COL::GEO_ID)); - let args = ScanArgsParquet::default(); + #[cfg(not(target_arch = "wasm32"))] + { + let args = ScanArgsParquet::default(); - let df = LazyFrame::scan_parquet(file_url, args)? - .with_streaming(true) - .select(cols); + let df = LazyFrame::scan_parquet(file_url, args)? + .with_streaming(true) + .select(cols); - let df = if let Some(ids) = geo_ids { - let id_series = Series::new("geo_ids", ids); - df.filter(col(COL::GEO_ID).is_in(lit(id_series))) - } else { - df - }; + let df = if let Some(ids) = geo_ids { + let id_series = Series::new("geo_ids", ids); + df.filter(col(COL::GEO_ID).is_in(lit(id_series))) + } else { + df + }; - let result = df.collect()?; - Ok(result) + let result = df.collect()?; + Ok(result) + } + #[cfg(target_arch = "wasm32")] + { + // // TODO: this needs to be updated to: + // // - only request the columns required + // // - use a blocking client (required as the function needs to remain sync for polars) + // Example with reqwest (non-blocking), currently will not compile since uses async: + // TODO: check if blocking reqwest available for WASM + // let response = reqwest::get(file_url).await?; + // let bytes = response.bytes().await?; + // let cursor = std::io::Cursor::new(bytes); + // let df = ParquetReader::new(cursor).finish()?.lazy().select(cols); + // let df = if let Some(ids) = geo_ids { + // let id_series = Series::new("geo_ids", ids); + // df.filter(col(COL::GEO_ID).is_in(lit(id_series))) + // } else { + // df + // }; + // let result = df.collect()?; + // Ok(result) + todo!() + } } /// Given a set of metrics and optional `geo_ids`, this function will @@ -46,7 +70,7 @@ pub fn get_metrics(metrics: &[MetricRequest], geo_ids: Option<&[&str]>) -> Resul let file_list: HashSet = metrics.iter().map(|m| m.metric_file.clone()).collect(); debug!("{:#?}", file_list); // TODO Can we do this async so we can be downloading results from each file together? - let dfs: Result> = file_list + let dfs = file_list .iter() .map(|file_url| { let file_cols: Vec = metrics @@ -59,17 +83,16 @@ pub fn get_metrics(metrics: &[MetricRequest], geo_ids: Option<&[&str]>) -> Resul } }) .collect(); - get_metrics_from_file(file_url, &file_cols, geo_ids) }) - .collect(); + .collect::>>()?; // TODO: The following assumes that we requested metrics for the same geo_ids. This is not // generally true let mut joined_df: Option = None; // Merge the dataframes from each remove file in to a single dataframe - for df in dfs? { + for df in dfs { if let Some(prev_dfs) = joined_df { joined_df = Some(prev_dfs.join( &df, diff --git a/popgetter_cli/Cargo.toml b/popgetter_cli/Cargo.toml index 952144c..6ed0dfe 100644 --- a/popgetter_cli/Cargo.toml +++ b/popgetter_cli/Cargo.toml @@ -13,9 +13,9 @@ path = "src/main.rs" anyhow = "1.0.75" serde = { version = "1.0", features = ["derive"] } serde_json = { version = "1.0" } -tokio = { version = "1.30.0", features = ["full"] } +tokio = { version = "1.30.0", features = ["rt-multi-thread", "macros"] } clap = { version = "4.5.0", features = ["derive"] } -polars = { version = "0.40.0", features = [ +polars = { git = "https://github.com/Urban-Analytics-Technology-Platform/polars.git", branch = "parquet-wasm", features = [ "lazy", "is_in", "http", @@ -26,12 +26,9 @@ polars = { version = "0.40.0", features = [ "strings", "rows", ] } -reqwest = { version = "0.12.3", features = ["json"] } enum_dispatch = "0.3" -flatgeobuf = "~4.1.0" -geozero = { version = "0.12.0", features = ["with-csv", "with-geojson"] } toml = "0.8.13" -popgetter = { path = "../popgetter" } +popgetter = { path = "../popgetter", features = ["formatters", "not_wasm"]} comfy-table = "7.1.1" itertools = "0.13.0" strum_macros = "0.26.4" From 6bc7ea8804364621eb973d7c26736da98ff7a46c Mon Sep 17 00:00:00 2001 From: Sam Greenbury Date: Wed, 31 Jul 2024 11:11:22 +0100 Subject: [PATCH 19/22] Fix load_metadata path for WASM --- popgetter/src/metadata.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/popgetter/src/metadata.rs b/popgetter/src/metadata.rs index 8122da7..4e42611 100644 --- a/popgetter/src/metadata.rs +++ b/popgetter/src/metadata.rs @@ -182,7 +182,7 @@ impl CountryMetadataLoader { #[cfg(target_arch = "wasm32")] { let bytes = reqwest::Client::new() - .get(&format!("{}/countries.txt", config.base_path)) + .get(&full_path) .send() .await? .bytes() From d480499b26341bddf5d6aa2c4526086a60480d3c Mon Sep 17 00:00:00 2001 From: Sam Greenbury Date: Thu, 1 Aug 2024 18:00:52 +0100 Subject: [PATCH 20/22] Fix target and fmt --- popgetter/Cargo.toml | 6 +++--- popgetter/src/metadata.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/popgetter/Cargo.toml b/popgetter/Cargo.toml index 403caa1..f268b6c 100644 --- a/popgetter/Cargo.toml +++ b/popgetter/Cargo.toml @@ -27,7 +27,7 @@ futures = "0.3.30" itertools = "0.13.0" log = "0.4.21" regex = "1.10.4" -reqwest ={ version = "0.11"} +reqwest = { version = "0.11" } serde = { version = "1.0", features = ["derive"] } serde_json = { version = "1.0" } strum_macros = "0.26" @@ -61,7 +61,7 @@ not_wasm = [ "polars/strings", "polars/rows", "polars/http", - "polars/streaming" + "polars/streaming", ] wasm = [ "polars/csv", @@ -76,4 +76,4 @@ wasm = [ # "http" and "streaming" features do not compile to WASM due to dep "mio" that is introduced # "polars/http", # "polars/streaming" -] \ No newline at end of file +] diff --git a/popgetter/src/metadata.rs b/popgetter/src/metadata.rs index 4e42611..0585494 100644 --- a/popgetter/src/metadata.rs +++ b/popgetter/src/metadata.rs @@ -8,7 +8,7 @@ use polars::{io::SerReader, prelude::ParquetReader}; use log::debug; use log::info; -#[cfg(not(target = "wasm32-unknown-unknown"))] +#[cfg(not(target_arch = "wasm32"))] use polars::prelude::ScanArgsParquet; use polars::{ frame::DataFrame, From 42febd460117656944c541a9dbf6b1c7a0c707b4 Mon Sep 17 00:00:00 2001 From: Sam Greenbury Date: Tue, 6 Aug 2024 17:51:41 +0100 Subject: [PATCH 21/22] Refactor get_metrics as async to enable WASM version --- popgetter/src/parquet.rs | 102 +++++++++++++++++++++------------------ popgetter/src/search.rs | 16 +++--- 2 files changed, 60 insertions(+), 58 deletions(-) diff --git a/popgetter/src/parquet.rs b/popgetter/src/parquet.rs index f53a3a2..39b7182 100644 --- a/popgetter/src/parquet.rs +++ b/popgetter/src/parquet.rs @@ -14,7 +14,7 @@ pub struct MetricRequest { /// Given a `file_url` and a list of `columns`, return a `Result` /// with the requested columns, filtered by `geo_id`s if nessesary -fn get_metrics_from_file( +async fn get_metrics_from_file( file_url: &str, columns: &[String], geo_ids: Option<&[&str]>, @@ -24,68 +24,73 @@ fn get_metrics_from_file( #[cfg(not(target_arch = "wasm32"))] { - let args = ScanArgsParquet::default(); + // Get owned types for spawn_blocking + let file_url = file_url.to_owned(); + let geo_ids = geo_ids.map(|v| v.iter().map(|el| el.to_string()).collect::>()); - let df = LazyFrame::scan_parquet(file_url, args)? + // Run spawn_blocking around scan_parquet with interior async runtime call + let result = tokio::task::spawn_blocking(move || { + let args = ScanArgsParquet::default(); + let df = match LazyFrame::scan_parquet(file_url, args) { + Ok(df) => df, + Err(err) => return Err(err), + } .with_streaming(true) .select(cols); + let df = if let Some(ids) = geo_ids { + let id_series = Series::new("geo_ids", ids); + df.filter(col(COL::GEO_ID).is_in(lit(id_series))) + } else { + df + }; + df.collect() + }) + .await?; + Ok(result?) + } + #[cfg(target_arch = "wasm32")] + { + // TODO: this needs to be updated to: + // - only request the columns required + // - use a blocking client (required as the function needs to remain sync for polars) + // Example with reqwest (non-blocking) + let response = reqwest::get(file_url).await?; + let bytes = response.bytes().await?; + let cursor = std::io::Cursor::new(bytes); + let df = ParquetReader::new(cursor).finish()?.lazy().select(cols); let df = if let Some(ids) = geo_ids { let id_series = Series::new("geo_ids", ids); df.filter(col(COL::GEO_ID).is_in(lit(id_series))) } else { df }; - let result = df.collect()?; Ok(result) } - #[cfg(target_arch = "wasm32")] - { - // // TODO: this needs to be updated to: - // // - only request the columns required - // // - use a blocking client (required as the function needs to remain sync for polars) - // Example with reqwest (non-blocking), currently will not compile since uses async: - // TODO: check if blocking reqwest available for WASM - // let response = reqwest::get(file_url).await?; - // let bytes = response.bytes().await?; - // let cursor = std::io::Cursor::new(bytes); - // let df = ParquetReader::new(cursor).finish()?.lazy().select(cols); - // let df = if let Some(ids) = geo_ids { - // let id_series = Series::new("geo_ids", ids); - // df.filter(col(COL::GEO_ID).is_in(lit(id_series))) - // } else { - // df - // }; - // let result = df.collect()?; - // Ok(result) - todo!() - } } /// Given a set of metrics and optional `geo_ids`, this function will /// retrive all the required metrics from the cloud blob storage /// -pub fn get_metrics(metrics: &[MetricRequest], geo_ids: Option<&[&str]>) -> Result { +pub async fn get_metrics(metrics: &[MetricRequest], geo_ids: Option<&[&str]>) -> Result { let file_list: HashSet = metrics.iter().map(|m| m.metric_file.clone()).collect(); debug!("{:#?}", file_list); // TODO Can we do this async so we can be downloading results from each file together? - let dfs = file_list - .iter() - .map(|file_url| { - let file_cols: Vec = metrics - .iter() - .filter_map(|m| { - if m.metric_file == file_url.clone() { - Some(m.column.clone()) - } else { - None - } - }) - .collect(); - get_metrics_from_file(file_url, &file_cols, geo_ids) - }) - .collect::>>()?; + let mut dfs = vec![]; + for file_url in &file_list { + let file_cols: Vec = metrics + .iter() + .filter_map(|m| { + if m.metric_file == file_url.clone() { + Some(m.column.clone()) + } else { + None + } + }) + .collect(); + dfs.push(get_metrics_from_file(file_url, &file_cols, geo_ids).await?); + } // TODO: The following assumes that we requested metrics for the same geo_ids. This is not // generally true @@ -116,15 +121,15 @@ pub fn get_metrics(metrics: &[MetricRequest], geo_ids: Option<&[&str]>) -> Resul mod tests { use super::*; - #[test] - fn test_fetching_metrics() { + #[tokio::test] + async fn test_fetching_metrics() { let metrics = [ MetricRequest{ metric_file: "https://popgetter.blob.core.windows.net/popgetter-cli-test/tracts_2019_fiveYear.parquet".into(), column: "B17021_E006".into(), geom_file: "Not needed for this test".into(), }]; - let df = get_metrics(&metrics, None); + let df = get_metrics(&metrics, None).await; assert!(df.is_ok(), "We should get back a result"); let df = df.unwrap(); assert_eq!( @@ -147,8 +152,8 @@ mod tests { ); } - #[test] - fn test_fetching_metrics_with_geo_filter() { + #[tokio::test] + async fn test_fetching_metrics_with_geo_filter() { let metrics = [ MetricRequest{ metric_file: "https://popgetter.blob.core.windows.net/popgetter-cli-test/tracts_2019_fiveYear.parquet".into(), @@ -158,7 +163,8 @@ mod tests { let df = get_metrics( &metrics, Some(&["1400000US01001020100", "1400000US01001020300"]), - ); + ) + .await; assert!(df.is_ok(), "We should get back a result"); let df = df.unwrap(); diff --git a/popgetter/src/search.rs b/popgetter/src/search.rs index 017f4df..baf72fe 100644 --- a/popgetter/src/search.rs +++ b/popgetter/src/search.rs @@ -419,8 +419,8 @@ impl SearchResults { ) } - // Required because polars is blocking - let metrics = tokio::task::spawn_blocking(move || get_metrics(&metric_requests, None)); + // Keep as future and run alongside get_geometries + let metrics = get_metrics(&metric_requests, None); let result = if include_geoms { // TODO Pass in the bbox as the second argument here @@ -443,17 +443,13 @@ impl SearchResults { } let geoms = get_geometries(all_geom_files.iter().next().unwrap(), bbox); - // try_join requires us to have the errors from all futures be the same. - // We use anyhow to get it back properly - let (metrics, geoms) = try_join!( - async move { metrics.await.map_err(anyhow::Error::from) }, - geoms - )?; + // Run metrics and geoms futures + let (metrics, geoms) = try_join!(metrics, geoms)?; debug!("geoms: {geoms:#?}"); debug!("metrics: {metrics:#?}"); - geoms.inner_join(&metrics?, [COL::GEO_ID], [COL::GEO_ID])? + geoms.inner_join(&metrics, [COL::GEO_ID], [COL::GEO_ID])? } else { - let metrics = metrics.await.map_err(anyhow::Error::from)??; + let metrics = metrics.await.map_err(anyhow::Error::from)?; debug!("metrics: {metrics:#?}"); metrics }; From 3193fedf1531d60b09d7b8f014492c059209f4b6 Mon Sep 17 00:00:00 2001 From: Sam Greenbury Date: Wed, 7 Aug 2024 10:08:42 +0100 Subject: [PATCH 22/22] Add wasm_bingen_test for get_metrics, fix warnings --- popgetter/Cargo.toml | 10 +++++++--- popgetter/src/geo.rs | 2 ++ popgetter/src/metadata.rs | 11 ++++++----- popgetter/src/parquet.rs | 41 +++++++++++++++++++++++++++++++++++---- 4 files changed, 52 insertions(+), 12 deletions(-) diff --git a/popgetter/Cargo.toml b/popgetter/Cargo.toml index f268b6c..68ae093 100644 --- a/popgetter/Cargo.toml +++ b/popgetter/Cargo.toml @@ -42,10 +42,14 @@ nonempty = { version = "0.10.0", features = ["serialize"] } # Current dependency is on a UATP fork where the "parquet" feature is updated to enable compilation # to WASM. This will need to be temporary so a version pointing to a published crate remains # possible (since crates.io requires no git deps) -polars = { git = "https://github.com/Urban-Analytics-Technology-Platform/polars.git", branch = "parquet-wasm", default-features = false} +polars = { git = "https://github.com/Urban-Analytics-Technology-Platform/polars.git", branch = "parquet-wasm", default-features = false } + +[target.'cfg(not(target_arch="wasm32"))'.dev-dependencies] +httpmock = { version = "0.7.0-rc.1" } + +[target.'cfg(target_arch="wasm32")'.dev-dependencies] +wasm-bindgen-test = { version = "0.3" } -[dev-dependencies] -httpmock = "0.7.0-rc.1" [features] formatters = ["dep:geojson"] diff --git a/popgetter/src/geo.rs b/popgetter/src/geo.rs index 7639c06..cc3a904 100644 --- a/popgetter/src/geo.rs +++ b/popgetter/src/geo.rs @@ -87,6 +87,8 @@ impl FromStr for BBox { } #[cfg(test)] +// TODO: update for wasm32. "httpmock" does not build for wasm32 so only include for not wasm32 +#[cfg(not(target_arch = "wasm32"))] mod tests { use super::*; use ::geozero::{geojson::GeoJson, ColumnValue}; diff --git a/popgetter/src/metadata.rs b/popgetter/src/metadata.rs index 0585494..1872818 100644 --- a/popgetter/src/metadata.rs +++ b/popgetter/src/metadata.rs @@ -1,7 +1,8 @@ use std::default::Default; use std::fmt::Display; -use anyhow::{anyhow, Result}; +#[cfg(not(target_arch = "wasm32"))] +use anyhow::anyhow; use futures::future::join_all; #[cfg(target_arch = "wasm32")] use polars::{io::SerReader, prelude::ParquetReader}; @@ -147,7 +148,7 @@ impl CountryMetadataLoader { /// Load the Metadata catalouge for this country with /// the specified metadata paths - pub async fn load(self, config: &Config) -> Result { + pub async fn load(self, config: &Config) -> anyhow::Result { let t = try_join!( self.load_metadata(PATHS::METRIC_METADATA, config), self.load_metadata(PATHS::GEOMETRY_METADATA, config), @@ -165,7 +166,7 @@ impl CountryMetadataLoader { } /// Performs a load of a given metadata parquet file - async fn load_metadata(&self, path: &str, config: &Config) -> Result { + async fn load_metadata(&self, path: &str, config: &Config) -> anyhow::Result { let full_path = format!("{}/{}/{path}", config.base_path, self.country); info!("Attempting to load dataframe from {full_path}"); @@ -219,11 +220,11 @@ async fn get_country_names(config: &Config) -> anyhow::Result> { /// Load the metadata for a list of countries and merge them into /// a single `Metadata` catalogue. -pub async fn load_all(config: &Config) -> Result { +pub async fn load_all(config: &Config) -> anyhow::Result { let country_names = get_country_names(config).await?; info!("Detected country names: {:?}", country_names); - let metadata: Result> = join_all( + let metadata: anyhow::Result> = join_all( country_names .iter() .map(|c| CountryMetadataLoader::new(c).load(config)), diff --git a/popgetter/src/parquet.rs b/popgetter/src/parquet.rs index 39b7182..4e47555 100644 --- a/popgetter/src/parquet.rs +++ b/popgetter/src/parquet.rs @@ -51,10 +51,11 @@ async fn get_metrics_from_file( } #[cfg(target_arch = "wasm32")] { - // TODO: this needs to be updated to: - // - only request the columns required - // - use a blocking client (required as the function needs to remain sync for polars) - // Example with reqwest (non-blocking) + // TODO: this needs to be updated to only request the columns required as currently + // will request entire parquet file + // An example of this is in polars (see https://github.com/pola-rs/polars/blob/3dda47e578e0b50a5bb7c459ebee6c5c76d41c75/crates/polars-io/src/parquet/read/async_impl.rs) + // but calls this code through creating its own multi-threaded tokio runtime that will not + // compile to WASM. let response = reqwest::get(file_url).await?; let bytes = response.bytes().await?; let cursor = std::io::Cursor::new(bytes); @@ -121,6 +122,9 @@ pub async fn get_metrics(metrics: &[MetricRequest], geo_ids: Option<&[&str]>) -> mod tests { use super::*; + #[cfg(target_arch = "wasm32")] + use wasm_bindgen_test::wasm_bindgen_test; + #[tokio::test] async fn test_fetching_metrics() { let metrics = [ @@ -179,4 +183,33 @@ mod tests { "The returned dataframe should have the correct number of rows" ); } + + #[cfg(target_arch = "wasm32")] + #[wasm_bindgen_test(async)] + async fn test_fetching_metrics_with_geo_filter_wasm32() { + let metrics = [ + MetricRequest{ + metric_file: "https://popgetter.blob.core.windows.net/releases/v0.2/usa/metrics/2019fiveYearblockgroup0.parquet".into(), + column: "individuals".into(), + geom_file: "Not needed for this test".into(), + }]; + let df = get_metrics( + &metrics, + Some(&["1500000US010010201001", "1500000US721537506022"]), + ) + .await; + + assert!(df.is_ok(), "We should get back a result"); + let df = df.unwrap(); + assert_eq!( + df.shape().1, + 2, + "The returned dataframe should have the correct number of columns" + ); + assert_eq!( + df.shape().0, + 2, + "The returned dataframe should have the correct number of rows" + ); + } }