Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions .github/workflows/release-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,17 @@ jobs:
- name: Clean Format Test
run: make clean better_imports format test

- name: Current version
id: current_version
shell: bash
run: |
echo "current_version=$(poetry version)" >> $GITHUB_OUTPUT

- name: Bump Version
id: bump_version
shell: bash
run: |
if [[ $(poetry version) == *"rc"* ]]; then
if [ ${{ contains(steps.current_version.outputs.current_version, 'rc') }} ]; then
poetry version prerelease
else
poetry version "$(poetry version ${{ inputs.version }} -s --dry-run)"rc1
Expand All @@ -80,15 +86,18 @@ jobs:
if: |
steps.release_exists.outputs.id != ''

- name: Add + Commit + Open PR
uses: peter-evans/create-pull-request@v5
- name: Add + Commit
uses: EndBug/add-and-commit@v9
with:
new_branch: rc-${{ env.SDK_VERSION }}
message: Bump version to ${{ env.SDK_RC_VERSION }}

- name: Open PR
uses: repo-sync/pull-request@v2
with:
commit-message: Bump version to ${{ env.SDK_RC_VERSION }}
branch: rc-${{ env.SDK_VERSION }}
delete-branch: false
base: main
title: rc-${{ env.SDK_VERSION }}
body: This is an auto-generated PR to merge the rc branch back into main upon successful release.
destination_branch: "main"
pr_title: rc-${{ env.SDK_VERSION }}
pr_body: This is an auto-generated PR to merge the rc branch back into main upon successful release.

build:
needs: prepare
Expand Down
28 changes: 16 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
prepare:
if: github.repository_owner == 'viamrobotics' && startsWith(github.ref, 'rc-')
if: github.repository_owner == 'viamrobotics' && startsWith(github.ref_name, 'rc-')
runs-on: [self-hosted, x64]
container:
image: ghcr.io/viamrobotics/canon:amd64
Expand Down Expand Up @@ -39,8 +39,9 @@ jobs:

- name: Bump Version
id: bump_version
shell: bash
run: |
poetry version ${$(poetry version -s)%rc*}
poetry version $(poetry version -s | sed -e 's/\"//g' -e 's/rc.*//g')
echo "SDK_VERSION=$(poetry version -s)" >> $GITHUB_ENV
echo "version=$(poetry version -s)" >> $GITHUB_OUTPUT

Expand All @@ -58,19 +59,22 @@ jobs:
if: |
steps.release_exists.outputs.id != ''

- name: Add + Commit + Open PR
uses: peter-evans/create-pull-request@v5
- name: Add + Commit
uses: EndBug/add-and-commit@v9
with:
commit-message: Bump version to ${{ env.SDK_VERSION }}
branch: rc-${{ env.SDK_VERSION }}
delete-branch: true
base: main
title: rc-${{ env.SDK_VERSION }}
body: This is an auto-generated PR to merge the rc branch back into main upon successful release.
new_branch: rc-${{ env.SDK_VERSION }}
message: Bump version to ${{ env.SDK_VERSION }}

- name: Open PR
uses: repo-sync/pull-request@v2
with:
destination_branch: "main"
pr_title: rc-${{ env.SDK_VERSION }}
pr_body: This is an auto-generated PR to merge the rc branch back into main upon successful release.

build:
needs: prepare
if: github.repository_owner == 'viamrobotics' && startsWith(github.ref, 'rc-')
if: github.repository_owner == 'viamrobotics' && startsWith(github.ref_name, 'rc-')
runs-on: [self-hosted, x64]
container:
image: ghcr.io/viamrobotics/canon:amd64
Expand Down Expand Up @@ -121,7 +125,7 @@ jobs:

release:
needs: [prepare, build]
if: github.repository_owner == 'viamrobotics' && startsWith(github.ref, 'rc-')
if: github.repository_owner == 'viamrobotics' && startsWith(github.ref_name, 'rc-')
runs-on: [self-hosted, x64]
container:
image: ghcr.io/viamrobotics/canon:amd64
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "viam-sdk"
version = "0.3.0"
version = "0.3.1"
description = "Viam Robotics Python SDK"
authors = [ "Naveed <naveed@viam.com>" ]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/viam/module/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
from inspect import iscoroutinefunction
from threading import Lock
from typing import List, Mapping, Optional, Sequence, Tuple
from typing_extensions import Self

from grpclib.utils import _service_name
from typing_extensions import Self

from viam import logging
from viam.components.component_base import ComponentBase
Expand Down