Skip to content

Commit 7f0cace

Browse files
authored
VER: Release 0.19.0
See release notes.
2 parents 617d006 + 1321d73 commit 7f0cace

26 files changed

+1717
-290
lines changed

CHANGELOG.md

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

3+
## 0.19.0 - 2023-08-25
4+
5+
This release includes improvements to handling large DBN data and adds support for future datasets.
6+
7+
#### Enhancements
8+
- Added `count` parameter to `DBNStore.to_df` and `DBNStore.to_ndarray` to help process large files incrementally
9+
- Improved memory usage of `DBNStore.to_csv` and `DBNStore.to_json`
10+
- Added the `Publisher`, `Venue`, and `Dataset` enums
11+
- Replace null prices with `NaN` when `pretty_px=True` in `DBNStore.to_df()`
12+
- Upgraded `databento-dbn` to 0.8.3
13+
14+
#### Bug fixes
15+
- Fixed issue where exception messages were displaying JSON encoded data
16+
- Fixed typo in `BATY.PITCH.BATY` publisher
17+
- Reduced floating error when converting prices to floats with `pretty_px=True`
18+
19+
#### Breaking changes
20+
- `DBNStore.to_df` now always utf-8 decodes string fields
21+
322
## 0.18.1 - 2023-08-16
423

524
#### Bug fixes

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The library is fully compatible with the latest distribution of Anaconda 3.8 and
3232
The minimum dependencies as found in the `pyproject.toml` are also listed below:
3333
- python = "^3.8"
3434
- aiohttp = "^3.8.3"
35-
- databento-dbn = "0.8.2"
35+
- databento-dbn = "0.8.3"
3636
- numpy= ">=1.23.5"
3737
- pandas = ">=1.5.3"
3838
- requests = ">=2.24.0"

databento/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
from databento.common import bentologging
2222
from databento.common.dbnstore import DBNStore
23-
from databento.common.enums import Dataset
2423
from databento.common.enums import Delivery
2524
from databento.common.enums import FeedMode
2625
from databento.common.enums import HistoricalGateway
@@ -33,6 +32,9 @@
3332
from databento.common.error import BentoError
3433
from databento.common.error import BentoHttpError
3534
from databento.common.error import BentoServerError
35+
from databento.common.publishers import Dataset
36+
from databento.common.publishers import Publisher
37+
from databento.common.publishers import Venue
3638
from databento.historical.api import API_VERSION
3739
from databento.historical.client import Historical
3840
from databento.live import DBNRecord
@@ -49,7 +51,9 @@
4951
"BentoHttpError",
5052
"BentoServerError",
5153
"Compression",
54+
"Publisher",
5255
"Dataset",
56+
"Venue",
5357
"Delivery",
5458
"Encoding",
5559
"FeedMode",

databento/common/data.py

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
from databento.live import DBNRecord
1515

1616

17+
DEFINITION_TYPE_MAX_MAP = {
18+
x[0]: np.iinfo(x[1]).max
19+
for x in InstrumentDefMsg._dtypes
20+
if not isinstance(x[1], str)
21+
}
22+
1723
SCHEMA_STRUCT_MAP: dict[Schema, type[DBNRecord]] = {
1824
Schema.DEFINITION: InstrumentDefMsg,
1925
Schema.IMBALANCE: ImbalanceMsg,
@@ -51,42 +57,6 @@
5157
Schema.STATISTICS: StatMsg._dtypes,
5258
}
5359

54-
DEFINITION_CHARARRAY_COLUMNS = [
55-
"currency",
56-
"settl_currency",
57-
"secsubtype",
58-
"raw_symbol",
59-
"group",
60-
"exchange",
61-
"asset",
62-
"cfi",
63-
"security_type",
64-
"unit_of_measure",
65-
"underlying",
66-
"strike_price_currency",
67-
"instrument_class",
68-
"match_algorithm",
69-
"security_update_action",
70-
"user_defined_instrument",
71-
]
72-
73-
DEFINITION_PRICE_COLUMNS = [
74-
"min_price_increment",
75-
"high_limit_price",
76-
"low_limit_price",
77-
"max_price_variation",
78-
"trading_reference_price",
79-
"min_price_increment_amount",
80-
"price_ratio",
81-
"strike_price",
82-
]
83-
84-
DEFINITION_TYPE_MAX_MAP = {
85-
x[0]: np.iinfo(x[1]).max
86-
for x in InstrumentDefMsg._dtypes
87-
if not isinstance(x[1], str)
88-
}
89-
9060
SCHEMA_COLUMNS = {
9161
Schema.MBO: MBOMsg._ordered_fields,
9262
Schema.MBP_1: MBP1Msg._ordered_fields,

0 commit comments

Comments
 (0)