Skip to content

Commit 12ca6d8

Browse files
authored
VER: Release 0.19.1
2 parents 1fef731 + 4bdeb51 commit 12ca6d8

File tree

9 files changed

+36
-15
lines changed

9 files changed

+36
-15
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 0.19.1 - 2024-07-16
4+
5+
### Bug fixes
6+
- Update `rtype_dispatch` and `schema_dispatch` macros for `BboMsg`
7+
- Update `RecordEnum` and `RecordRefEnum` for `BboMsg`
8+
39
## 0.19.0 - 2024-07-09
410

511
### Enhancements

Cargo.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ resolver = "2"
1111
[workspace.package]
1212
authors = ["Databento <[email protected]>"]
1313
edition = "2021"
14-
version = "0.19.0"
14+
version = "0.19.1"
1515
documentation = "https://docs.databento.com"
1616
repository = "https://github.com/databento/dbn"
1717
license = "Apache-2.0"

python/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "databento-dbn"
3-
version = "0.19.0"
3+
version = "0.19.1"
44
description = "Python bindings for encoding and decoding Databento Binary Encoding (DBN)"
55
authors = ["Databento <[email protected]>"]
66
license = "Apache-2.0"
@@ -17,7 +17,7 @@ build-backend = "maturin"
1717

1818
[project]
1919
name = "databento-dbn"
20-
version = "0.19.0"
20+
version = "0.19.1"
2121
authors = [
2222
{ name = "Databento", email = "[email protected]" }
2323
]

rust/dbn-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ name = "dbn"
1616
path = "src/main.rs"
1717

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

2121
anyhow = { workspace = true }
2222
clap = { version = "4.5", features = ["derive", "wrap_help"] }

rust/dbn/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ serde = ["dep:serde", "time/parsing", "time/serde"]
2525
trivial_copy = []
2626

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

3030
async-compression = { version = "0.4.11", features = ["tokio", "zstd"], optional = true }
3131
csv = { workspace = true }

rust/dbn/src/macros.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ macro_rules! rtype_dispatch_base {
1717
match $rec_ref.rtype() {
1818
Ok(rtype) => Ok(match rtype {
1919
RType::Mbp0 => $handler!(TradeMsg),
20-
RType::Mbp1 | RType::Bbo1S | RType::Bbo1M => $handler!(Mbp1Msg),
20+
RType::Mbp1 => $handler!(Mbp1Msg),
2121
RType::Mbp10 => $handler!(Mbp10Msg),
2222
#[allow(deprecated)]
2323
RType::OhlcvDeprecated
@@ -61,6 +61,7 @@ macro_rules! rtype_dispatch_base {
6161
RType::Statistics => $handler!(StatMsg),
6262
RType::Mbo => $handler!(MboMsg),
6363
RType::Cbbo | RType::Cbbo1S | RType::Cbbo1M | RType::Tcbbo => $handler!(CbboMsg),
64+
RType::Bbo1S | RType::Bbo1M => $handler!(BboMsg),
6465
}),
6566
Err(e) => Err(e),
6667
}
@@ -75,7 +76,8 @@ macro_rules! schema_dispatch_base {
7576
use $crate::record::*;
7677
match $schema {
7778
Schema::Mbo => $handler!(MboMsg),
78-
Schema::Mbp1 | Schema::Tbbo | Schema::Bbo1S | Schema::Bbo1M => $handler!(Mbp1Msg),
79+
Schema::Mbp1 | Schema::Tbbo => $handler!(Mbp1Msg),
80+
Schema::Bbo1S | Schema::Bbo1M => $handler!(BboMsg),
7981
Schema::Mbp10 => $handler!(Mbp10Msg),
8082
Schema::Trades => $handler!(TradeMsg),
8183
Schema::Ohlcv1D

rust/dbn/src/record_enum.rs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::{
2-
record::CbboMsg, Error, ErrorMsg, ImbalanceMsg, InstrumentDefMsg, MboMsg, Mbp10Msg, Mbp1Msg,
3-
OhlcvMsg, RType, Record, RecordMut, RecordRef, StatMsg, StatusMsg, SymbolMappingMsg, SystemMsg,
4-
TradeMsg,
2+
record::CbboMsg, BboMsg, Error, ErrorMsg, ImbalanceMsg, InstrumentDefMsg, MboMsg, Mbp10Msg,
3+
Mbp1Msg, OhlcvMsg, RType, Record, RecordMut, RecordRef, StatMsg, StatusMsg, SymbolMappingMsg,
4+
SystemMsg, TradeMsg,
55
};
66

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

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

7781
impl<'a> From<&'a RecordEnum> for RecordRefEnum<'a> {
@@ -90,6 +94,7 @@ impl<'a> From<&'a RecordEnum> for RecordRefEnum<'a> {
9094
RecordEnum::SymbolMapping(rec) => Self::SymbolMapping(rec),
9195
RecordEnum::System(rec) => Self::System(rec),
9296
RecordEnum::Cbbo(rec) => Self::Cbbo(rec),
97+
RecordEnum::Bbo(rec) => Self::Bbo(rec),
9398
}
9499
}
95100
}
@@ -112,6 +117,7 @@ impl<'a> RecordRefEnum<'a> {
112117
Self::SymbolMapping(rec) => RecordEnum::from((*rec).clone()),
113118
Self::System(rec) => RecordEnum::from((*rec).clone()),
114119
Self::Cbbo(rec) => RecordEnum::from((*rec).clone()),
120+
Self::Bbo(rec) => RecordEnum::Bbo((*rec).clone()),
115121
}
116122
}
117123
}
@@ -313,6 +319,7 @@ impl Record for RecordEnum {
313319
RecordEnum::SymbolMapping(rec) => rec.header(),
314320
RecordEnum::System(rec) => rec.header(),
315321
RecordEnum::Cbbo(rec) => rec.header(),
322+
RecordEnum::Bbo(rec) => rec.header(),
316323
}
317324
}
318325

@@ -331,6 +338,7 @@ impl Record for RecordEnum {
331338
RecordEnum::SymbolMapping(rec) => rec.raw_index_ts(),
332339
RecordEnum::System(rec) => rec.raw_index_ts(),
333340
RecordEnum::Cbbo(rec) => rec.raw_index_ts(),
341+
RecordEnum::Bbo(rec) => rec.raw_index_ts(),
334342
}
335343
}
336344
}
@@ -351,6 +359,7 @@ impl RecordMut for RecordEnum {
351359
RecordEnum::SymbolMapping(rec) => rec.header_mut(),
352360
RecordEnum::System(rec) => rec.header_mut(),
353361
RecordEnum::Cbbo(rec) => rec.header_mut(),
362+
RecordEnum::Bbo(rec) => rec.header_mut(),
354363
}
355364
}
356365
}
@@ -371,6 +380,7 @@ impl<'a> Record for RecordRefEnum<'a> {
371380
RecordRefEnum::SymbolMapping(rec) => rec.header(),
372381
RecordRefEnum::System(rec) => rec.header(),
373382
RecordRefEnum::Cbbo(rec) => rec.header(),
383+
RecordRefEnum::Bbo(rec) => rec.header(),
374384
}
375385
}
376386

@@ -389,6 +399,7 @@ impl<'a> Record for RecordRefEnum<'a> {
389399
RecordRefEnum::SymbolMapping(rec) => rec.raw_index_ts(),
390400
RecordRefEnum::System(rec) => rec.raw_index_ts(),
391401
RecordRefEnum::Cbbo(rec) => rec.raw_index_ts(),
402+
RecordRefEnum::Bbo(rec) => rec.raw_index_ts(),
392403
}
393404
}
394405
}

rust/dbn/src/record_ref.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ impl<'a> From<&'a RecordEnum> for RecordRef<'a> {
167167
RecordEnum::SymbolMapping(rec) => Self::from(rec),
168168
RecordEnum::System(rec) => Self::from(rec),
169169
RecordEnum::Cbbo(rec) => Self::from(rec),
170+
RecordEnum::Bbo(rec) => Self::from(rec),
170171
}
171172
}
172173
}
@@ -187,6 +188,7 @@ impl<'a> From<RecordRefEnum<'a>> for RecordRef<'a> {
187188
RecordRefEnum::SymbolMapping(rec) => Self::from(rec),
188189
RecordRefEnum::System(rec) => Self::from(rec),
189190
RecordRefEnum::Cbbo(rec) => Self::from(rec),
191+
RecordRefEnum::Bbo(rec) => Self::from(rec),
190192
}
191193
}
192194
}

0 commit comments

Comments
 (0)