Unify cumulative/current outputs behind user-facing views (#932)#935
Draft
SimonHeybrock wants to merge 1 commit into
Draft
Unify cumulative/current outputs behind user-facing views (#932)#935SimonHeybrock wants to merge 1 commit into
SimonHeybrock wants to merge 1 commit into
Conversation
Replace the `(cumulative)` / `(current)` output split with a single view per quantity. The cumulative-vs-update choice now lives in the window-mode plot parameter as a new `since_start` mode, which drives which backend stream the plot subscribes to. Plot titles and axis labels drop the qualifier; window state is shown alongside in the toolbar. `OutputView` bundles one user-facing title with the backend pydantic fields that back it for each `StreamRole` (`since_start`, `per_update`). Outputs without a declared `output_views` ClassVar fall back to one view per field, so reduction-style outputs (LOKI, Estia, Bifrost, Dummy) need no annotation. `DataSourceConfig` carries `view_name` (was `output_name`); the orchestrator resolves view + window mode to the backing field at subscribe time. The wire-format `ResultKey.output_name` and pydantic field names are unchanged. Grid templates and `PlotConfig` serialisation use `view_name`; layers persisted in the legacy `output_name` schema are skipped with a warning so users reconfigure them rather than silently render broken data.
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
Closes #932.
(cumulative)/(current)output split with one user-facing view per quantity.since_startmode; the mode now drives which backend stream the plot subscribes to.Design
OutputView(inworkflow_spec.py) binds one user-facing title to 1..N pydantic field names, keyed byStreamRole(since_start,per_update). Outputs classes declare views via anoutput_viewsClassVar; classes that don't declare any get one view per field via fallback. Reduction outputs (LOKI, Estia, Bifrost, Dummy) need no annotation.WindowMode.since_startadded. Mode availability per view:since_startrequires the corresponding stream role;latest/windowrequireper_update. For cumulative-only views the window widget collapses.DataSourceConfig.output_name→view_name.PlotOrchestratorresolves(view_name, window_mode) → backend_fieldat subscribe time. The wire-formatResultKey.output_nameand all pydantic field names are unchanged.Migration
output_nameschema log a warning and are skipped; users reconfigure those plots.Test plan
pytest tests/(3324 passed locally)(cumulative)/(current)qualifiersince_start/latest/windowproduces the correct dataI(Q)) show no window widget