Skip to content

Commit

Permalink
VER: Release 0.19.1
Browse files Browse the repository at this point in the history
  • Loading branch information
threecgreen committed Jul 16, 2024
2 parents 1fef731 + 4bdeb51 commit 12ca6d8
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 15 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 0.19.1 - 2024-07-16

### Bug fixes
- Update `rtype_dispatch` and `schema_dispatch` macros for `BboMsg`
- Update `RecordEnum` and `RecordRefEnum` for `BboMsg`

## 0.19.0 - 2024-07-09

### Enhancements
Expand Down
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ resolver = "2"
[workspace.package]
authors = ["Databento <support@databento.com>"]
edition = "2021"
version = "0.19.0"
version = "0.19.1"
documentation = "https://docs.databento.com"
repository = "https://github.com/databento/dbn"
license = "Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "databento-dbn"
version = "0.19.0"
version = "0.19.1"
description = "Python bindings for encoding and decoding Databento Binary Encoding (DBN)"
authors = ["Databento <support@databento.com>"]
license = "Apache-2.0"
Expand All @@ -17,7 +17,7 @@ build-backend = "maturin"

[project]
name = "databento-dbn"
version = "0.19.0"
version = "0.19.1"
authors = [
{ name = "Databento", email = "support@databento.com" }
]
Expand Down
2 changes: 1 addition & 1 deletion rust/dbn-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ name = "dbn"
path = "src/main.rs"

[dependencies]
dbn = { path = "../dbn", version = "=0.19.0", default-features = false }
dbn = { path = "../dbn", version = "=0.19.1", default-features = false }

anyhow = { workspace = true }
clap = { version = "4.5", features = ["derive", "wrap_help"] }
Expand Down
2 changes: 1 addition & 1 deletion rust/dbn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ serde = ["dep:serde", "time/parsing", "time/serde"]
trivial_copy = []

[dependencies]
dbn-macros = { version = "=0.19.0", path = "../dbn-macros" }
dbn-macros = { version = "=0.19.1", path = "../dbn-macros" }

async-compression = { version = "0.4.11", features = ["tokio", "zstd"], optional = true }
csv = { workspace = true }
Expand Down
6 changes: 4 additions & 2 deletions rust/dbn/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ macro_rules! rtype_dispatch_base {
match $rec_ref.rtype() {
Ok(rtype) => Ok(match rtype {
RType::Mbp0 => $handler!(TradeMsg),
RType::Mbp1 | RType::Bbo1S | RType::Bbo1M => $handler!(Mbp1Msg),
RType::Mbp1 => $handler!(Mbp1Msg),
RType::Mbp10 => $handler!(Mbp10Msg),
#[allow(deprecated)]
RType::OhlcvDeprecated
Expand Down Expand Up @@ -61,6 +61,7 @@ macro_rules! rtype_dispatch_base {
RType::Statistics => $handler!(StatMsg),
RType::Mbo => $handler!(MboMsg),
RType::Cbbo | RType::Cbbo1S | RType::Cbbo1M | RType::Tcbbo => $handler!(CbboMsg),
RType::Bbo1S | RType::Bbo1M => $handler!(BboMsg),
}),
Err(e) => Err(e),
}
Expand All @@ -75,7 +76,8 @@ macro_rules! schema_dispatch_base {
use $crate::record::*;
match $schema {
Schema::Mbo => $handler!(MboMsg),
Schema::Mbp1 | Schema::Tbbo | Schema::Bbo1S | Schema::Bbo1M => $handler!(Mbp1Msg),
Schema::Mbp1 | Schema::Tbbo => $handler!(Mbp1Msg),
Schema::Bbo1S | Schema::Bbo1M => $handler!(BboMsg),
Schema::Mbp10 => $handler!(Mbp10Msg),
Schema::Trades => $handler!(TradeMsg),
Schema::Ohlcv1D
Expand Down
17 changes: 14 additions & 3 deletions rust/dbn/src/record_enum.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{
record::CbboMsg, Error, ErrorMsg, ImbalanceMsg, InstrumentDefMsg, MboMsg, Mbp10Msg, Mbp1Msg,
OhlcvMsg, RType, Record, RecordMut, RecordRef, StatMsg, StatusMsg, SymbolMappingMsg, SystemMsg,
TradeMsg,
record::CbboMsg, BboMsg, Error, ErrorMsg, ImbalanceMsg, InstrumentDefMsg, MboMsg, Mbp10Msg,
Mbp1Msg, OhlcvMsg, RType, Record, RecordMut, RecordRef, StatMsg, StatusMsg, SymbolMappingMsg,
SystemMsg, TradeMsg,
};

/// An owned DBN record type of flexible type. Unlike [`RecordRef`], this type allows
Expand Down Expand Up @@ -36,6 +36,8 @@ pub enum RecordEnum {
System(SystemMsg),
/// A consolidated best bid and offer message.
Cbbo(CbboMsg),
/// A subsampled market-by-price message with a book depth of 1.
Bbo(BboMsg),
}

/// An immutable reference to a DBN record of flexible type. Unlike [`RecordRef`], this
Expand Down Expand Up @@ -72,6 +74,8 @@ pub enum RecordRefEnum<'a> {
System(&'a SystemMsg),
/// A reference to a consolidated best bid and offer message.
Cbbo(&'a CbboMsg),
/// A subsampled market-by-price message with a book depth of 1.
Bbo(&'a BboMsg),
}

impl<'a> From<&'a RecordEnum> for RecordRefEnum<'a> {
Expand All @@ -90,6 +94,7 @@ impl<'a> From<&'a RecordEnum> for RecordRefEnum<'a> {
RecordEnum::SymbolMapping(rec) => Self::SymbolMapping(rec),
RecordEnum::System(rec) => Self::System(rec),
RecordEnum::Cbbo(rec) => Self::Cbbo(rec),
RecordEnum::Bbo(rec) => Self::Bbo(rec),
}
}
}
Expand All @@ -112,6 +117,7 @@ impl<'a> RecordRefEnum<'a> {
Self::SymbolMapping(rec) => RecordEnum::from((*rec).clone()),
Self::System(rec) => RecordEnum::from((*rec).clone()),
Self::Cbbo(rec) => RecordEnum::from((*rec).clone()),
Self::Bbo(rec) => RecordEnum::Bbo((*rec).clone()),
}
}
}
Expand Down Expand Up @@ -313,6 +319,7 @@ impl Record for RecordEnum {
RecordEnum::SymbolMapping(rec) => rec.header(),
RecordEnum::System(rec) => rec.header(),
RecordEnum::Cbbo(rec) => rec.header(),
RecordEnum::Bbo(rec) => rec.header(),
}
}

Expand All @@ -331,6 +338,7 @@ impl Record for RecordEnum {
RecordEnum::SymbolMapping(rec) => rec.raw_index_ts(),
RecordEnum::System(rec) => rec.raw_index_ts(),
RecordEnum::Cbbo(rec) => rec.raw_index_ts(),
RecordEnum::Bbo(rec) => rec.raw_index_ts(),
}
}
}
Expand All @@ -351,6 +359,7 @@ impl RecordMut for RecordEnum {
RecordEnum::SymbolMapping(rec) => rec.header_mut(),
RecordEnum::System(rec) => rec.header_mut(),
RecordEnum::Cbbo(rec) => rec.header_mut(),
RecordEnum::Bbo(rec) => rec.header_mut(),
}
}
}
Expand All @@ -371,6 +380,7 @@ impl<'a> Record for RecordRefEnum<'a> {
RecordRefEnum::SymbolMapping(rec) => rec.header(),
RecordRefEnum::System(rec) => rec.header(),
RecordRefEnum::Cbbo(rec) => rec.header(),
RecordRefEnum::Bbo(rec) => rec.header(),
}
}

Expand All @@ -389,6 +399,7 @@ impl<'a> Record for RecordRefEnum<'a> {
RecordRefEnum::SymbolMapping(rec) => rec.raw_index_ts(),
RecordRefEnum::System(rec) => rec.raw_index_ts(),
RecordRefEnum::Cbbo(rec) => rec.raw_index_ts(),
RecordRefEnum::Bbo(rec) => rec.raw_index_ts(),
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions rust/dbn/src/record_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ impl<'a> From<&'a RecordEnum> for RecordRef<'a> {
RecordEnum::SymbolMapping(rec) => Self::from(rec),
RecordEnum::System(rec) => Self::from(rec),
RecordEnum::Cbbo(rec) => Self::from(rec),
RecordEnum::Bbo(rec) => Self::from(rec),
}
}
}
Expand All @@ -187,6 +188,7 @@ impl<'a> From<RecordRefEnum<'a>> for RecordRef<'a> {
RecordRefEnum::SymbolMapping(rec) => Self::from(rec),
RecordRefEnum::System(rec) => Self::from(rec),
RecordRefEnum::Cbbo(rec) => Self::from(rec),
RecordRefEnum::Bbo(rec) => Self::from(rec),
}
}
}
Expand Down

0 comments on commit 12ca6d8

Please sign in to comment.