Skip to content

Commit

Permalink
VER: Release 0.39.0
Browse files Browse the repository at this point in the history
See release notes.
  • Loading branch information
nmacholl authored Jul 30, 2024
2 parents de7eab9 + 285b8a5 commit aee1b09
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 3 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.39.0 - 2024-07-30

#### Enhancements
- Added new publisher value for `DBEQ.SUMMARY`
- Upgraded `databento-dbn` to 0.20.0

## 0.38.0 - 2024-07-23

This release adds a new feature to the `Live` client for automatically reconnecting when an unexpected disconnection occurs.
Expand Down
22 changes: 22 additions & 0 deletions databento/common/publishers.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,8 @@ class Dataset(StringyMixin, str, Enum):
Databento Equities Max.
XNAS_BASIC
Nasdaq Basic (NLS+QBBO).
DBEQ_SUMMARY
Databento Equities Summary.
"""

Expand Down Expand Up @@ -530,6 +532,7 @@ class Dataset(StringyMixin, str, Enum):
NDEX_IMPACT = "NDEX.IMPACT"
DBEQ_MAX = "DBEQ.MAX"
XNAS_BASIC = "XNAS.BASIC"
DBEQ_SUMMARY = "DBEQ.SUMMARY"

@classmethod
def from_int(cls, value: int) -> Dataset:
Expand Down Expand Up @@ -598,6 +601,8 @@ def from_int(cls, value: int) -> Dataset:
return Dataset.DBEQ_MAX
if value == 31:
return Dataset.XNAS_BASIC
if value == 32:
return Dataset.DBEQ_SUMMARY
raise ValueError(f"Integer value {value} does not correspond with any Dataset variant")

def to_int(self) -> int:
Expand Down Expand Up @@ -666,6 +671,8 @@ def to_int(self) -> int:
return 30
if self == Dataset.XNAS_BASIC:
return 31
if self == Dataset.DBEQ_SUMMARY:
return 32
raise ValueError("Invalid Dataset")

@property
Expand Down Expand Up @@ -735,6 +742,8 @@ def description(self) -> str:
return "Databento Equities Max"
if self == Dataset.XNAS_BASIC:
return "Nasdaq Basic (NLS+QBBO)"
if self == Dataset.DBEQ_SUMMARY:
return "Databento Equities Summary"
raise ValueError("Unexpected Dataset value")


Expand Down Expand Up @@ -922,6 +931,8 @@ class Publisher(StringyMixin, str, Enum):
Nasdaq Basic - Nasdaq BX.
XNAS_BASIC_XPSX
Nasdaq Basic - Nasdaq PSX.
DBEQ_SUMMARY_DBEQ
Databento Equities Summary.
"""

Expand Down Expand Up @@ -1014,6 +1025,7 @@ class Publisher(StringyMixin, str, Enum):
XNAS_NLS_XPSX = "XNAS.NLS.XPSX"
XNAS_BASIC_XBOS = "XNAS.BASIC.XBOS"
XNAS_BASIC_XPSX = "XNAS.BASIC.XPSX"
DBEQ_SUMMARY_DBEQ = "DBEQ.SUMMARY.DBEQ"

@classmethod
def from_int(cls, value: int) -> Publisher:
Expand Down Expand Up @@ -1198,6 +1210,8 @@ def from_int(cls, value: int) -> Publisher:
return Publisher.XNAS_BASIC_XBOS
if value == 89:
return Publisher.XNAS_BASIC_XPSX
if value == 90:
return Publisher.DBEQ_SUMMARY_DBEQ
raise ValueError(f"Integer value {value} does not correspond with any Publisher variant")

def to_int(self) -> int:
Expand Down Expand Up @@ -1382,6 +1396,8 @@ def to_int(self) -> int:
return 88
if self == Publisher.XNAS_BASIC_XPSX:
return 89
if self == Publisher.DBEQ_SUMMARY_DBEQ:
return 90
raise ValueError("Invalid Publisher")

@property
Expand Down Expand Up @@ -1567,6 +1583,8 @@ def venue(self) -> Venue:
return Venue.XBOS
if self == Publisher.XNAS_BASIC_XPSX:
return Venue.XPSX
if self == Publisher.DBEQ_SUMMARY_DBEQ:
return Venue.DBEQ
raise ValueError("Unexpected Publisher value")

@property
Expand Down Expand Up @@ -1752,6 +1770,8 @@ def dataset(self) -> Dataset:
return Dataset.XNAS_BASIC
if self == Publisher.XNAS_BASIC_XPSX:
return Dataset.XNAS_BASIC
if self == Publisher.DBEQ_SUMMARY_DBEQ:
return Dataset.DBEQ_SUMMARY
raise ValueError("Unexpected Publisher value")

@property
Expand Down Expand Up @@ -1937,4 +1957,6 @@ def description(self) -> str:
return "Nasdaq Basic - Nasdaq BX"
if self == Publisher.XNAS_BASIC_XPSX:
return "Nasdaq Basic - Nasdaq PSX"
if self == Publisher.DBEQ_SUMMARY_DBEQ:
return "Databento Equities Summary"
raise ValueError("Unexpected Publisher value")
2 changes: 1 addition & 1 deletion databento/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.38.0"
__version__ = "0.39.0"
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "databento"
version = "0.38.0"
version = "0.39.0"
description = "Official Python client library for Databento"
authors = [
"Databento <[email protected]>",
Expand Down Expand Up @@ -32,7 +32,7 @@ aiohttp = [
{version = "^3.8.3", python = "<3.12"},
{version = "^3.9.0", python = "^3.12"}
]
databento-dbn = "0.19.1"
databento-dbn = "0.20.0"
numpy = [
{version = ">=1.23.5", python = "<3.12"},
{version = "^1.26.0", python = "^3.12"}
Expand Down
4 changes: 4 additions & 0 deletions tests/test_live_client_reconnect.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ async def test_reconnect_before_start(

await mock_live_server.wait_for_message_of_type(AuthenticationRequest)

live_client.stop()

# Assert
with pytest.raises(asyncio.TimeoutError):
await mock_live_server.wait_for_message_of_type(SessionStart)
Expand Down Expand Up @@ -166,6 +168,8 @@ async def test_reconnect_subscriptions(
request = await mock_live_server.wait_for_message_of_type(SubscriptionRequest)
reconnect_subscriptions.append(request)

live_client.stop()

# Assert
for i, symbol in enumerate(symbols):
sub = reconnect_subscriptions[i]
Expand Down

0 comments on commit aee1b09

Please sign in to comment.