Skip to content

Commit 954177f

Browse files
committed
chore: re-lock for hotdata-runtime 0.1.1 on PyPI
Remove the editable sibling runtime override now that 0.1.1 is published, preserve database dropdown selection after create, and tighten the create success test assertion.
1 parent 4c5f3b2 commit 954177f

4 files changed

Lines changed: 18 additions & 20 deletions

File tree

hotdata_marimo/databases.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,17 +119,21 @@ def __init__(
119119
)
120120

121121
def _rebuild_database_pick(self) -> None:
122+
current = getattr(getattr(self, "database", None), "value", None)
122123
dbs = self._client.list_managed_databases()
123124
if not dbs:
124125
self.database = empty_dropdown(
125126
label="Database",
126127
message="(create one first)",
127128
)
128129
return
130+
options = {db.name: db.name for db in dbs}
131+
value = current if current in options else next(iter(options))
129132
self.database = mo.ui.dropdown(
130-
options={db.name: db.name for db in dbs},
133+
options=options,
131134
label="Database",
132135
full_width=True,
136+
value=value,
133137
)
134138

135139
def _maybe_create(self) -> None:

pyproject.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ dev = [
2323
[tool.uv]
2424
default-groups = ["dev"]
2525

26-
# Resolve hotdata-runtime from a sibling checkout until v0.1.1 is on PyPI.
27-
[tool.uv.sources]
28-
hotdata-runtime = { path = "../hotdata-runtime", editable = true }
29-
3026
[tool.hatch.build.targets.wheel]
3127
packages = ["hotdata_marimo"]
3228

tests/test_databases_marimo.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,16 @@ def test_managed_database_writer_creates_database(mock_client):
5656
"hotdata_marimo.databases.mo.ui.text_area", return_value=tables
5757
), patch(
5858
"hotdata_marimo.databases.empty_dropdown", return_value=database
59+
), patch(
60+
"hotdata_marimo.databases.mo.ui.dropdown", return_value=database
5961
), patch(
6062
"hotdata_marimo.databases.mo.ui.file", return_value=file
6163
), patch(
6264
"hotdata_marimo.databases.databases_panel", return_value="list"
65+
), patch(
66+
"hotdata_marimo.databases.mo.md", side_effect=lambda x: x
67+
), patch(
68+
"hotdata_marimo.databases.mo.callout", side_effect=lambda body, **kw: body
6369
):
6470
writer = ManagedDatabaseWriter(mock_client)
6571
panel = writer.result_panel
@@ -69,7 +75,7 @@ def test_managed_database_writer_creates_database(mock_client):
6975
schema="public",
7076
tables=["orders", "customers"],
7177
)
72-
assert "Created" in str(panel) or panel is not None
78+
assert "Created" in str(panel)
7379

7480

7581
def test_managed_database_writer_loads_parquet(mock_client):

uv.lock

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

0 commit comments

Comments
 (0)