Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content

Bec figure

wyzula_j requested to merge bec-figure into master

Description

Provide matplotlib-like enviroment to add subplots (sub widgets) to figure.

Related Issues

closes #87 (closed), #86 (closed), #85 (closed), #75 (closed), #21 (closed), #32 (closed)

Type of Change

  • NEW BECConnector → mixin class for creating connection with client and getting shortcuts for bec services, can be inherited by other widgets. Provides also basic config with widget_class and gui_id.
  • NEW BECFigure → container for BECPlotBase widgets
  • NEW BECPlotBase → base class for plotting widgets
  • NEW BECWaveform1D → replacement of BECMonitor, serves to plot 1D scan_segment data
  • NEW CLI → CLI client/server for RPC access thought terminal

Potential side effects

None

Screenshots / GIFs (if applicable)

[Include any relevant screenshots or GIFs to showcase the changes made.]

Additional Comments

How to test:

1) Terminal with CLI

This version has limited API defined by USER_ACCESS of the widget class. To test in terminal start ipython, then you can import CLI version of BECFigure:

from bec_widgets.cli.client import BECFigure

# Create instance of BECFigure with gui_id 'test'
fig = BECFigure('test')

# Popup figure
fig.show()

# Add Waveform widget
w1 = fig.add_plot()

# Add curve to w1 which will tack scan_segment
w1.add_curve_scan('samx','bpm4i',validate_bec=True) # this will ATM trigger ValueError: Unknown type, however functionality is not affected

2) Debug jupyter console UI

For accessing the whole API, including references from inherited object you can run:

python -m bec_widgets.widgets.figure.figure

Definition of Done

  • [ ] Documentation is up-to-date. → will be done later #93 (closed)
  • Unit Tests - widgets
  • [ ] Unit Tests - RPC → postponed, there is some bug with testing RPC with BECDispatcher not connecting signals for scan_segment #94 (closed)
  • [ ] Figure reconstruction by configs → not priority ATM #95 (closed)
  • Fix RPC access to BECCurve items.
Edited by wyzula_j

Merge request reports

Loading