Backward compatibility with DataAPI if DataAPI on bec merged independently - #1273
wyzula-jan wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
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.
| 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 Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Benchmark comparisonThreshold: 20% (lower is better). No benchmark regression exceeded the configured threshold. No benchmark improvement exceeded the configured threshold. All benchmark results
|
Description
attribute access on stored_data_info in auto x shape-mismatch warning