Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split up mixedWidgets #98

Open
evalott100 opened this issue Feb 20, 2024 · 1 comment
Open

Split up mixedWidgets #98

evalott100 opened this issue Feb 20, 2024 · 1 comment

Comments

@evalott100
Copy link
Contributor

evalott100 commented Feb 20, 2024

@GDYendell

Currently all the file formatters use the same

class WidgetFormatterFactory(BaseModel, Generic[T]):
    header_formatter_cls: Type[LabelWidgetFormatter[T]]
    label_formatter_cls: Type[LabelWidgetFormatter[T]]
    led_formatter_cls: Type[PVWidgetFormatter[T]]
    progress_bar_formatter_cls: Type[PVWidgetFormatter[T]]
    text_read_formatter_cls: Type[PVWidgetFormatter[T]]
    check_box_formatter_cls: Type[PVWidgetFormatter[T]]
    combo_box_formatter_cls: Type[PVWidgetFormatter[T]]
    text_write_formatter_cls: Type[PVWidgetFormatter[T]]
    table_formatter_cls: Type[PVWidgetFormatter[T]]
    action_formatter_cls: Type[ActionWidgetFormatter[T]]
    sub_screen_formatter_cls: Type[SubScreenWidgetFormatter[T]]
    bitfield_formatter_cls: Type[PVWidgetFormatter[T]]
    array_trace_formatter_cls: Type[PVWidgetFormatter[T]]
    button_panel_formatter_cls: Type[PVWidgetFormatter[T]]
    image_read_formatter_cls: Type[PVWidgetFormatter[T]]

despite the fact that they don't all support the same widgets.

This has been circumvented so far by changing the specific <widget>_formatter_cls to make a label instead if that <widget> isn't supported. We should instead fail.

In 76862ea , we added new widgets to the mixedWidgets test.
All of the different file fomatters use the same mixedWidgets to test, so part of this issue will be giving each different file formatter its own mixedWidgets with only the supported widgets, rather than all three using the same yaml.

@GDYendell
Copy link
Member

Actually I meant split into a test for each individual widget, which will enable only testing the widgets that each formatter supports and also make it easier to see differences in the bob files when things break.

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

No branches or pull requests

2 participants