hotdata-framework 0.5.0__tar.gz → 0.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/CHANGELOG.md +6 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/PKG-INFO +1 -1
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/hotdata_framework/client.py +28 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/pyproject.toml +1 -1
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/tests/test_client.py +29 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/uv.lock +1 -1
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/.github/dependabot.yml +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/.github/workflows/check-release.yml +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/.github/workflows/ci.yml +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/.github/workflows/dependabot-automerge.yml +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/.github/workflows/publish.yml +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/.github/workflows/release.yml +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/.gitignore +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/CONTRACT.md +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/README.md +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/RELEASING.md +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/examples/basic_usage.py +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/hotdata_framework/__init__.py +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/hotdata_framework/databases.py +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/hotdata_framework/env.py +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/hotdata_framework/errors.py +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/hotdata_framework/health.py +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/hotdata_framework/http.py +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/hotdata_framework/managed_client.py +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/hotdata_framework/py.typed +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/hotdata_framework/result.py +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/scripts/check-release.py +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/scripts/extract-changelog.py +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/scripts/publish-workflow.sh +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/scripts/release.sh +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/scripts/update_changelog.py +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/tests/test_contract.py +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/tests/test_databases.py +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/tests/test_health.py +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/tests/test_managed_client.py +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/tests/test_result.py +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/tests/test_update_changelog.py +0 -0
- {hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/tests/test_version.py +0 -0
|
@@ -8,6 +8,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
10
|
|
|
11
|
+
## [0.6.0] - 2026-06-30
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- `HotdataClient.add_managed_table(database, table, *, schema)` declares a new table on an existing managed database (wrapping the SDK `add_database_table` endpoint). This allows additive schema evolution without recreating the database.
|
|
16
|
+
|
|
11
17
|
## [0.5.0] - 2026-06-28
|
|
12
18
|
|
|
13
19
|
### Changed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hotdata-framework
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
4
4
|
Summary: Python framework for building Hotdata integrations: workspace/session runtime, query execution, and managed databases
|
|
5
5
|
Project-URL: Homepage, https://www.hotdata.dev
|
|
6
6
|
Project-URL: Documentation, https://www.hotdata.dev/docs
|
|
@@ -14,6 +14,7 @@ from hotdata.api.query_runs_api import QueryRunsApi
|
|
|
14
14
|
from hotdata.api.results_api import ResultsApi
|
|
15
15
|
from hotdata.api.uploads_api import UploadsApi
|
|
16
16
|
from hotdata.exceptions import ApiException
|
|
17
|
+
from hotdata.models.add_managed_table_request import AddManagedTableRequest
|
|
17
18
|
from hotdata.models.async_query_response import AsyncQueryResponse
|
|
18
19
|
from hotdata.models.create_database_request import CreateDatabaseRequest
|
|
19
20
|
from hotdata.models.database_default_schema_decl import DatabaseDefaultSchemaDecl
|
|
@@ -300,6 +301,33 @@ class HotdataClient:
|
|
|
300
301
|
full_name=f"{db.id}.{loaded.schema_name}.{loaded.table_name}",
|
|
301
302
|
)
|
|
302
303
|
|
|
304
|
+
def add_managed_table(
|
|
305
|
+
self,
|
|
306
|
+
database: str,
|
|
307
|
+
table: str,
|
|
308
|
+
*,
|
|
309
|
+
schema: str = DEFAULT_SCHEMA,
|
|
310
|
+
) -> ManagedTable:
|
|
311
|
+
"""Declare a new table on an existing managed database.
|
|
312
|
+
|
|
313
|
+
The table is added empty (declared-but-unloaded); populate it with
|
|
314
|
+
:meth:`load_managed_table`. Use this to evolve a managed database's
|
|
315
|
+
schema after creation without recreating it.
|
|
316
|
+
"""
|
|
317
|
+
db = self.resolve_managed_database(database)
|
|
318
|
+
request = AddManagedTableRequest(name=table)
|
|
319
|
+
try:
|
|
320
|
+
self._databases_api().add_database_table(db.id, schema, request)
|
|
321
|
+
except ApiException as e:
|
|
322
|
+
raise RuntimeError(api_error_message(e)) from e
|
|
323
|
+
return ManagedTable(
|
|
324
|
+
full_name=f"{db.id}.{schema}.{table}",
|
|
325
|
+
schema=schema,
|
|
326
|
+
table=table,
|
|
327
|
+
synced=False,
|
|
328
|
+
last_sync=None,
|
|
329
|
+
)
|
|
330
|
+
|
|
303
331
|
def delete_managed_table(
|
|
304
332
|
self,
|
|
305
333
|
database: str,
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "hotdata-framework"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.6.0"
|
|
8
8
|
description = "Python framework for building Hotdata integrations: workspace/session runtime, query execution, and managed databases"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -178,6 +178,35 @@ def test_columns_for_qualified_prefers_explicit_connection_id():
|
|
|
178
178
|
assert fake_api.kwargs["connection_id"] == "conn_explicit"
|
|
179
179
|
|
|
180
180
|
|
|
181
|
+
def test_add_managed_table_declares_table_on_existing_database():
|
|
182
|
+
client = HotdataClient("k", "ws", host="https://api.hotdata.dev")
|
|
183
|
+
fake_db = SimpleNamespace(id="db_1", default_connection_id="conn")
|
|
184
|
+
|
|
185
|
+
class FakeDatabasesApi:
|
|
186
|
+
def __init__(self):
|
|
187
|
+
self.calls: list[tuple[str, str, str]] = []
|
|
188
|
+
|
|
189
|
+
def add_database_table(self, database_id, var_schema, request):
|
|
190
|
+
self.calls.append((database_id, var_schema, request.name))
|
|
191
|
+
return SimpleNamespace(
|
|
192
|
+
connection_id="conn", var_schema=var_schema, table=request.name
|
|
193
|
+
)
|
|
194
|
+
|
|
195
|
+
fake_api = FakeDatabasesApi()
|
|
196
|
+
with (
|
|
197
|
+
patch.object(client, "resolve_managed_database", return_value=fake_db),
|
|
198
|
+
patch.object(client, "_databases_api", return_value=fake_api),
|
|
199
|
+
):
|
|
200
|
+
result = client.add_managed_table("mydb", "orders", schema="public")
|
|
201
|
+
|
|
202
|
+
assert fake_api.calls == [("db_1", "public", "orders")]
|
|
203
|
+
assert result.full_name == "db_1.public.orders"
|
|
204
|
+
assert result.schema == "public"
|
|
205
|
+
assert result.table == "orders"
|
|
206
|
+
assert result.synced is False
|
|
207
|
+
assert result.last_sync is None
|
|
208
|
+
|
|
209
|
+
|
|
181
210
|
def test_list_recent_results_returns_normalized_summaries():
|
|
182
211
|
client = HotdataClient("k", "ws", host="https://api.hotdata.dev")
|
|
183
212
|
listing = SimpleNamespace(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hotdata_framework-0.5.0 → hotdata_framework-0.6.0}/.github/workflows/dependabot-automerge.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|