Skip to content

Commit 4e2dc72

Browse files
committed
deps: upgrade hotdata SDK to 0.2.4
Bumps hotdata dependency to >=0.2.4 and fixes callers for the breaking rename of `description` → `name` on `CreateDatabaseRequest`, `DatabaseSummary`, and `DatabaseDetailResponse`. - `databases.py`: read `detail.name` instead of `detail.description` - `client.py`: use `name=` on `CreateDatabaseRequest`; scan list by `db.name` - `tests/`: update SimpleNamespace fixtures to match renamed SDK attributes
1 parent 42ccafb commit 4e2dc72

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

hotdata_runtime/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def resolve_managed_database(self, name_or_id: str) -> ManagedDatabase:
180180
listing = self._databases_api().list_databases()
181181
match_id: str | None = None
182182
for db in listing.databases:
183-
if db.description == name_or_id:
183+
if db.name == name_or_id:
184184
match_id = db.id
185185
break
186186
if match_id is None:
@@ -208,7 +208,7 @@ def create_managed_database(
208208
)
209209
]
210210
request = CreateDatabaseRequest(
211-
description=description,
211+
name=description,
212212
schemas=schemas,
213213
expires_at=expires_at,
214214
)

hotdata_runtime/databases.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def is_parquet_path(path: str) -> bool:
5252
def managed_database_from_detail(detail: Any) -> ManagedDatabase:
5353
return ManagedDatabase(
5454
id=str(detail.id),
55-
description=detail.description,
55+
description=detail.name,
5656
default_connection_id=str(detail.default_connection_id),
5757
)
5858

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ readme = "README.md"
1010
requires-python = ">=3.10"
1111
license = { text = "MIT" }
1212
dependencies = [
13-
"hotdata>=0.2.3",
13+
"hotdata>=0.2.4",
1414
"pandas>=2.0",
1515
]
1616

tests/test_databases.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def _client() -> HotdataClient:
2020
def _detail(id="db_1", description="sales", default_connection_id="conn_1"):
2121
return SimpleNamespace(
2222
id=id,
23-
description=description,
23+
name=description,
2424
default_connection_id=default_connection_id,
2525
)
2626

@@ -86,7 +86,7 @@ def test_resolve_managed_database_by_id():
8686

8787
def test_resolve_managed_database_by_description():
8888
client = _client()
89-
summary = SimpleNamespace(id="db_1", description="sales")
89+
summary = SimpleNamespace(id="db_1", name="sales")
9090
listing = SimpleNamespace(databases=[summary])
9191
detail = _detail()
9292
with patch.object(client, "_databases_api") as dbs:

uv.lock

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

0 commit comments

Comments
 (0)