Skip to content

Commit

Permalink
removed min_units from TimeFieldInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
evalott100 committed Sep 24, 2024
1 parent aa2eb1a commit c3144b0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/pandablocks/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,13 +510,12 @@ def _enum(
def _time(
self, field_name: str, field_type: str, field_subtype: Optional[str]
) -> _FieldGeneratorType:
desc, units, min = yield from _execute_commands(
desc, units = yield from _execute_commands(
self._get_desc(field_name),
GetMultiline(f"*ENUMS.{self.block}.{field_name}.UNITS"),
GetLine(f"{self.block}1.{field_name}.MIN"),
)

field_info = TimeFieldInfo(field_type, field_subtype, desc, units, float(min))
field_info = TimeFieldInfo(field_type, field_subtype, desc, units)

return field_name, field_info

Expand Down
1 change: 0 additions & 1 deletion src/pandablocks/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ class TimeFieldInfo(FieldInfo):
"""Extended `FieldInfo` for fields with type "time"""

units_labels: list[str]
min_val: float


@dataclass
Expand Down
2 changes: 0 additions & 2 deletions tests/test_pandablocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,14 +752,12 @@ def idfn(val):
None,
[
("*ENUMS.TEST.TEST_FIELD.UNITS?", "!VAL1\n!VAL2\n."),
("TEST1.TEST_FIELD.MIN?", "OK =5e-8"),
("*DESC.TEST.TEST_FIELD?", "OK =Test Description"),
],
TimeFieldInfo(
"time",
None,
units_labels=["VAL1", "VAL2"],
min_val=5e-8,
description="Test Description",
),
),
Expand Down

0 comments on commit c3144b0

Please sign in to comment.