Skip to content

Backward compatibility with DataAPI if DataAPI on bec merged independently - #1273

Open
wyzula-jan wants to merge 1 commit into
mainfrom
fix/history-shape-warning
Open

wyzula-jan wants to merge 1 commit into
mainfrom
fix/history-shape-warning

Conversation

@wyzula-jan

Copy link
Copy Markdown
Contributor

Description

attribute access on stored_data_info in auto x shape-mismatch warning

@wyzula-jan wyzula-jan self-assigned this Aug 13, 2026
Copilot AI lite review requested due to automatic review settings August 13, 2026 12:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Improves the Waveform history-curve “auto” x-mode shape-mismatch handling to avoid crashes when stored_data_info entries are pydantic-style objects, and adds a regression test to ensure the curve is hidden on mismatch rather than erroring.

Changes:

  • Update history-curve auto x-mode shape-mismatch logic to use attribute-based shape access and simplify the warning message.
  • Add a unit test covering auto x-mode shape mismatch behavior using scan history data.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
bec_widgets/widgets/plots/waveform/waveform.py Adjusts shape-mismatch detection/logging for auto x-mode history curves to avoid failures when stored_data_info entries aren’t dict-like.
tests/unit_tests/test_waveform.py Adds a regression test asserting that a shape mismatch in auto x-mode hides the curve.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 8 to 14
import numpy as np
import pyqtgraph as pg
import pytest
from bec_lib.scan_history import ScanHistory
from pyqtgraph.graphicsItems.DateAxisItem import DateAxisItem
from qtpy.QtCore import QTimer
from qtpy.QtWidgets import QApplication, QCheckBox, QDialog, QDialogButtonBox, QDoubleSpinBox
@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

Copy link
Copy Markdown
Contributor

Benchmark comparison

Threshold: 20% (lower is better).
Result: 0 regression(s), 0 improvement(s) beyond threshold.

No benchmark regression exceeded the configured threshold.

No benchmark improvement exceeded the configured threshold.

All benchmark results
Benchmark Baseline Current Change Status
BEC IPython client with companion app 2.06701 s 2.10592 s +1.88% ok
BEC IPython client without companion app 2.08883 s 2.03384 s -2.63% ok
Import bec_widgets 0.01377 s 0.0137647 s -0.04% ok
tests/unit_tests/benchmarks/test_dock_area_benchmark.py::test_add_waveform_to_dock_area 0.156849 s 0.147772 s -5.79% ok

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.

2 participants