From 9831d071711f86a1ec9a96c00c6d34a06e5d3df0 Mon Sep 17 00:00:00 2001 From: Eva Lott Date: Tue, 23 Jan 2024 09:40:12 +0000 Subject: [PATCH] Cleaned up after rebase --- pyproject.toml | 2 +- src/pandablocks_ioc/_pvi.py | 12 ++--- tests/test-bobfiles/DATA.bob | 85 +++++------------------------------ tests/test-bobfiles/index.bob | 4 +- tests/test_tables.py | 6 +-- 5 files changed, 24 insertions(+), 85 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 576799c3..c44d9067 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"] diff --git a/src/pandablocks_ioc/_pvi.py b/src/pandablocks_ioc/_pvi.py index 109fcb38..7ddf8bab 100644 --- a/src/pandablocks_ioc/_pvi.py +++ b/src/pandablocks_ioc/_pvi.py @@ -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") @@ -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") diff --git a/tests/test-bobfiles/DATA.bob b/tests/test-bobfiles/DATA.bob index 505e927c..1cabfce4 100644 --- a/tests/test-bobfiles/DATA.bob +++ b/tests/test-bobfiles/DATA.bob @@ -34,7 +34,7 @@ true Label - Filepath + Hdfdirectory 0 0 250 @@ -52,7 +52,7 @@ Label - Filename + Hdffilename 0 25 250 @@ -70,71 +70,12 @@ Label - Numcapture + Hdffullfilepath 0 50 250 20 - - TextEntry - TEST_PREFIX:HDF5:NumCapture - 255 - 50 - 125 - 20 - 1 - - - Label - Flushperiod - 0 - 75 - 250 - 20 - - - TextEntry - TEST_PREFIX:HDF5:FlushPeriod - 255 - 75 - 125 - 20 - 1 - - - Label - Capture - 0 - 100 - 250 - 20 - - - TextEntry - TEST_PREFIX:HDF5:Capture - 255 - 100 - 125 - 20 - 1 - - - - OUTPUTS - 5 - 191 - 416 - 81 - true - - Label - Status - 0 - 0 - 250 - 20 - TextUpdate TEST_PREFIX:DATA:HDFFullFilePath @@ -147,7 +88,6 @@ 1 - 6 @@ -159,7 +99,7 @@ true Label - DATA: Num Capture + Numcapture 0 0 250 @@ -176,7 +116,7 @@ Label - DATA: Num Captured + Numcaptured 0 25 250 @@ -197,7 +137,7 @@ Label - DATA: Num Received + Numreceived 0 50 250 @@ -218,7 +158,7 @@ Label - DATA: Flush Period + Flushperiod 0 75 250 @@ -235,7 +175,7 @@ Label - DATA: Capture + Capture 0 100 250 @@ -277,7 +217,7 @@ LED - TEST_PREFIX: + TEST_PREFIX:DATA:Capture 350 100 20 @@ -285,7 +225,7 @@ Label - DATA: Capture Mode + Capturemode 0 125 250 @@ -311,7 +251,7 @@ OpenDisplay - PandA_POSITIONS_TABLE.bob + PandA_PositionsTable.bob tab Open Display @@ -333,7 +273,7 @@ true Label - DATA: Status + Status 0 0 250 @@ -351,7 +291,6 @@ 1 - 6 diff --git a/tests/test-bobfiles/index.bob b/tests/test-bobfiles/index.bob index 8fe3ed31..7f9a10ae 100644 --- a/tests/test-bobfiles/index.bob +++ b/tests/test-bobfiles/index.bob @@ -51,7 +51,7 @@ Label - HDF5 + DATA 23 55 250 @@ -66,7 +66,7 @@ Open Display - HDF5 + DATA 278 55 125 diff --git a/tests/test_tables.py b/tests/test_tables.py index adf105c7..b1fac61f 100644 --- a/tests/test_tables.py +++ b/tests/test_tables.py @@ -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)