Skip to content

Commit

Permalink
preparing packages for release
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkahan committed Feb 15, 2024
1 parent 3f6d7bb commit 7736da0
Show file tree
Hide file tree
Showing 17 changed files with 73 additions and 22 deletions.
2 changes: 1 addition & 1 deletion http_client/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ files(sources=['tests/data/*'])

python_distribution(
name='vonage-http-client',
dependencies=[':pyproject', 'http_client/src/http_client'],
dependencies=[':pyproject', 'http_client/src/http_client', 'utils/src/utils'],
provides=python_artifact(),
generate_setup=False,
repositories=['https://test.pypi.org/legacy/'],
Expand Down
26 changes: 24 additions & 2 deletions http_client/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,30 @@
[project]
name = 'vonage-http-client'
description = 'An asynchronous HTTP client for making requests to Vonage APIs.'
version = '0.1.0'
dependencies = ['vonage-jwt', 'requests']
description = 'An HTTP client for making requests to Vonage APIs.'
readme = "README.md"
authors = [{ name = "Vonage", email = "devrel@vonage.com" }]
requires-python = ">=3.8"
dependencies = [
"vonage-utils>=0.1.0",
"vonage-jwt>=1.1.0",
"requests==2.*",
"pydantic>=2.6.1",
"typing_extensions>=4.9.0",
]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: Apache Software License",
]

[project.urls]
homepage = "https://github.com/Vonage/vonage-python-sdk"

[build-system]
requires = ["setuptools>=61.0", "wheel"]
Expand Down
2 changes: 1 addition & 1 deletion http_client/src/http_client/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from requests.sessions import Session
from typing_extensions import Annotated

logger = getLogger('vonage-http-client-v2')
logger = getLogger('vonage')


class HttpClientOptions(BaseModel):
Expand Down
2 changes: 1 addition & 1 deletion http_client/tests/BUILD
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python_tests(dependencies=['http_client', 'utils'])
python_tests(dependencies=['http_client'])
6 changes: 5 additions & 1 deletion number_insight_v2/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ files(sources=['tests/data/*'])

python_distribution(
name='vonage-number-insight-v2',
dependencies=[':pyproject', 'number_insight_v2/src/number_insight_v2', 'utils'],
dependencies=[
':pyproject',
'number_insight_v2/src/number_insight_v2',
'utils/src/utils',
],
provides=python_artifact(),
generate_setup=False,
repositories=['https://test.pypi.org/legacy/'],
Expand Down
15 changes: 10 additions & 5 deletions number_insight_v2/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
[project]
name = 'vonage-number-insight-v2'
description = 'Vonage Number Insight v2 package'
version = '0.1.0'
description = 'Vonage Number Insight v2 package'
readme = "README.md"
authors = [{ name = "Vonage", email = "devrel@vonage.com" }]
license = "Apache"
homepage = "https://github.com/Vonage/vonage-python-sdk"
requires-python = ">=3.8"
dependencies = [
"vonage-http-client>=0.1.0",
"vonage-utils>=0.1.0",
"pydantic>=2.6.1",
]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
Expand All @@ -14,10 +18,11 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: Apache Software License",
]

[project.python-requires]
python_version = ">=3.8"
[project.urls]
homepage = "https://github.com/Vonage/vonage-python-sdk"

[build-system]
requires = ["setuptools>=61.0", "wheel"]
Expand Down
2 changes: 1 addition & 1 deletion number_insight_v2/src/number_insight_v2/errors.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from errors import VonageError
from utils.errors import VonageError


class NumberInsightV2Error(VonageError):
Expand Down
2 changes: 1 addition & 1 deletion number_insight_v2/tests/test_number_insight_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
NumberInsightV2,
)
from testing_utils import build_response
from utils import remove_none_values
from utils.utils import remove_none_values

path = abspath(__file__)

Expand Down
1 change: 1 addition & 0 deletions pants.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ filter = [
'vonage/src',
'http_client/src',
'number_insight_v2/src',
'utils/src',
'testing_utils',
]

Expand Down
2 changes: 1 addition & 1 deletion testing_utils/BUILD
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python_sources()
python_sources(name='testing_utils')
2 changes: 1 addition & 1 deletion utils/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ resource(name='pyproject', source='pyproject.toml')

python_distribution(
name='vonage-utils',
dependencies=[':pyproject'],
dependencies=[':pyproject', 'utils/src/utils'],
provides=python_artifact(),
generate_setup=False,
repositories=['https://test.pypi.org/legacy/'],
Expand Down
1 change: 0 additions & 1 deletion utils/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ classifiers = [

[project.urls]
homepage = "https://github.com/Vonage/vonage-python-sdk"
documentation = "https://developer.vonage.com"

[build-system]
requires = ["setuptools>=61.0", "wheel"]
Expand Down
2 changes: 1 addition & 1 deletion utils/src/utils/BUILD
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python_sources()
python_sources(name='utils')
2 changes: 1 addition & 1 deletion utils/src/utils/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from re import search
from typing import Union

from errors import InvalidPhoneNumberError, InvalidPhoneNumberTypeError
from utils.errors import InvalidPhoneNumberError, InvalidPhoneNumberTypeError


def format_phone_number(number: Union[str, int]) -> str:
Expand Down
2 changes: 1 addition & 1 deletion utils/tests/BUILD
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python_tests(dependencies=['utils'])
python_tests(dependencies=['utils/src/utils'])
4 changes: 2 additions & 2 deletions utils/tests/test_format_phone_number.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from errors import InvalidPhoneNumberError, InvalidPhoneNumberTypeError
from pytest import raises
from utils.errors import InvalidPhoneNumberError, InvalidPhoneNumberTypeError

from utils import format_phone_number
from utils.utils import format_phone_number


def test_format_phone_numbers():
Expand Down
22 changes: 21 additions & 1 deletion vonage/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,28 @@
[project]
name = 'vonage'
description = 'Python Server SDK for using Vonage APIs'
version = '4.0.1a0'
description = 'Python Server SDK for using Vonage APIs'
readme = "README.md"
authors = [{ name = "Vonage", email = "devrel@vonage.com" }]
requires-python = ">=3.8"
dependencies = [
"vonage-utils>=0.1.0",
"vonage-http-client>=0.1.0",
"vonage-number-insight-v2>=0.1.0",
]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: Apache Software License",
]

[project.urls]
homepage = "https://github.com/Vonage/vonage-python-sdk"

[build-system]
requires = ["setuptools>=61.0", "wheel"]
Expand Down

0 comments on commit 7736da0

Please sign in to comment.