Skip to content

Commit

Permalink
Merge pull request #30 from fireblocks/fireblocks-api-spec/generated/…
Browse files Browse the repository at this point in the history
…2648

Generated SDK #2648
  • Loading branch information
asafs932 authored Jun 6, 2024
2 parents 41379bb + 7b8239c commit fc6fa95
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 11 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/create-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Create Pull Request

on:
push:
branches:
- 'fireblocks-api-spec/generated/*'

jobs:
create-pull-request:
runs-on: ubuntu-latest

steps:
- name: Check out repository code
uses: actions/checkout@v4

- name: Create pull request
run: |
gh pr create \
--title "${{ github.event.commits[0].message }}" \
--body "This PR was automatically generated." \
--base master \
--head ${{ github.ref }} \
--reviewer asafs932,zoharsf,YoavBZ
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion fireblocks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
""" # noqa: E501


__version__ = "1.0.2"
__version__ = "1.0.3"

# import apis into sdk package
from fireblocks.api.api_user_api import ApiUserApi
Expand Down
2 changes: 1 addition & 1 deletion fireblocks/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def __init__(
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = "OpenAPI-Generator/1.0.2/python"
self.user_agent = "OpenAPI-Generator/1.0.3/python"
self.client_side_validation = configuration.client_side_validation

def __enter__(self):
Expand Down
2 changes: 1 addition & 1 deletion fireblocks/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ def to_debug_report(self):
"OS: {env}\n"
"Python Version: {pyversion}\n"
"Version of the API: 1.6.2\n"
"SDK Package Version: 1.0.2".format(env=sys.platform, pyversion=sys.version)
"SDK Package Version: 1.0.3".format(env=sys.platform, pyversion=sys.version)
)

def get_host_settings(self):
Expand Down
2 changes: 1 addition & 1 deletion fireblocks/user_agent_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
class UserAgentUtil:
@staticmethod
def get_user_agent(is_anonymous_platform: bool, custom_user_agent: str) -> str:
user_agent = "fireblocks/sdk/python/1.0.2"
user_agent = "fireblocks/sdk/python/1.0.3"
if not is_anonymous_platform:
os_type = platform.system()
os_version = platform.release()
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 = "fireblocks"
version = "1.0.2"
version = "1.0.3"
description = "Fireblocks API"
authors = ["Fireblocks <[email protected]>"]
license = "MIT License"
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools
NAME = "fireblocks"
VERSION = "1.0.2"
VERSION = "1.0.3"
PYTHON_REQUIRES = ">=3.8"
REQUIRES = [
"urllib3 >= 1.25.3, < 2.1.0",
Expand All @@ -42,7 +42,7 @@
description="Fireblocks API",
author="Fireblocks",
author_email="[email protected]",
url="https://pypi.org/project/fireblocks",
url="https://github.com/fireblocks/py-sdk/tree/master",
keywords=["Fireblocks", "SDK", "Fireblocks API"],
python_requires=PYTHON_REQUIRES,
install_requires=REQUIRES,
Expand Down
8 changes: 4 additions & 4 deletions test/fireblocks/test_user_agent_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ def mock_platform(mocker):
mocker.patch('platform.machine', return_value="x86_64")

@pytest.mark.parametrize("is_anonymous_platform, user_agent, expected", [
(False, "customUserAgent", "customUserAgent fireblocks/sdk/python/1.0.2 (Linux 5.4.0-42-generic; x86_64)"),
(True, "customUserAgent", "customUserAgent fireblocks/sdk/python/1.0.2"),
(False, None, "fireblocks/sdk/python/1.0.2 (Linux 5.4.0-42-generic; x86_64)"),
(True, None, "fireblocks/sdk/python/1.0.2")])
(False, "customUserAgent", "customUserAgent fireblocks/sdk/python/1.0.3 (Linux 5.4.0-42-generic; x86_64)"),
(True, "customUserAgent", "customUserAgent fireblocks/sdk/python/1.0.3"),
(False, None, "fireblocks/sdk/python/1.0.3 (Linux 5.4.0-42-generic; x86_64)"),
(True, None, "fireblocks/sdk/python/1.0.3")])
def test_get_user_agent(mock_platform, is_anonymous_platform, user_agent, expected):
# Create an instance of UserAgentUtil
util = UserAgentUtil()
Expand Down

0 comments on commit fc6fa95

Please sign in to comment.