feat: server-side time-series downsampling + dashboard/API cleanup - #2
Merged
Conversation
Downsample large series on the server (pgstack downsample_tool_channel RPC) and transport only what the plot can show, driven from the dashboard zoom. - read path: DownsampleParams (sample/average/minmax, max_points, bin_size, edge_anchors) on the read/load params; PostgrestDatabaseDriver routes to the RPC with graceful fallback; LocalDatabaseDriver stride-decimates; per-channel method resolution, cache bypass, and "Load current range" zoom reload. - dashboard fixes: link plot x-ranges via one shared DataRange1d at figure creation; bridge the Reset event through a ColumnDataSource (on_event does not reach the server through Panel); fit the Wunderbaum tree to the sidebar. - auto_fetch respects the end picker (no longer pins end to now); the live view keeps its own now-window, so it is unaffected. - high-level bulk store (store_channel_data_bulk) + shared seed helper (_demo_data) used by demo/bench/tests; consolidate the screenshot helpers. - config models use plain pydantic BaseModel; re-export the param classes from the user-facing module so callers need not import the mixin. - consolidate read_tool_channel_raw into the concrete TSDCMixin (no v1/v2 override duplication). - add unit + gated integration tests, a benchmark, the downsampling demo, and regenerated screenshots/README.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Downsample large time series on the server (pgstack
downsample_tool_channelRPC) and transport only what the plot can show, driven from the dashboard zoom. Plus a set of dashboard and API cleanups.Downsampling
DownsampleParams(sample / average / minmax,max_points,bin_size,edge_anchors) on the read/load params.PostgrestDatabaseDriverroutes to the RPC with graceful fallback (missing RPC / older stack / SQLite all still work);LocalDatabaseDriverstride-decimates.Dashboard fixes
DataRange1dcreated at figure build (a deferred reassignment raced the render and left some plots unlinked).ColumnDataSource+CustomJS(figure.on_event(Reset)does not reach the server through Panel).API / cleanup
auto_fetchnow respects the end picker (no longer pins the end tonow); the live view keeps its own now-window and is unaffected.store_channel_data_bulk+ a shared seed helper (_demo_data) used by demo/bench/tests; consolidated the Playwright screenshot helpers intodocs/_screenshot_utils.py.BaseModel; the param classes are re-exported from the user-facing module so callers need not import the mixin.read_tool_channel_rawinto the concreteTSDCMixin(no v1/v2 override duplication).Tests / assets
Verified: offline suite (incl. new bulk-store + config round-trip), 8 integration tests against a live pgstack, and a demo smoke run.
Note: the
.contentscroll relies on opensemanticworld/panelini#37.