Skip to content

Commit 750c2b4

Browse files
committed
fix: report package version in health endpoint
1 parent 08363a7 commit 750c2b4

3 files changed

Lines changed: 20 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 0.4.1 - 2026-05-10
4+
5+
### Fixes
6+
- Report the installed package version from the HyperView health endpoint instead of the stale hardcoded server version.
7+
38
## 0.4.0 - 2026-05-10
49

510
### Features

src/hyperview/server/app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from fastapi.staticfiles import StaticFiles
1414
from pydantic import BaseModel
1515

16+
from hyperview._version import __version__
1617
from hyperview.core.dataset import Dataset
1718
from hyperview.core.selection import (
1819
OrbitViewState3D,
@@ -255,7 +256,7 @@ def create_app(
255256
app = FastAPI(
256257
title="HyperView",
257258
description="Dataset visualization with hyperbolic embeddings",
258-
version="0.1.0",
259+
version=__version__,
259260
)
260261

261262
def get_runtime() -> HyperViewRuntime:

tests/test_runtime_control_api.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,19 @@ def test_runtime_control_api_supports_checkpoint_jobs_panels_and_ui_state(
367367
assert {"label-histogram", "notes"}.issubset(remaining_panel_ids)
368368

369369

370+
def test_health_reports_package_version() -> None:
371+
from hyperview import __version__
372+
373+
runtime = HyperViewRuntime()
374+
runtime.attach_dataset_instance("default", _make_dataset())
375+
client = TestClient(create_app(runtime=runtime))
376+
377+
response = client.get("/__hyperview__/health")
378+
379+
assert response.status_code == 200
380+
assert response.json()["version"] == __version__
381+
382+
370383
def test_sample_responses_include_media_url_and_content_endpoint_serves_file(tmp_path: Path) -> None:
371384
image_path = tmp_path / "sample.png"
372385
Image.new("RGB", (12, 12), color=(32, 128, 224)).save(image_path)

0 commit comments

Comments
 (0)