diff --git a/Cargo.toml b/Cargo.toml index a6dbf46d..5df6b6e8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "garmin_rust" -version = "0.14.19" +version = "0.14.20" authors = ["Daniel Boline "] edition = "2018" @@ -25,7 +25,7 @@ garmin_models = {path="garmin_models"} garmin_utils = {path="garmin_utils"} log = "0.4" stack-string = { git = "https://github.com/ddboline/stack-string-rs.git", features=["postgres_types"], tag="0.9.3" } -tempdir = "0.3" +tempfile = "3.12" tokio = {version="1.38", features=["rt", "macros", "rt-multi-thread"]} [workspace] diff --git a/fitbit_bot/Cargo.toml b/fitbit_bot/Cargo.toml index 0cddfb4d..11b6332b 100644 --- a/fitbit_bot/Cargo.toml +++ b/fitbit_bot/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fitbit_bot" -version = "0.14.19" +version = "0.14.20" authors = ["Daniel Boline "] edition = "2018" diff --git a/fitbit_lib/Cargo.toml b/fitbit_lib/Cargo.toml index 5a09e315..0af2ad4e 100644 --- a/fitbit_lib/Cargo.toml +++ b/fitbit_lib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fitbit_lib" -version = "0.14.19" +version = "0.14.20" authors = ["Daniel Boline "] edition = "2018" @@ -12,7 +12,7 @@ avro-rs = {version = "0.13", features = ["snappy"]} base64 = "0.22" bytes = "1.0" crossbeam-utils = "0.8" -derive_more = "0.99" +derive_more = {version="1.0", features=["full"]} fitparser = {git="https://github.com/ddboline/fitparse-rs.git", branch="time-0.3-0.5.2"} futures = "0.3" garmin_lib = {path = "../garmin_lib"} @@ -23,7 +23,7 @@ itertools = "0.13" log = "0.4" maplit = "1.0" once_cell = "1.0" -polars = {version="0.41", features=["temporal", "parquet", "lazy"]} +polars = {version="0.43", features=["temporal", "parquet", "lazy"]} postgres_query = {git = "https://github.com/ddboline/rust-postgres-query", tag = "0.3.8", features=["deadpool"]} rand = "0.8" rayon = "1.5" diff --git a/fitbit_lib/src/fitbit_archive.rs b/fitbit_lib/src/fitbit_archive.rs index 9a6fe2b8..b8aa2eae 100644 --- a/fitbit_lib/src/fitbit_archive.rs +++ b/fitbit_lib/src/fitbit_archive.rs @@ -205,7 +205,7 @@ fn write_fitbit_heartrate_parquet( let existing_entries = df.shape().0; let updated_df = df .vstack(&new_df)? - .unique(None, UniqueKeepStrategy::First, None)?; + .unique_stable(None, UniqueKeepStrategy::First, None)?; let new_entries = updated_df.shape().0; let updated_count = new_entries - existing_entries; if updated_count == 0 { diff --git a/garmin_cli/Cargo.toml b/garmin_cli/Cargo.toml index 1e695e2a..98a824bf 100644 --- a/garmin_cli/Cargo.toml +++ b/garmin_cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "garmin_cli" -version = "0.14.19" +version = "0.14.20" authors = ["Daniel Boline "] edition = "2018" @@ -10,7 +10,7 @@ edition = "2018" anyhow = "1.0" aws-config = {version="1.0", features=["behavior-version-latest"]} clap = {version="4.0", features=["derive"]} -derive_more = "0.99" +derive_more = {version="1.0", features=["full"]} fitbit_lib = {path="../fitbit_lib"} futures = "0.3" garmin_lib = {path="../garmin_lib"} @@ -27,7 +27,7 @@ regex = "1.4" serde_json = "1.0" smallvec = "1.6" strava_lib = {path="../strava_lib"} -tempdir = "0.3" +tempfile = "3.12" time = {version="0.3", features=["serde-human-readable", "macros", "formatting", "parsing"]} time-tz = {version="2.0", features=["system"]} tokio = {version="1.38", features=["rt", "macros", "rt-multi-thread"]} diff --git a/garmin_cli/src/garmin_cli.rs b/garmin_cli/src/garmin_cli.rs index 32c2c7bc..94df7c17 100644 --- a/garmin_cli/src/garmin_cli.rs +++ b/garmin_cli/src/garmin_cli.rs @@ -12,7 +12,7 @@ use std::{ sync::Arc, }; use stdout_channel::StdoutChannel; -use tempdir::TempDir; +use tempfile::TempDir; use time::Date; use tokio::task::spawn_blocking; @@ -350,7 +350,7 @@ impl GarminCli { stdout: &StdoutChannel, config: &GarminConfig, ) -> Result, Error> { - let tempdir = TempDir::new("garmin_zip")?; + let tempdir = TempDir::new()?; let ziptmpdir = tempdir.path(); let mut filenames = filenames diff --git a/garmin_cli/src/garmin_cli_opts.rs b/garmin_cli/src/garmin_cli_opts.rs index 3ef18388..42bf9d82 100644 --- a/garmin_cli/src/garmin_cli_opts.rs +++ b/garmin_cli/src/garmin_cli_opts.rs @@ -6,7 +6,7 @@ use log::info; use refinery::embed_migrations; use stack_string::{format_sstr, StackString}; use std::{collections::BTreeSet, ffi::OsStr, path::PathBuf}; -use tempdir::TempDir; +use tempfile::TempDir; use time::{macros::format_description, Date, Duration, OffsetDateTime}; use time_tz::OffsetDateTimeExt; use tokio::{ @@ -602,7 +602,7 @@ impl GarminCliOpts { cli.config.download_directory.join(format_sstr!("{date}")) }; if connect_wellness_file.exists() { - let tempdir = TempDir::new("garmin_zip")?; + let tempdir = TempDir::new()?; let ziptmpdir = tempdir.path().to_path_buf(); let wellness_files = spawn_blocking(move || { extract_zip_from_garmin_connect_multiple(&connect_wellness_file, &ziptmpdir) diff --git a/garmin_connect_lib/Cargo.toml b/garmin_connect_lib/Cargo.toml index eacaaaf9..6643e92b 100644 --- a/garmin_connect_lib/Cargo.toml +++ b/garmin_connect_lib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "garmin_connect_lib" -version = "0.14.19" +version = "0.14.20" authors = ["Daniel Boline "] edition = "2018" diff --git a/garmin_http/Cargo.toml b/garmin_http/Cargo.toml index 4ccf01c0..1f1bf58a 100644 --- a/garmin_http/Cargo.toml +++ b/garmin_http/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "garmin_http" -version = "0.14.19" +version = "0.14.20" authors = ["Daniel Boline "] edition = "2018" @@ -9,7 +9,7 @@ anyhow = "1.0" authorized_users = { git = "https://github.com/ddboline/auth_server_rust.git", tag="0.11.15"} base64 = "0.22" cookie = {version="0.18", features=["percent-encode"]} -derive_more = "0.99" +derive_more = {version="1.0", features=["full"]} dioxus = "0.5" dioxus-core = "0.5" dioxus-ssr = "0.5" @@ -21,7 +21,7 @@ garmin_models = {path="../garmin_models"} garmin_parser = {path="../garmin_parser"} garmin_reports = {path="../garmin_reports"} garmin_utils = {path="../garmin_utils"} -handlebars = "5.1" +handlebars = "6.1" itertools = "0.13" log = "0.4" maplit = "1.0" @@ -37,7 +37,7 @@ serde_json = "1.0" serde_yaml = "0.9" stack-string = { git = "https://github.com/ddboline/stack-string-rs.git", features=["postgres_types", "rweb-openapi"], tag="0.9.3" } strava_lib = {path="../strava_lib/"} -tempdir = "0.3" +tempfile = "3.12" thiserror = "1.0" time = {version="0.3", features=["serde-human-readable", "macros", "formatting", "parsing"]} time-tz = {version="2.0", features=["system"]} diff --git a/garmin_http/src/garmin_rust_routes.rs b/garmin_http/src/garmin_rust_routes.rs index b565b422..099bba44 100644 --- a/garmin_http/src/garmin_rust_routes.rs +++ b/garmin_http/src/garmin_rust_routes.rs @@ -15,7 +15,7 @@ use rweb_helper::{ use serde::{Deserialize, Serialize}; use stack_string::{format_sstr, StackString}; use std::convert::Infallible; -use tempdir::TempDir; +use tempfile::TempDir; use tokio::{fs::File, io::AsyncWriteExt, task::spawn_blocking}; use tokio_stream::StreamExt; @@ -298,7 +298,7 @@ async fn garmin_upload_body( state: AppState, session: Session, ) -> HttpResult { - let tempdir = TempDir::new("garmin")?; + let tempdir = TempDir::new()?; let tempdir_str = tempdir.path().to_string_lossy(); let mut fname = StackString::new(); diff --git a/garmin_lib/Cargo.toml b/garmin_lib/Cargo.toml index cb905e43..20e4e9af 100644 --- a/garmin_lib/Cargo.toml +++ b/garmin_lib/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "garmin_lib" -version = "0.14.19" +version = "0.14.20" authors = ["Daniel Boline "] edition = "2018" [dependencies] anyhow = "1.0" bytes = "1.0" -derive_more = "0.99" +derive_more = {version="1.0", features=["full"]} dirs = "5.0" dotenv = "0.15" envy = "0.4" diff --git a/garmin_lib/src/garmin_config.rs b/garmin_lib/src/garmin_config.rs index 087f96e0..efcb73db 100644 --- a/garmin_lib/src/garmin_config.rs +++ b/garmin_lib/src/garmin_config.rs @@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize}; use stack_string::StackString; use std::{ convert::{TryFrom, TryInto}, - ops::Deref, + ops, path::{Path, PathBuf}, sync::Arc, }; @@ -229,7 +229,7 @@ impl GarminConfig { } } -impl Deref for GarminConfig { +impl ops::Deref for GarminConfig { type Target = GarminConfigInner; fn deref(&self) -> &Self::Target { diff --git a/garmin_models/Cargo.toml b/garmin_models/Cargo.toml index 3a8c9dfd..0fd228cd 100644 --- a/garmin_models/Cargo.toml +++ b/garmin_models/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "garmin_models" -version = "0.14.19" +version = "0.14.20" authors = ["Daniel Boline "] edition = "2021" diff --git a/garmin_parser/Cargo.toml b/garmin_parser/Cargo.toml index 77fef231..11d21f06 100644 --- a/garmin_parser/Cargo.toml +++ b/garmin_parser/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "garmin_parser" -version = "0.14.19" +version = "0.14.20" authors = ["Daniel Boline "] edition = "2021" diff --git a/garmin_reports/Cargo.toml b/garmin_reports/Cargo.toml index 4aef1ab0..f9e3a7e9 100644 --- a/garmin_reports/Cargo.toml +++ b/garmin_reports/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "garmin_reports" -version = "0.14.19" +version = "0.14.20" authors = ["Daniel Boline "] edition = "2018" @@ -8,7 +8,7 @@ edition = "2018" [dependencies] anyhow = "1.0" -derive_more = "0.99" +derive_more = {version="1.0", features=["full"]} futures = "0.3" garmin_lib = {path="../garmin_lib"} garmin_models = {path="../garmin_models"} diff --git a/garmin_utils/Cargo.toml b/garmin_utils/Cargo.toml index 38be32fe..19a24f1e 100644 --- a/garmin_utils/Cargo.toml +++ b/garmin_utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "garmin_utils" -version = "0.14.19" +version = "0.14.20" authors = ["Daniel Boline "] edition = "2021" @@ -23,7 +23,7 @@ serde = {version="1.0", features=["derive"]} smallvec = "1.6" stack-string = { git = "https://github.com/ddboline/stack-string-rs.git", features=["postgres_types"], tag="0.9.3" } subprocess = "0.2" -tempdir = "0.3" +tempfile = "3.12" time = {version="0.3", features=["serde-human-readable", "macros", "formatting", "parsing"]} time-tz = {version="2.0", features=["system"]} tokio = {version="1.38", features=["rt", "macros", "rt-multi-thread"]} diff --git a/garmin_utils/src/garmin_util.rs b/garmin_utils/src/garmin_util.rs index ead86480..194b2ed7 100644 --- a/garmin_utils/src/garmin_util.rs +++ b/garmin_utils/src/garmin_util.rs @@ -367,13 +367,13 @@ pub fn get_random_string() -> StackString { mod tests { use anyhow::Error; use std::path::Path; - use tempdir::TempDir; + use tempfile::TempDir; use crate::garmin_util::extract_zip; #[test] fn test_extract_zip() -> Result<(), Error> { - let d = TempDir::new("zip_test")?; + let d = TempDir::new()?; let p = d.path(); let zip_path = Path::new("../tests/data/test.zip"); diff --git a/race_result_analysis/Cargo.toml b/race_result_analysis/Cargo.toml index 685b6c6c..d3fcb1f8 100644 --- a/race_result_analysis/Cargo.toml +++ b/race_result_analysis/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "race_result_analysis" -version = "0.14.19" +version = "0.14.20" authors = ["Daniel Boline "] edition = "2018" @@ -15,7 +15,7 @@ garmin_models = {path="../garmin_models"} garmin_utils = {path="../garmin_utils"} itertools = "0.13" log = "0.4" -ndarray = "0.15" +ndarray = "0.16" parking_lot = "0.12" postgres_query = {git = "https://github.com/ddboline/rust-postgres-query", tag = "0.3.8", features=["deadpool"]} rusfun = { git = "https://github.com/ddboline/rusfun.git" } diff --git a/src/import_garmin_connect_data.rs b/src/import_garmin_connect_data.rs index 7e3040aa..ff4dfe9d 100644 --- a/src/import_garmin_connect_data.rs +++ b/src/import_garmin_connect_data.rs @@ -8,7 +8,7 @@ use anyhow::Error; use clap::Parser; use std::{collections::BTreeSet, path::PathBuf}; -use tempdir::TempDir; +use tempfile::TempDir; use fitbit_lib::fitbit_heartrate::{ import_garmin_heartrate_file, import_garmin_json_file, FitbitHeartRate, @@ -57,7 +57,7 @@ async fn main() -> Result<(), Error> { } } JsonImportOpts::Heartrates { file } => { - let tempdir = TempDir::new("garmin_zip")?; + let tempdir = TempDir::new()?; let ziptmpdir = tempdir.path(); let files = extract_zip_from_garmin_connect_multiple(&file, ziptmpdir)?; for file in files { diff --git a/strava_lib/Cargo.toml b/strava_lib/Cargo.toml index e13557ce..6d05841d 100644 --- a/strava_lib/Cargo.toml +++ b/strava_lib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "strava_lib" -version = "0.14.19" +version = "0.14.20" authors = ["Daniel Boline "] edition = "2018"