Skip to content

Commit

Permalink
Cleaned up after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
evalott100 committed Jan 29, 2024
1 parent 63e97dc commit 9831d07
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 85 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies = [
"click",
"h5py",
"softioc>=4.4.0",
"pandablocks>=0.5.3",
"pandablocks~=0.7.0",
"pvi~=0.7.0",
] # Add project dependencies here, e.g. ["click", "numpy"]
dynamic = ["version"]
Expand Down
12 changes: 6 additions & 6 deletions src/pandablocks_ioc/_pvi.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ def add_data_capture_pvi_info(
data_capture_pvi_record: RecordWrapper,
):
component = SignalRW(
data_capture_record_name,
data_capture_record_name,
widget=ButtonPanel(actions=dict(Start=1, Stop=0)),
name=epics_to_pvi_name(data_capture_record_name),
pv=data_capture_record_name,
widget=ButtonPanel(actions=dict(Start="1", Stop="0")),
read_widget=LED(),
)
add_pvi_info_to_record(data_capture_pvi_record, data_capture_record_name, "rw")
Expand All @@ -95,9 +95,9 @@ def add_data_capture_pvi_info(
def add_pcap_arm_pvi_info(group: PviGroup, pcap_arm_pvi_record: RecordWrapper):
pcap_arm_record_name = EpicsName("PCAP:ARM")
component = SignalRW(
pcap_arm_record_name,
pcap_arm_record_name,
widget=ButtonPanel(actions=dict(Arm=1, Disarm=0)),
name=epics_to_pvi_name(pcap_arm_record_name),
pv=pcap_arm_record_name,
widget=ButtonPanel(actions=dict(Arm="1", Disarm="0")),
read_widget=LED(),
)
add_pvi_info_to_record(pcap_arm_pvi_record, pcap_arm_record_name, "rw")
Expand Down
85 changes: 12 additions & 73 deletions tests/test-bobfiles/DATA.bob
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<transparent>true</transparent>
<widget type="label" version="2.0.0">
<name>Label</name>
<text>Filepath</text>
<text>Hdfdirectory</text>
<x>0</x>
<y>0</y>
<width>250</width>
Expand All @@ -52,7 +52,7 @@
</widget>
<widget type="label" version="2.0.0">
<name>Label</name>
<text>Filename</text>
<text>Hdffilename</text>
<x>0</x>
<y>25</y>
<width>250</width>
Expand All @@ -70,71 +70,12 @@
</widget>
<widget type="label" version="2.0.0">
<name>Label</name>
<text>Numcapture</text>
<text>Hdffullfilepath</text>
<x>0</x>
<y>50</y>
<width>250</width>
<height>20</height>
</widget>
<widget type="textentry" version="3.0.0">
<name>TextEntry</name>
<pv_name>TEST_PREFIX:HDF5:NumCapture</pv_name>
<x>255</x>
<y>50</y>
<width>125</width>
<height>20</height>
<horizontal_alignment>1</horizontal_alignment>
</widget>
<widget type="label" version="2.0.0">
<name>Label</name>
<text>Flushperiod</text>
<x>0</x>
<y>75</y>
<width>250</width>
<height>20</height>
</widget>
<widget type="textentry" version="3.0.0">
<name>TextEntry</name>
<pv_name>TEST_PREFIX:HDF5:FlushPeriod</pv_name>
<x>255</x>
<y>75</y>
<width>125</width>
<height>20</height>
<horizontal_alignment>1</horizontal_alignment>
</widget>
<widget type="label" version="2.0.0">
<name>Label</name>
<text>Capture</text>
<x>0</x>
<y>100</y>
<width>250</width>
<height>20</height>
</widget>
<widget type="textentry" version="3.0.0">
<name>TextEntry</name>
<pv_name>TEST_PREFIX:HDF5:Capture</pv_name>
<x>255</x>
<y>100</y>
<width>125</width>
<height>20</height>
<horizontal_alignment>1</horizontal_alignment>
</widget>
</widget>
<widget type="group" version="2.0.0">
<name>OUTPUTS</name>
<x>5</x>
<y>191</y>
<width>416</width>
<height>81</height>
<transparent>true</transparent>
<widget type="label" version="2.0.0">
<name>Label</name>
<text>Status</text>
<x>0</x>
<y>0</y>
<width>250</width>
<height>20</height>
</widget>
<widget type="textupdate" version="2.0.0">
<name>TextUpdate</name>
<pv_name>TEST_PREFIX:DATA:HDFFullFilePath</pv_name>
Expand All @@ -147,7 +88,6 @@
</font>
</font>
<horizontal_alignment>1</horizontal_alignment>
<format>6</format>
</widget>
</widget>
<widget type="group" version="2.0.0">
Expand All @@ -159,7 +99,7 @@
<transparent>true</transparent>
<widget type="label" version="2.0.0">
<name>Label</name>
<text>DATA: Num Capture</text>
<text>Numcapture</text>
<x>0</x>
<y>0</y>
<width>250</width>
Expand All @@ -176,7 +116,7 @@
</widget>
<widget type="label" version="2.0.0">
<name>Label</name>
<text>DATA: Num Captured</text>
<text>Numcaptured</text>
<x>0</x>
<y>25</y>
<width>250</width>
Expand All @@ -197,7 +137,7 @@
</widget>
<widget type="label" version="2.0.0">
<name>Label</name>
<text>DATA: Num Received</text>
<text>Numreceived</text>
<x>0</x>
<y>50</y>
<width>250</width>
Expand All @@ -218,7 +158,7 @@
</widget>
<widget type="label" version="2.0.0">
<name>Label</name>
<text>DATA: Flush Period</text>
<text>Flushperiod</text>
<x>0</x>
<y>75</y>
<width>250</width>
Expand All @@ -235,7 +175,7 @@
</widget>
<widget type="label" version="2.0.0">
<name>Label</name>
<text>DATA: Capture</text>
<text>Capture</text>
<x>0</x>
<y>100</y>
<width>250</width>
Expand Down Expand Up @@ -277,15 +217,15 @@
</widget>
<widget type="led" version="2.0.0">
<name>LED</name>
<pv_name>TEST_PREFIX:</pv_name>
<pv_name>TEST_PREFIX:DATA:Capture</pv_name>
<x>350</x>
<y>100</y>
<width>20</width>
<height>20</height>
</widget>
<widget type="label" version="2.0.0">
<name>Label</name>
<text>DATA: Capture Mode</text>
<text>Capturemode</text>
<x>0</x>
<y>125</y>
<width>250</width>
Expand All @@ -311,7 +251,7 @@
<name>OpenDisplay</name>
<actions>
<action type="open_display">
<file>PandA_POSITIONS_TABLE.bob</file>
<file>PandA_PositionsTable.bob</file>
<target>tab</target>
<description>Open Display</description>
</action>
Expand All @@ -333,7 +273,7 @@
<transparent>true</transparent>
<widget type="label" version="2.0.0">
<name>Label</name>
<text>DATA: Status</text>
<text>Status</text>
<x>0</x>
<y>0</y>
<width>250</width>
Expand All @@ -351,7 +291,6 @@
</font>
</font>
<horizontal_alignment>1</horizontal_alignment>
<format>6</format>
</widget>
</widget>
</display>
4 changes: 2 additions & 2 deletions tests/test-bobfiles/index.bob
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</widget>
<widget type="label" version="2.0.0">
<name>Label</name>
<text>HDF5</text>
<text>DATA</text>
<x>23</x>
<y>55</y>
<width>250</width>
Expand All @@ -66,7 +66,7 @@
<description>Open Display</description>
</action>
</actions>
<text>HDF5</text>
<text>DATA</text>
<x>278</x>
<y>55</y>
<width>125</width>
Expand Down
6 changes: 3 additions & 3 deletions tests/test_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,9 @@ async def test_table_updater_update_mode_submit_exception_data_error(
assert isinstance(table_updater.client.send, AsyncMock)
table_updater.client.send.side_effect = Exception("Mocked exception")

table_updater.all_values_dict[
EpicsName(EPICS_FORMAT_TABLE_NAME)
] = InErrorException("Mocked in error exception")
table_updater.all_values_dict[EpicsName(EPICS_FORMAT_TABLE_NAME)] = (
InErrorException("Mocked in error exception")
)

await table_updater.update_mode(TableModeEnum.SUBMIT.value)

Expand Down

0 comments on commit 9831d07

Please sign in to comment.