From d5ea8b1b9b72ecce738f9e1138a927f3bcc7906f Mon Sep 17 00:00:00 2001 From: Carter Green Date: Tue, 17 Dec 2024 13:32:57 -0600 Subject: [PATCH] VER: Release 0.17.0 --- CHANGELOG.md | 16 +++++++++++++++- Cargo.toml | 16 ++++++++-------- src/historical/batch.rs | 4 ++-- src/historical/symbology.rs | 2 +- src/historical/timeseries.rs | 6 +++--- src/live.rs | 2 +- 6 files changed, 30 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 193c2bc..89ce642 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,24 @@ # Changelog -## 0.17.0 - TBD +## 0.17.0 - 2024-12-17 + +### Enhancements +- Upgraded DBN version to 0.25.0: + - Added `v1` and `v2` namespaces in DBN to allow unambiguously referring to the record + types for a given DBN version regardless of whether the record type has changed + - Changed `dataset()` method on `MetadataBuilder` to accept an `impl ToString` so now + `Dataset` and `&str` can be passed directly + - Changed async DBN decoding to return `Ok(None)` when an incomplete record remains in + the stream. This matches the existing behavior of sync DBN decoding +- Upgraded `thiserror` version to 2.0 ### Breaking changes - Removed deprecated `Packaging` enum and `packaging` field that's no longer supported by the API +- As part of the DBN version upgrade: + - `VersionUpgradePolicy::Upgrade` was renamed to `UpgradeToV2` + - Changed async DBN decoding to return `Ok(None)` when an incomplete record remains in + the stream ## 0.16.0 - 2024-11-12 diff --git a/Cargo.toml b/Cargo.toml index 59981b9..f8e6034 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ historical = ["dep:futures", "dep:reqwest", "dep:serde", "dep:tokio-util", "dep: live = ["dep:hex", "dep:sha2", "tokio/net"] [dependencies] -dbn = { version = "0.23.1", features = ["async", "serde"] } +dbn = { version = "0.25.0", features = ["async", "serde"] } # Async stream trait futures = { version = "0.3", optional = true } # Used for Live authentication @@ -33,7 +33,7 @@ serde = { version = "1.0", optional = true, features = ["derive"] } serde_json = { version = "1.0", optional = true } # Used for Live authentication sha2 = { version = "0.10", optional = true } -thiserror = "1.0" +thiserror = "2.0" time = { version = ">=0.3.35", features = ["macros", "parsing", "serde"] } tokio = { version = ">=1.28", features = ["io-util", "macros"] } # Stream utils @@ -42,10 +42,10 @@ tracing = "0.1" typed-builder = "0.20" [dev-dependencies] -anyhow = "1.0.91" -async-compression = { version = "0.4.13", features = ["tokio", "zstd"] } -clap = { version = "4.5.20", features = ["derive"] } -tempfile = "3.13.0" -tokio = { version = "1.41", features = ["full"] } -tracing-subscriber = "0.3.18" +anyhow = "1.0.94" +async-compression = { version = "0.4.18", features = ["tokio", "zstd"] } +clap = { version = "4.5.23", features = ["derive"] } +tempfile = "3.14.0" +tokio = { version = "1.42", features = ["full"] } +tracing-subscriber = "0.3.19" wiremock = "0.6" diff --git a/src/historical/batch.rs b/src/historical/batch.rs index 0b4ffbf..089354e 100644 --- a/src/historical/batch.rs +++ b/src/historical/batch.rs @@ -633,14 +633,14 @@ mod tests { .batch() .submit_job( &SubmitJobParams::builder() - .dataset(dbn::datasets::XNAS_ITCH) + .dataset(dbn::Dataset::XnasItch) .schema(SCHEMA) .symbols("TSLA") .date_time_range((START, END)) .build(), ) .await?; - assert_eq!(job_desc.dataset, dbn::datasets::XNAS_ITCH); + assert_eq!(job_desc.dataset, dbn::Dataset::XnasItch.as_str()); Ok(()) } diff --git a/src/historical/symbology.rs b/src/historical/symbology.rs index 0800e31..3becad2 100644 --- a/src/historical/symbology.rs +++ b/src/historical/symbology.rs @@ -210,7 +210,7 @@ mod tests { .symbology() .resolve( &ResolveParams::builder() - .dataset(dbn::datasets::GLBX_MDP3) + .dataset(dbn::Dataset::GlbxMdp3) .symbols(vec!["ES.c.0", "ES.d.0"]) .stype_in(SType::Continuous) .date_range((date!(2023 - 06 - 14), date!(2023 - 06 - 17))) diff --git a/src/historical/timeseries.rs b/src/historical/timeseries.rs index 13a9a59..eee6320 100644 --- a/src/historical/timeseries.rs +++ b/src/historical/timeseries.rs @@ -160,7 +160,7 @@ pub struct GetRangeParams { #[builder(default)] pub limit: Option, /// How to decode DBN from prior versions. Defaults to upgrade. - #[builder(default = VersionUpgradePolicy::Upgrade)] + #[builder(default = VersionUpgradePolicy::UpgradeToV2)] pub upgrade_policy: VersionUpgradePolicy, } @@ -191,7 +191,7 @@ pub struct GetRangeToFileParams { #[builder(default)] pub limit: Option, /// How to decode DBN from prior versions. Defaults to upgrade. - #[builder(default = VersionUpgradePolicy::Upgrade)] + #[builder(default = VersionUpgradePolicy::UpgradeToV2)] pub upgrade_policy: VersionUpgradePolicy, /// The file path to persist the stream data to. #[builder(default, setter(transform = |p: impl Into| p.into()))] @@ -285,7 +285,7 @@ mod tests { .timeseries() .get_range( &GetRangeParams::builder() - .dataset(dbn::datasets::XNAS_ITCH) + .dataset(dbn::Dataset::XnasItch) .schema(SCHEMA) .symbols(vec!["SPOT", "AAPL"]) .date_time_range((START, END)) diff --git a/src/live.rs b/src/live.rs index e07e697..d5072b8 100644 --- a/src/live.rs +++ b/src/live.rs @@ -64,7 +64,7 @@ impl Default for ClientBuilder { key: Unset, dataset: Unset, send_ts_out: false, - upgrade_policy: VersionUpgradePolicy::Upgrade, + upgrade_policy: VersionUpgradePolicy::UpgradeToV2, heartbeat_interval: None, } }