From b5ba049703fec00728ae421aece925441eb04090 Mon Sep 17 00:00:00 2001 From: Naomi Pentrel <5212232+npentrel@users.noreply.github.com> Date: Fri, 2 Aug 2024 17:29:53 +0200 Subject: [PATCH] Update get_status signature (#698) Co-authored-by: Naveed Jooma --- .github/workflows/license_finder.yml | 17 +++++++++++++---- src/viam/robot/client.py | 8 +++----- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/license_finder.yml b/.github/workflows/license_finder.yml index 3ee9fae7e..70b7d936b 100644 --- a/.github/workflows/license_finder.yml +++ b/.github/workflows/license_finder.yml @@ -8,18 +8,27 @@ on: jobs: license_finder: - if: github.repository_owner == 'viamrobotics' + # if: github.repository_owner == 'viamrobotics' name: Audit 3rd-Party Licenses runs-on: ubuntu-latest - container: - image: ghcr.io/viamrobotics/canon:amd64-cache timeout-minutes: 30 steps: - uses: actions/checkout@v4 - name: Install Poetry - uses: snok/install-poetry@v1 + run: pipx install poetry + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.3" + + - run: gem install license_finder - name: Install package run: poetry install --all-extras diff --git a/src/viam/robot/client.py b/src/viam/robot/client.py index 8a14322e8..1b03d7a1a 100644 --- a/src/viam/robot/client.py +++ b/src/viam/robot/client.py @@ -35,11 +35,9 @@ ResourceNamesResponse, RobotServiceStub, ShutdownRequest, - StopAllRequest, - StopExtraParameters, - TransformPoseRequest, - TransformPoseResponse, ) +from viam.proto.robot import Status as PBStatus +from viam.proto.robot import StopAllRequest, StopExtraParameters, TransformPoseRequest, TransformPoseResponse from viam.resource.base import ResourceBase from viam.resource.manager import ResourceManager from viam.resource.registry import Registry @@ -599,7 +597,7 @@ async def __aexit__(self, exc_type, exc_value, traceback): ########## # STATUS # ########## - async def get_status(self, components: Optional[List[ResourceName]] = None): + async def get_status(self, components: Optional[List[ResourceName]] = None) -> List[PBStatus]: """ Get the status of the machine's components. You can optionally provide a list of ``ResourceName``s for which you want statuses.