Skip to content

Commit

Permalink
VER: Release 0.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
threecgreen authored Sep 8, 2023
2 parents 6c72757 + d18cc9b commit 2fd9c8d
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 17 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.10.1 - 2023-09-07

### Bug fixes
- Changed `Metadata::symbol_map` and `symbol_map_for_date` to return `String` values
instead of `&str`, which made it difficult to use

## 0.10.0 - 2023-09-07
### Enhancements
- Added `start` and `end` getters to `Metadata` that return `time::OffsetDateTime`
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 c/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "dbn-c"
authors = ["Databento <support@databento.com>"]
version = "0.10.0"
version = "0.10.1"
edition = "2021"
description = "C bindings for working with Databento Binary Encoding (DBN)"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion python/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "databento-dbn"
authors = ["Databento <support@databento.com>"]
version = "0.10.0"
version = "0.10.1"
edition = "2021"
description = "Python library written in Rust for working with Databento Binary Encoding (DBN)"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "databento-dbn"
version = "0.10.0"
version = "0.10.1"
description = "Python bindings for encoding and decoding Databento Binary Encoding (DBN)"
authors = ["Databento <support@databento.com>"]
license = "Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions rust/dbn-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "dbn-cli"
authors = ["Databento <support@databento.com>"]
version = "0.10.0"
version = "0.10.1"
edition = "2021"
description = "Command-line utility for converting Databento Binary Encoding (DBN) files to text-based formats"
default-run = "dbn"
Expand All @@ -17,7 +17,7 @@ path = "src/main.rs"

[dependencies]
# Databento common DBN library
dbn = { path = "../dbn", version = "=0.10.0", default-features = false }
dbn = { path = "../dbn", version = "=0.10.1", default-features = false }

# Error handling
anyhow = "1.0.72"
Expand Down
2 changes: 1 addition & 1 deletion rust/dbn-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "dbn-macros"
authors = ["Databento <support@databento.com>"]
version = "0.10.0"
version = "0.10.1"
edition = "2021"
description = "Proc macros for dbn crate"
license = "Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions rust/dbn/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "dbn"
authors = ["Databento <support@databento.com>"]
version = "0.10.0"
version = "0.10.1"
edition = "2021"
description = "Library for working with Databento Binary Encoding (DBN)"
license = "Apache-2.0"
Expand All @@ -25,7 +25,7 @@ serde = ["dep:serde", "time/parsing", "time/serde"]
trivial_copy = []

[dependencies]
dbn-macros = { version = "=0.10.0", path = "../dbn-macros" }
dbn-macros = { version = "=0.10.1", path = "../dbn-macros" }

# async (de)compression
async-compression = { version = "0.4.1", features = ["tokio", "zstd"], optional = true }
Expand Down
8 changes: 4 additions & 4 deletions rust/dbn/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl Metadata {
/// # Errors
/// This function returns an error if it can't parse a symbol into a `u32`
/// instrument ID.
pub fn symbol_map_for_date(&self, date: time::Date) -> crate::Result<HashMap<u32, &str>> {
pub fn symbol_map_for_date(&self, date: time::Date) -> crate::Result<HashMap<u32, String>> {
if date < self.start().date() || self.end().map_or(false, |end| end.date() <= date) {
return Err(crate::Error::BadArgument {
param_name: "date".to_owned(),
Expand All @@ -118,7 +118,7 @@ impl Metadata {
.symbol
.parse()
.map_err(|_| crate::Error::conversion::<u32>(interval.symbol.as_str()))?;
index.insert(iid, mapping.raw_symbol.as_str());
index.insert(iid, mapping.raw_symbol.clone());
}
}
Ok(index)
Expand All @@ -132,7 +132,7 @@ impl Metadata {
/// # Errors
/// This function returns an error if it can't parse a symbol into a `u32`
/// instrument ID.
pub fn symbol_map(&self) -> crate::Result<HashMap<(time::Date, u32), &str>> {
pub fn symbol_map(&self) -> crate::Result<HashMap<(time::Date, u32), String>> {
let mut index = HashMap::new();
for mapping in self.mappings.iter() {
for interval in mapping.intervals.iter() {
Expand All @@ -146,7 +146,7 @@ impl Metadata {
.parse()
.map_err(|_| crate::Error::conversion::<u32>(interval.symbol.as_str()))?;
loop {
index.insert((day, iid), mapping.raw_symbol.as_str());
index.insert((day, iid), mapping.raw_symbol.clone());
day = day.next_day().unwrap();
if day == interval.end_date {
break;
Expand Down

0 comments on commit 2fd9c8d

Please sign in to comment.