PandABlocks / PandABlocks-ioc

Create an IOC from a PandA
Apache License 2.0
1 stars 5 forks source link

Support for ':' (colon) characters in PV prefix #91

Closed dmgav closed 9 months ago

dmgav commented 9 months ago

This PR adds support for PV prefixes with contain ':' (colon) characters, such as PANDA:ES. The existing code failed to properly handle such PVs, since the _RecordUpdater class was separating PV name into prefix and record name by splitting the PV name using ':' as a separator. Changes proposed in this PR, replace splitting-based method by explicit removal of the known prefix from the PV name. The record_prefix is added as an attribute of the _RecordUpdater class.

The changes are not expected to modify the behavior of the IOC. Unit tests are modified to reflect changes in the code.

dmgav commented 9 months ago

The failing test is test_bobfiles_created. The failure is not related to changes in this PR, since the test was failing before any changes were made. The new set of files can be generated if necessary.

evalott100 commented 9 months ago

The failing test is test_bobfiles_created. The failure is not related to changes in this PR, since the test was failing before any changes were made. The new set of files can be generated if necessary.

This is fixed in https://github.com/PandABlocks/PandABlocks-ioc/pull/92

codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (03f55bf) 90.01% compared to head (236d252) 90.02%. Report is 2 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #91 +/- ## ======================================= Coverage 90.01% 90.02% ======================================= Files 7 7 Lines 1202 1203 +1 Branches 191 191 ======================================= + Hits 1082 1083 +1 Misses 82 82 Partials 38 38 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.