Docs/readme ibis examples#1
Conversation
Replace httpx-based HotdataClient with the official OpenAPI client (hotdata>=0.1): QueryApi, ConnectionsApi, InformationSchemaApi, UploadsApi, DatasetsApi. Map ApiException to HotdataAPIError. Expose list_connections/get_information_schema on the client; add upload_file and create_dataset_from_upload on Backend for dataset creation from uploads. Update tests for SDK response validation and README dependency note.
- Trim README; document Ibis table/execute workflows and federation prefix - Add examples/04_ibis_table_workflows.py (TPC-H via con.sql + chains)
| body=r.text, | ||
| ) | ||
| return r.json() | ||
| return |
There was a problem hiding this comment.
nit: (not blocking) close() no longer releases the underlying client. The previous implementation called self._client.close(); the OpenAPI-generated ApiClient owns a urllib3 PoolManager that should be closed to release sockets. Tests call client.close() after each test, so any leak is invisible there but accumulates in long-running processes.
| return | |
| def close(self) -> None: | |
| self._client.close() |
| dependencies = [ | ||
| "ibis-framework>=10.0,<11", | ||
| "hotdata>=0.1.0", | ||
| "httpx>=0.27", |
There was a problem hiding this comment.
super nit: (not blocking) httpx is no longer used by src/ibis_hotdata after this PR — only examples/_helpers.py still imports it, and examples aren't packaged. Consider moving httpx to the dev dependency group (or dropping it entirely if examples can be ported to the SDK too).
| msg = f"Hotdata API error: {exc.reason}" | ||
| if exc.body: | ||
| msg = f"{msg} {exc.body}" | ||
| return HotdataAPIError(msg.strip(), status_code=exc.status, body=exc.body) |
There was a problem hiding this comment.
super nit: (not blocking) exc.body from the SDK is often raw bytes — when interpolated into the f-string it renders as b'...' in the user-facing message. Decoding once would clean that up:
| return HotdataAPIError(msg.strip(), status_code=exc.status, body=exc.body) | |
| def _from_api_exception(exc: ApiException) -> HotdataAPIError: | |
| body = exc.body | |
| if isinstance(body, (bytes, bytearray)): | |
| body = body.decode("utf-8", errors="replace") | |
| msg = f"Hotdata API error: {exc.reason}" | |
| if body: | |
| msg = f"{msg} {body}" | |
| return HotdataAPIError(msg.strip(), status_code=exc.status, body=exc.body) |
…ly httpx - HotdataClient.close: call ApiClient.close if present else pool_manager.clear - _from_api_exception: decode bytes body for readable messages - Move httpx to dependency-groups dev; README uv sync --group dev
No description provided.