From 1511b1b95fee6bffb3c9cce7e0f1ebc96a8540c1 Mon Sep 17 00:00:00 2001 From: Eddie A Tejeda <669988+eddietejeda@users.noreply.github.com> Date: Wed, 27 May 2026 15:08:30 -0700 Subject: [PATCH 1/2] deps: upgrade hotdata SDK to 0.2.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the hotdata dependency to >=0.2.4 and updates callers for the breaking rename of `description` → `name` on `CreateDatabaseRequest`, `DatabaseSummary`, and `DatabaseDetailResponse`. - `http.py`: pass `name=` instead of `description=` to `CreateDatabaseRequest` - `backend.py`: scan list by `db["name"]` instead of `db["description"]` - tests: update mock request assertions and response fixtures accordingly --- pyproject.toml | 2 +- src/ibis_hotdata/backend.py | 2 +- src/ibis_hotdata/http.py | 2 +- tests/test_hotdata_backend.py | 12 ++++++------ tests/test_hotdata_http.py | 4 ++-- uv.lock | 10 +++++----- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4d81cd8..d38e4b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ classifiers = [ ] dependencies = [ "ibis-framework>=10.0,<11", - "hotdata>=0.2.3", + "hotdata>=0.2.4", "pyarrow>=15", "pyarrow-hotfix>=0.6", "pandas>=2", diff --git a/src/ibis_hotdata/backend.py b/src/ibis_hotdata/backend.py index cfdb1d4..ccd5700 100644 --- a/src/ibis_hotdata/backend.py +++ b/src/ibis_hotdata/backend.py @@ -353,7 +353,7 @@ def _find_managed_connection(self, name_or_id: str) -> dict[str, Any] | None: except HotdataAPIError as exc: raise _ibis_err_from_hotdata(exc) from exc for db in data.get("databases", []): - if db.get("description") == name_or_id: + if db.get("name") == name_or_id: try: return self._http.get_database(db["id"]) except HotdataAPIError as exc: diff --git a/src/ibis_hotdata/http.py b/src/ibis_hotdata/http.py index bd51cd9..afb8f05 100644 --- a/src/ibis_hotdata/http.py +++ b/src/ibis_hotdata/http.py @@ -209,7 +209,7 @@ def create_managed_database( tables=[DatabaseDefaultTableDecl(name=t) for t in tables], ) ] - req = CreateDatabaseRequest(description=description, schemas=schemas) + req = CreateDatabaseRequest(name=description, schemas=schemas) resp = self._safe_call(self._databases.create_database, req) return resp.model_dump(by_alias=True, mode="json") diff --git a/tests/test_hotdata_backend.py b/tests/test_hotdata_backend.py index 2e76d40..f7d81dd 100644 --- a/tests/test_hotdata_backend.py +++ b/tests/test_hotdata_backend.py @@ -48,7 +48,7 @@ def managed_databases_response() -> dict: "databases": [ { "id": MANAGED_DB_ID, - "description": MANAGED_NAME, + "name": MANAGED_NAME, } ] } @@ -57,7 +57,7 @@ def managed_databases_response() -> dict: def managed_database_detail_response() -> dict: return { "id": MANAGED_DB_ID, - "description": MANAGED_NAME, + "name": MANAGED_NAME, "default_connection_id": MANAGED_CONN, "expires_at": None, "attachments": [], @@ -483,14 +483,14 @@ def test_create_database_posts_managed_connection(httpserver: HTTPServer, srv: s def on_create(req: Request) -> Response: body = req.get_json() assert body == { - "description": "sales", + "name": "sales", "schemas": [{"name": "public", "tables": [{"name": "orders"}]}], } return Response( json.dumps( { "id": MANAGED_DB_ID, - "description": "sales", + "name": "sales", "default_connection_id": MANAGED_CONN, "expires_at": None, } @@ -513,13 +513,13 @@ def on_create(req: Request) -> Response: def test_create_database_sends_no_schemas_when_no_tables(httpserver: HTTPServer, srv: str): def on_create(req: Request) -> Response: body = req.get_json() - assert body.get("description") == "empty_db" + assert body.get("name") == "empty_db" assert not body.get("schemas") # no tables → no schemas declared return Response( json.dumps( { "id": MANAGED_DB_ID, - "description": "empty_db", + "name": "empty_db", "default_connection_id": MANAGED_CONN, "expires_at": None, } diff --git a/tests/test_hotdata_http.py b/tests/test_hotdata_http.py index 9c5e2f4..7fb63d7 100644 --- a/tests/test_hotdata_http.py +++ b/tests/test_hotdata_http.py @@ -222,14 +222,14 @@ def test_create_managed_database(httpserver: HTTPServer): def on_create(req: Request) -> Response: body = req.get_json() assert body == { - "description": "sales", + "name": "sales", "schemas": [{"name": "public", "tables": [{"name": "orders"}]}], } return Response( json.dumps( { "id": "db_sales", - "description": "sales", + "name": "sales", "default_connection_id": "conn_sales", "expires_at": None, } diff --git a/uv.lock b/uv.lock index 7040166..438a9d8 100644 --- a/uv.lock +++ b/uv.lock @@ -84,7 +84,7 @@ wheels = [ [[package]] name = "hotdata" -version = "0.2.3" +version = "0.2.4" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "pydantic" }, @@ -92,14 +92,14 @@ dependencies = [ { name = "typing-extensions" }, { name = "urllib3" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/4f/20/5d016d4aec39fe04eb77a6394651e3b18f6ecc701dc678563889debd79ed/hotdata-0.2.3.tar.gz", hash = "sha256:bc415af4ac475e5bd5fe3320d1c14aaac92942462a0ef9dac22b89bcc120ad55", size = 118187, upload-time = "2026-05-23T04:41:10.835Z" } +sdist = { url = "https://files.pythonhosted.org/packages/43/31/4b13883c5b3bc50892210dc1e3cac71b5bb08d352e70ac557c78383c1e9e/hotdata-0.2.4.tar.gz", hash = "sha256:7fc64448eaf65b822b50249c51350bf5ec05edd03c611b92ce881a495ae336ab", size = 121635, upload-time = "2026-05-27T22:05:28.424Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/09/87/d3cb845ba01e5b4e9bfb1e59d0032a246b94497e470d171f2ee2a56bd850/hotdata-0.2.3-py3-none-any.whl", hash = "sha256:aed2ae884d184cf143572c84d068a9ceedbe021a6d14005332647a46aa7be11c", size = 275718, upload-time = "2026-05-23T04:41:09.355Z" }, + { url = "https://files.pythonhosted.org/packages/20/cb/fb9e48af1d105ff18b0732bc87e552a32f4d816ab50c093d901f9fe7e8cd/hotdata-0.2.4-py3-none-any.whl", hash = "sha256:e6652ee2f88bc214938784747e3f644a4ecc4987f9887d302ca3b8940fc52028", size = 285813, upload-time = "2026-05-27T22:05:26.766Z" }, ] [[package]] name = "hotdata-ibis" -version = "0.1.1" +version = "0.1.3" source = { editable = "." } dependencies = [ { name = "hotdata" }, @@ -121,7 +121,7 @@ dev = [ [package.metadata] requires-dist = [ - { name = "hotdata", specifier = ">=0.2.3" }, + { name = "hotdata", specifier = ">=0.2.4" }, { name = "ibis-framework", specifier = ">=10.0,<11" }, { name = "pandas", specifier = ">=2" }, { name = "pyarrow", specifier = ">=15" }, From ea3ca2d87724a844f0db359266742ab75b018cb5 Mon Sep 17 00:00:00 2001 From: Eddie A Tejeda <669988+eddietejeda@users.noreply.github.com> Date: Wed, 27 May 2026 15:18:26 -0700 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20rename=20create=5Fmanaged=5Fdatabase?= =?UTF-8?q?=20param=20description=E2=86=92name;=20update=20stale=20docstri?= =?UTF-8?q?ngs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ibis_hotdata/backend.py | 10 +++++----- src/ibis_hotdata/http.py | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ibis_hotdata/backend.py b/src/ibis_hotdata/backend.py index ccd5700..e865880 100644 --- a/src/ibis_hotdata/backend.py +++ b/src/ibis_hotdata/backend.py @@ -337,7 +337,7 @@ def _resolve_connection(self, name_or_id: str) -> dict[str, Any]: raise com.IbisError(f"Unknown Hotdata connection {name_or_id!r}") def _find_managed_connection(self, name_or_id: str) -> dict[str, Any] | None: - """Look up a managed database by id or description. + """Look up a managed database by id or name. Returns the detail dict if found, ``None`` if not found. Raises :class:`~ibis.common.exceptions.IbisError` on API failures. @@ -347,7 +347,7 @@ def _find_managed_connection(self, name_or_id: str) -> dict[str, Any] | None: except HotdataAPIError as exc: if exc.status_code != 404: raise _ibis_err_from_hotdata(exc) from exc - # Fall back to description scan + # Fall back to name scan try: data = self._http.list_databases() except HotdataAPIError as exc: @@ -361,7 +361,7 @@ def _find_managed_connection(self, name_or_id: str) -> dict[str, Any] | None: return None def _resolve_managed_connection(self, name_or_id: str) -> dict[str, Any]: - """Resolve a managed database by id or description, returning its detail dict.""" + """Resolve a managed database by id or name, returning its detail dict.""" result = self._find_managed_connection(name_or_id) if result is None: raise com.IbisError(f"Unknown managed database {name_or_id!r}") @@ -585,7 +585,7 @@ def create_database( raise com.UnsupportedOperationError( "Hotdata create_database creates a managed connection (catalog); catalog= is not supported" ) - # Check if a database with this description already exists. + # Check if a database with this name already exists. # Use _find_managed_connection so API errors (5xx) propagate while # a plain not-found returns None and is handled below. existing = self._find_managed_connection(name) @@ -594,7 +594,7 @@ def create_database( raise com.IbisInputError(f"Managed database {name!r} already exists") return try: - self._http.create_managed_database(description=name, schema=schema, tables=list(tables or ())) + self._http.create_managed_database(name=name, schema=schema, tables=list(tables or ())) except HotdataAPIError as exc: raise _ibis_err_from_hotdata(exc) from exc diff --git a/src/ibis_hotdata/http.py b/src/ibis_hotdata/http.py index afb8f05..7991201 100644 --- a/src/ibis_hotdata/http.py +++ b/src/ibis_hotdata/http.py @@ -195,7 +195,7 @@ def get_database(self, database_id: str) -> dict[str, Any]: def create_managed_database( self, - description: str | None = None, + name: str | None = None, *, schema: str = "public", tables: Sequence[str] = (), @@ -209,7 +209,7 @@ def create_managed_database( tables=[DatabaseDefaultTableDecl(name=t) for t in tables], ) ] - req = CreateDatabaseRequest(name=description, schemas=schemas) + req = CreateDatabaseRequest(name=name, schemas=schemas) resp = self._safe_call(self._databases.create_database, req) return resp.model_dump(by_alias=True, mode="json")