Skip to content

Commit

Permalink
Remove logic to shorten compressed_size path attribute names
Browse files Browse the repository at this point in the history
  • Loading branch information
jsouter committed Sep 17, 2024
1 parent fdbc041 commit a9cb407
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions src/odin_fastcs/odin_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,7 @@ def _process_parameters(self):
class FrameProcessorDatasetController(OdinAdapterController):
def _process_parameters(self):
for parameter in self._parameters:
short_path = parameter.uri[3:]
if short_path[0] == "compressed_size":
short_path[0] = "compressed" # slightly shorter PV names
parameter.set_path(short_path)
parameter.set_path(parameter.uri[3:])


def get_all_sub_controllers(
Expand Down
4 changes: 2 additions & 2 deletions tests/test_controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ async def test_fp_create_plugin_sub_controllers():
),
OdinParameter(
uri=["status", "hdf", "dataset", "compressed_size", "compression"],
_path=["hdf", "dataset", "whatever"],
_path=["hdf", "dataset", "compressed_size", "compression"],
metadata={"type": "str"},
),
]
Expand Down Expand Up @@ -115,7 +115,7 @@ async def test_fp_create_plugin_sub_controllers():
assert sub_controllers["DS"]._parameters == [
OdinParameter(
uri=["status", "hdf", "dataset", "compressed_size", "compression"],
_path=["compressed", "compression"],
_path=["compressed_size", "compression"],
metadata={"type": "str"},
)
]
Expand Down

0 comments on commit a9cb407

Please sign in to comment.