CP-2184 add bumpversion (#8)

This commit is contained in:
Bruno Marques 2024-05-31 18:55:10 +01:00 committed by GitHub
parent ad2ff796aa
commit 4025dc7126
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 21 additions and 3 deletions

6
.bumpversion.cfg Normal file
View File

@ -0,0 +1,6 @@
[bumpversion]
current_version = 1.0.0
commit = False
tag = False
[bumpversion:glob:*/src/thousandeyes_sdk/client/version.py]

View File

@ -1,6 +1,6 @@
[project]
name = "thousandeyes-sdk-client"
version = "1.0.0"
dynamic = ["version"]
authors = [
{ name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" }
]
@ -13,6 +13,9 @@ dependencies = [
"typing-extensions >=4.7.1",
]
[tool.setuptools.dynamic]
version = {attr = "thousandeyes_sdk.client.__version__"}
[project.optional-dependencies]
test = [
"pytest~=7.1.3",

View File

@ -2,3 +2,8 @@ from . import exceptions
from .api_client import ApiClient
from .api_response import ApiResponse
from .configuration import Configuration
from .version import Version
import os.path
__version__ = Version.get()

View File

@ -67,8 +67,6 @@ class ApiClient:
if header_name is not None:
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'ThousandEyesSDK-Python/1.0.0'
self.client_side_validation = configuration.client_side_validation
def __enter__(self):

View File

@ -0,0 +1,6 @@
import os.path
class Version:
@staticmethod
def get() -> str:
return "1.0.0"