Skip to content

Commit

Permalink
VER: Release 0.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
threecgreen committed Dec 17, 2024
1 parent 6357597 commit d5ea8b1
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 16 deletions.
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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"
4 changes: 2 additions & 2 deletions src/historical/batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}

Expand Down
2 changes: 1 addition & 1 deletion src/historical/symbology.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down
6 changes: 3 additions & 3 deletions src/historical/timeseries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ pub struct GetRangeParams {
#[builder(default)]
pub limit: Option<NonZeroU64>,
/// How to decode DBN from prior versions. Defaults to upgrade.
#[builder(default = VersionUpgradePolicy::Upgrade)]
#[builder(default = VersionUpgradePolicy::UpgradeToV2)]
pub upgrade_policy: VersionUpgradePolicy,
}

Expand Down Expand Up @@ -191,7 +191,7 @@ pub struct GetRangeToFileParams {
#[builder(default)]
pub limit: Option<NonZeroU64>,
/// 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<PathBuf>| p.into()))]
Expand Down Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion src/live.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl Default for ClientBuilder<Unset, Unset> {
key: Unset,
dataset: Unset,
send_ts_out: false,
upgrade_policy: VersionUpgradePolicy::Upgrade,
upgrade_policy: VersionUpgradePolicy::UpgradeToV2,
heartbeat_interval: None,
}
}
Expand Down

0 comments on commit d5ea8b1

Please sign in to comment.