diff --git a/examples/server/v1/components.py b/examples/server/v1/components.py index decc913c1..a406769e4 100644 --- a/examples/server/v1/components.py +++ b/examples/server/v1/components.py @@ -332,9 +332,6 @@ async def status(self, extra: Optional[Dict[str, Any]] = None, **kwargs) -> Boar digital_interrupts={name: DigitalInterruptStatus(value=await di.value()) for (name, di) in self.digital_interrupts.items()}, ) - async def model_attributes(self) -> Board.Attributes: - return Board.Attributes(remote=True) - async def set_power_mode(self, **kwargs): raise NotImplementedError() diff --git a/src/viam/components/board/board.py b/src/viam/components/board/board.py index 3edf5e510..10da2774e 100644 --- a/src/viam/components/board/board.py +++ b/src/viam/components/board/board.py @@ -242,16 +242,6 @@ async def status(self, *, extra: Optional[Dict[str, Any]] = None, timeout: Optio """ ... - @abc.abstractmethod - async def model_attributes(self) -> Attributes: - """ - Get the attributes related to the model of this board. - - Returns: - Attributes: The attributes. - """ - ... - @abc.abstractmethod async def set_power_mode( self, mode: PowerMode.ValueType, duration: Optional[timedelta] = None, *, timeout: Optional[float] = None, **kwargs diff --git a/src/viam/components/board/client.py b/src/viam/components/board/client.py index 71b997111..a7f1dc5d9 100644 --- a/src/viam/components/board/client.py +++ b/src/viam/components/board/client.py @@ -156,9 +156,6 @@ async def status(self, *, extra: Optional[Dict[str, Any]] = None, timeout: Optio response: StatusResponse = await self.client.Status(request, timeout=timeout) return response.status - async def model_attributes(self) -> Board.Attributes: - return Board.Attributes(remote=True) - async def do_command(self, command: Mapping[str, ValueTypes], *, timeout: Optional[float] = None) -> Mapping[str, ValueTypes]: request = DoCommandRequest(name=self.name, command=dict_to_struct(command)) response: DoCommandResponse = await self.client.DoCommand(request, timeout=timeout) diff --git a/tests/mocks/components.py b/tests/mocks/components.py index b972ae4e9..29a908e57 100644 --- a/tests/mocks/components.py +++ b/tests/mocks/components.py @@ -370,9 +370,6 @@ async def status(self, *, extra: Optional[Dict[str, Any]] = None, timeout: Optio digital_interrupts={name: DigitalInterruptStatus(value=await di.value()) for (name, di) in self.digital_interrupts.items()}, ) - async def model_attributes(self) -> Board.Attributes: - return Board.Attributes(remote=True) - async def get_geometries(self, *, extra: Optional[Dict[str, Any]] = None, timeout: Optional[float] = None) -> List[Geometry]: self.extra = extra self.timeout = timeout diff --git a/tests/test_board.py b/tests/test_board.py index db618ae83..0c4ebe7d7 100644 --- a/tests/test_board.py +++ b/tests/test_board.py @@ -6,7 +6,7 @@ from grpclib import GRPCError from grpclib.testing import ChannelFor -from viam.components.board import Board, BoardClient +from viam.components.board import BoardClient from viam.components.board.service import BoardRPCService from viam.components.generic.service import GenericRPCService from viam.errors import ResourceNotFoundError @@ -121,11 +121,6 @@ async def test_status(self, board: MockBoard): assert board.extra == extra assert board.timeout == loose_approx(1.82) - @pytest.mark.asyncio - async def test_model_attributes(self, board: MockBoard): - attrs = await board.model_attributes() - assert attrs == Board.Attributes(remote=True) - @pytest.mark.asyncio async def test_do(self, board: MockBoard): command = {"command": "args"} @@ -415,14 +410,6 @@ async def test_status(self, board: MockBoard, service: BoardRPCService): assert board.extra == extra assert board.timeout == loose_approx(1.1) - @pytest.mark.asyncio - async def test_model_attributes(self, board: MockBoard, service: BoardRPCService): - async with ChannelFor([service]) as channel: - client = BoardClient(name=board.name, channel=channel) - - attrs = await client.model_attributes() - assert attrs == Board.Attributes(remote=True) - @pytest.mark.asyncio async def test_do(self, board: MockBoard, service: BoardRPCService): async with ChannelFor([service]) as channel: