Skip to content

Commit b34203a

Browse files
author
Eddie A Tejeda
committed
Rename package to hotdata_runtime; uv lock; version metadata and tests.
1 parent 06b0b72 commit b34203a

12 files changed

Lines changed: 747 additions & 47 deletions

File tree

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1-
# hotdata-core-notebook
1+
# hotdata-runtime
22

3-
Shared **Hotdata** client and domain types for notebook UIs (Marimo, Jupyter, etc.). UI frameworks depend on this package; they do not belong here.
3+
Shared runtime primitives for Hotdata integrations: workspace/session semantics, execution context, query state, run history, and replayable result handles. Framework packages (Marimo, Jupyter, Streamlit, LangGraph) depend on this package.
44

55
Install:
66

77
```bash
8-
pip install hotdata-core-notebook
8+
uv pip install hotdata-runtime
9+
# or: pip install hotdata-runtime
910
```
1011

11-
Development:
12+
Development (uses **uv**; creates `.venv/` in this repo):
1213

1314
```bash
14-
pip install -e ".[dev]"
15-
pytest
15+
uv sync --locked
16+
uv run pytest
1617
```
18+
19+
`uv.lock` is checked in so CI can run `uv sync --locked`. The default **dev** group (pytest) is enabled via `[tool.uv] default-groups`.

hotdata_core_notebook/__init__.py

Lines changed: 0 additions & 28 deletions
This file was deleted.

hotdata_runtime/__init__.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
"""Hotdata runtime primitives for notebook and app integrations."""
2+
3+
from importlib.metadata import PackageNotFoundError, version
4+
5+
from hotdata_runtime.client import HotdataClient, from_env
6+
from hotdata_runtime.health import workspace_health_lines
7+
from hotdata_runtime.env import (
8+
default_api_key,
9+
default_host,
10+
default_session_id,
11+
explicit_workspace_id,
12+
list_workspaces,
13+
normalize_host,
14+
pick_workspace,
15+
)
16+
from hotdata_runtime.result import QueryResult
17+
18+
try:
19+
__version__ = version("hotdata-runtime")
20+
except PackageNotFoundError:
21+
__version__ = "0.0.0+unknown"
22+
23+
__all__ = [
24+
"__version__",
25+
"HotdataClient",
26+
"QueryResult",
27+
"workspace_health_lines",
28+
"default_api_key",
29+
"default_host",
30+
"default_session_id",
31+
"explicit_workspace_id",
32+
"from_env",
33+
"list_workspaces",
34+
"normalize_host",
35+
"pick_workspace",
36+
]
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
from hotdata.models.query_response import QueryResponse
1616
from hotdata.models.table_info import TableInfo
1717

18-
from hotdata_core_notebook.env import (
18+
from hotdata_runtime.env import (
1919
default_api_key,
2020
default_host,
2121
default_session_id,
2222
normalize_host,
2323
pick_workspace,
2424
)
25-
from hotdata_core_notebook.result import QueryResult
25+
from hotdata_runtime.result import QueryResult
2626

2727
_TERMINAL = frozenset({"succeeded", "failed", "cancelled"})
2828

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from hotdata.exceptions import ApiException
44

5-
from hotdata_core_notebook.client import HotdataClient
5+
from hotdata_runtime.client import HotdataClient
66

77

88
def workspace_health_lines(client: HotdataClient) -> tuple[bool, list[str]]:

pyproject.toml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ requires = ["hatchling"]
33
build-backend = "hatchling.build"
44

55
[project]
6-
name = "hotdata-core-notebook"
6+
name = "hotdata-runtime"
77
version = "0.1.0"
8-
description = "Hotdata API client and shared models for notebook integrations"
8+
description = "Workspace/session runtime primitives for Hotdata integrations"
99
readme = "README.md"
1010
requires-python = ">=3.10"
1111
license = { text = "MIT" }
@@ -14,13 +14,16 @@ dependencies = [
1414
"pandas>=2.0",
1515
]
1616

17-
[project.optional-dependencies]
17+
[dependency-groups]
1818
dev = [
1919
"pytest>=8.0",
2020
]
2121

22+
[tool.uv]
23+
default-groups = ["dev"]
24+
2225
[tool.hatch.build.targets.wheel]
23-
packages = ["hotdata_core_notebook"]
26+
packages = ["hotdata_runtime"]
2427

2528
[tool.pytest.ini_options]
2629
testpaths = ["tests"]

tests/test_client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
import pytest
88

9-
from hotdata_core_notebook.env import normalize_host, pick_workspace
10-
from hotdata_core_notebook.client import HotdataClient
9+
from hotdata_runtime.env import normalize_host, pick_workspace
10+
from hotdata_runtime.client import HotdataClient
1111

1212

1313
@pytest.mark.parametrize(
@@ -47,7 +47,7 @@ def test_pick_workspace_chooses_first_active(monkeypatch: pytest.MonkeyPatch):
4747
]
4848
listing = SimpleNamespace(workspaces=items)
4949

50-
with patch("hotdata_core_notebook.env.WorkspacesApi") as Api:
50+
with patch("hotdata_runtime.env.WorkspacesApi") as Api:
5151
Api.return_value.list_workspaces.return_value = listing
5252
assert pick_workspace("k", "https://api.hotdata.dev", None) == "ws_2"
5353

@@ -62,7 +62,7 @@ def test_pick_workspace_falls_back_to_first(monkeypatch: pytest.MonkeyPatch):
6262
]
6363
listing = SimpleNamespace(workspaces=items)
6464

65-
with patch("hotdata_core_notebook.env.WorkspacesApi") as Api:
65+
with patch("hotdata_runtime.env.WorkspacesApi") as Api:
6666
Api.return_value.list_workspaces.return_value = listing
6767
assert pick_workspace("k", "https://api.hotdata.dev", None) == "ws_1"
6868

tests/test_health.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
from hotdata.exceptions import ApiException
66

7-
from hotdata_core_notebook.client import HotdataClient
8-
from hotdata_core_notebook.health import workspace_health_lines
7+
from hotdata_runtime.client import HotdataClient
8+
from hotdata_runtime.health import workspace_health_lines
99

1010

1111
def test_workspace_health_ok():

0 commit comments

Comments
 (0)