1
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2026-03-09 18:27:52 +01:00

refactor(plot/Waveform1D,plot/BECCurve): BECCurve inherits from BECConnector and can refer to parent_id (Waveform1D) and has its own gui_id

This commit is contained in:
wyzula-jan
2024-02-21 14:26:46 +01:00
parent 402adc44e8
commit 99dce077c4
10 changed files with 511 additions and 207 deletions

View File

@@ -3,7 +3,6 @@ import typing
class ClientGenerator:
def __init__(self):
self.header = """# This file was automatically generated by generate_cli.py\n
from bec_widgets.cli.client_utils import rpc_call, RPCBase, BECFigureClientMixin
@@ -75,10 +74,14 @@ class {class_name}(RPCBase):"""
if __name__ == "__main__":
import os
from bec_widgets.widgets.figure import BECFigure
from bec_widgets.widgets.plots import BECWaveform1D
from bec_widgets.widgets.plots import BECWaveform1D, BECPlotBase # ,BECCurve
from bec_widgets.widgets.plots.waveform1d import BECCurve
clss = [BECWaveform1D, BECFigure]
current_path = os.path.dirname(__file__)
client_path = os.path.join(current_path, "client.py")
clss = [BECPlotBase, BECWaveform1D, BECFigure, BECCurve]
generator = ClientGenerator()
generator.generate_client(clss)
generator.write("bec_widgets/cli/client.py")
generator.write(client_path)