Skip to content

feat: managed database widgets for Marimo#5

Merged
eddietejeda merged 8 commits into
masterfrom
feat/managed-databases-marimo
May 19, 2026
Merged

feat: managed database widgets for Marimo#5
eddietejeda merged 8 commits into
masterfrom
feat/managed-databases-marimo

Conversation

@eddietejeda
Copy link
Copy Markdown
Contributor

@eddietejeda eddietejeda commented May 19, 2026

Summary

  • Add databases_panel and ManagedDatabaseWriter for creating managed databases and loading parquet tables from a Marimo notebook
  • Wire a Databases tab into examples/demo.py and export mo.ui.hotdata_* aliases
  • Simplify README with usage examples, supported widgets table, and SQL screenshot
  • Add unit tests for list/create/load flows (61 tests passing)

Dependencies

  • hotdata-runtime>=0.1.1 (published on PyPI)
  • Transitive hotdata>=0.2.0

Test plan

  • uv sync --locked (no sibling checkouts required)
  • uv run pytest (61 passed)
  • Run examples/demo.py with HOTDATA_API_KEY set and exercise the Databases tab

Add databases_panel and ManagedDatabaseWriter so notebooks can create
Hotdata-owned catalogs and load parquet tables, with demo tab wiring
and tests. Depends on hotdata-runtime feat/managed-databases until that
lands on main and PyPI.
Replace git branch dependency with a PyPI version constraint aligned with
the runtime release that adds managed database helpers.
Comment thread uv.lock Outdated
version = "0.1.0"
source = { registry = "https://pypi.org/simple" }
version = "0.1.1"
source = { editable = "../sdk-python" }
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking. The lockfile pins the hotdata (SDK) package to editable = "../sdk-python" (also at line 226), but that path is not declared anywhere in this repo's pyproject.toml [tool.uv.sources] (only hotdata-runtime = "../hotdata-runtime" is). This appears to have leaked in from hotdata-runtime's own local tool.uv.sources when the lockfile was regenerated against an editable runtime.

Anyone running uv sync from a fresh checkout that doesn't happen to also have ../sdk-python (a separate, undocumented repo) checked out will fail — including CI. Please regenerate the lockfile in an environment that resolves hotdata from PyPI, or document the required sibling checkouts in the README/CONTRIBUTING.

Comment thread pyproject.toml
license = { text = "MIT" }
dependencies = [
"hotdata-runtime @ git+https://github.com/hotdata-dev/hotdata-runtime.git",
"hotdata-runtime>=0.1.1",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking. This now declares hotdata-runtime>=0.1.1 as a regular dependency, but per the PR description the runtime PR (hotdata-runtime#4) has not merged and 0.1.1 is not on PyPI yet. The PR description says "This PR pins hotdata-runtime to @feat/managed-databases until that merges" — but the diff shows the git pin was already removed.

As-is, pip install hotdata-marimo will fail until runtime is published. Either:

  • restore the hotdata-runtime @ git+https://...@feat/managed-databases pin (and the corresponding [tool.hatch.metadata] allow-direct-references = true) until runtime is published, OR
  • hold this PR until hotdata-runtime 0.1.1 is on PyPI and update the PR description.

Comment thread tests/test_databases_marimo.py Outdated
schema="public",
tables=["orders", "customers"],
)
assert "Created" in str(panel) or panel is not None
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: (not blocking) assert "Created" in str(panel) or panel is not None is effectively a tautology — the right side is true whenever result_panel returns anything, which it always does on the success path. Since mo.callout/mo.md aren't patched in this test, you can drop the or clause (just assert "Created" in str(panel)) so the assertion actually verifies the success-branch rendered.

options={db.name: db.name for db in dbs},
label="Database",
full_width=True,
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: (not blocking) On a successful create, _rebuild_database_pick() replaces self.database with a fresh mo.ui.dropdown whose .value defaults to the first option. If the user had already picked a different database earlier in the session, that selection is silently dropped. Consider preserving the previously selected value when rebuilding (e.g., pass value=current_value if it's still in the new options).

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

Blocking Issues

  • uv.lock (line 173, 226): the hotdata SDK package is locked to editable = "../sdk-python", an undocumented sibling checkout. uv sync will fail for anyone (including CI) without that path.
  • pyproject.toml (line 13): hotdata-runtime>=0.1.1 is not yet on PyPI, and the PR description says the git pin should still be in place until hotdata-runtime#4 merges. As-is, installs will fail.

Action Required

  • Either restore the git+https://...@feat/managed-databases pin for hotdata-runtime (with [tool.hatch.metadata] allow-direct-references = true) until runtime is published, or hold this PR until hotdata-runtime 0.1.1 is on PyPI.
  • Regenerate uv.lock in an environment that resolves hotdata from PyPI so the ../sdk-python editable source is removed.

Keep hotdata-runtime>=0.1.1, add explicit hotdata>=0.2.0, and regenerate uv.lock
with hotdata from PyPI after merging publish.yml from master.
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

Status update from cycle 1:

  • ✅ Resolved: lockfile no longer leaks the hotdata editable pin from ../sdk-pythonhotdata 0.2.0 now resolves from PyPI.
  • ⛔ Still blocking: hotdata-runtime>=0.1.1 is declared as a regular dep but 0.1.1 is not yet on PyPI (pyproject.toml comment and the unchecked "Merge hotdata-runtime #4 first" item in the test plan both acknowledge this). pip install hotdata-marimo will fail until runtime publishes. This is the "hold this PR" option from the prior review — fine, but it means this PR must not merge until hotdata-runtime 0.1.1 is live on PyPI (and ideally the lockfile re-locked off PyPI rather than the editable sibling).

No new blocking findings beyond the carried-over Issue 2. Prior nits (test tautology, dropdown selection reset on rebuild) are not re-raised.

claude[bot]
claude Bot previously approved these changes May 19, 2026
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All prior blocking issues from cycle 2 are resolved: uv.lock now resolves hotdata from PyPI (no more ../sdk-python editable pin), and the runtime-not-on-PyPI concern is handled by the explicit "merge hotdata-runtime #4 first" gate in the PR description plus the documented [tool.uv.sources] fallback for local dev.

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.
@eddietejeda eddietejeda merged commit af43b9f into master May 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant