Skip to content

Commit 7c8ac33

Browse files
authored
Merge pull request #108 from rapyuta-robotics/devel
🎉 release: v2.3.1
2 parents ae02697 + 8f8d563 commit 7c8ac33

File tree

7 files changed

+28
-17
lines changed

7 files changed

+28
-17
lines changed

.github/workflows/conventional-commits.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ on:
1010
jobs:
1111
verify:
1212
name: Conventional Commits
13-
runs-on: ubuntu-22.04
13+
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
1616
name: Checkout code
1717

1818
- uses: rapyuta-robotics/[email protected]
1919
name: Check if commit messages are compliant
2020
with:
21-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/gh-pages.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ on:
66

77
jobs:
88
deploy:
9-
runs-on: ubuntu-22.04
9+
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout Code
12-
uses: actions/checkout@v2
12+
uses: actions/checkout@v4
1313

1414
- name: Install Pipenv
1515
run: pip3 install pipenv

.github/workflows/pull-request.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ on: [ push ]
33

44
jobs:
55
checks:
6-
runs-on: ubuntu-20.04
6+
runs-on: ubuntu-latest
77
strategy:
88
matrix:
9-
python-version: [ '3.8', '3.9', '3.10' ]
9+
python-version: [ '3.8.12', '3.9', '3.10' ]
1010
steps:
1111
- name: Checkout Code
12-
uses: actions/checkout@v2
12+
uses: actions/checkout@v4
1313

1414
- name: Set up Python
15-
uses: actions/setup-python@v2
15+
uses: actions/setup-python@v5
1616
with:
1717
python-version: ${{ matrix.python-version }}
1818

.github/workflows/pypi.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ on:
66

77
jobs:
88
upload:
9-
runs-on: ubuntu-20.04
9+
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout Code
12-
uses: actions/checkout@v2
12+
uses: actions/checkout@v4
1313

1414
- name: Set up Python
15-
uses: actions/setup-python@v2
15+
uses: actions/setup-python@v5
1616
with:
1717
python-version: "3.10"
1818

.github/workflows/release.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ on:
66

77
jobs:
88
release:
9-
runs-on: ubuntu-20.04
9+
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout Code
12-
uses: actions/checkout@v2
12+
uses: actions/checkout@v4
1313
with:
1414
token: ${{ secrets.GH_TOKEN }}
1515

@@ -22,4 +22,3 @@ jobs:
2222
npx semantic-release
2323
env:
2424
GH_TOKEN: ${{ secrets.GH_TOKEN }}
25-

rapyuta_io/clients/paramserver.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import six
1616

1717
from rapyuta_io.utils import RestClient, InvalidParameterException, ConfigNotFoundException
18-
from rapyuta_io.utils.error import InvalidJSONError, InvalidYAMLError
18+
from rapyuta_io.utils.error import InvalidJSONError, InvalidYAMLError, UploadError
1919
from rapyuta_io.utils.rest_client import HttpMethod
2020
from rapyuta_io.utils.settings import PARAMSERVER_API_TREE_PATH, PARAMSERVER_API_TREEBLOBS_PATH, \
2121
PARAMSERVER_API_FILENODE_PATH
@@ -93,7 +93,11 @@ def create_binary_file(self, tree_path, file_path, retry_limit=0):
9393
headers.update({'Checksum': self.get_md5_checksum(f.read())})
9494
f.seek(0)
9595
response = RestClient(url).method(HttpMethod.PUT).headers(headers).execute(payload=f, raw=True)
96-
return response
96+
97+
try:
98+
return get_api_response_data(response, parse_full=True)
99+
except Exception as e:
100+
raise UploadError(file_path=file_path, msg=e)
97101

98102
def create_value(self, tree_path, retry_limit=0):
99103
url = self._core_api_host + PARAMSERVER_API_TREE_PATH + tree_path

rapyuta_io/utils/error.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,3 +186,11 @@ def __init__(self, file_path=None):
186186
msg += ": {}".format(file_path)
187187

188188
Exception.__init__(self, msg)
189+
190+
class UploadError(Exception):
191+
def __init__(self, msg, file_path):
192+
full = "Uploading file {} failed".format(file_path)
193+
if msg:
194+
full += ": {}".format(msg)
195+
196+
Exception.__init__(self, full)

0 commit comments

Comments
 (0)