Skip to content

Commit 7be5c51

Browse files
chore: update google denpendence (#3234)
Co-authored-by: Wendong-Fan <w3ndong.fan@gmail.com>
1 parent e627cfb commit 7be5c51

File tree

6 files changed

+163
-124
lines changed

6 files changed

+163
-124
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ body:
2626
attributes:
2727
label: What version of camel are you using?
2828
description: Run command `python3 -c 'print(__import__("camel").__version__)'` in your shell and paste the output here.
29-
placeholder: E.g., 0.2.76a9
29+
placeholder: E.g., 0.2.76a10
3030
validations:
3131
required: true
3232

camel/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from camel.logger import disable_logging, enable_logging, set_log_level
1616

17-
__version__ = '0.2.76a9'
17+
__version__ = '0.2.76a10'
1818

1919
__all__ = [
2020
'__version__',

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
project = 'CAMEL'
2828
copyright = '2024, CAMEL-AI.org'
2929
author = 'CAMEL-AI.org'
30-
release = '0.2.76a9'
30+
release = '0.2.76a10'
3131

3232
html_favicon = (
3333
'https://raw.githubusercontent.com/camel-ai/camel/master/misc/favicon.png'

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "camel-ai"
7-
version = "0.2.76a9"
7+
version = "0.2.76a10"
88
description = "Communicative Agents for AI Society Study"
99
authors = [{ name = "CAMEL-AI.org" }]
1010
requires-python = ">=3.10,<3.13"
@@ -300,6 +300,8 @@ eigent = [
300300
"onnxruntime<=1.19.2",
301301
"slack-sdk>=3.27.2,<4",
302302
"google-api-python-client==2.166.0",
303+
"google-auth-httplib2==0.2.0",
304+
"google-auth-oauthlib==1.2.1",
303305
]
304306
all = [
305307
"numpy>=1.2,<=2.2",

test/storages/vector_storages/test_oceanbase.py

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,19 @@ def mock_ob_client():
107107

108108

109109
def test_oceanbase_storage_initialization(mock_ob_client):
110+
# Create a mock factory that returns a new mock IndexParams with iterator
111+
# each time
112+
def create_mock_index_params():
113+
mock_index_param = MagicMock()
114+
mock_index_params = MagicMock()
115+
mock_index_params.__iter__.return_value = iter([mock_index_param])
116+
return mock_index_params
117+
110118
with patch('pyobvector.schema.VECTOR'):
111-
with patch('pyobvector.client.index_param.IndexParams'):
119+
with patch(
120+
'pyobvector.client.index_param.IndexParams',
121+
side_effect=create_mock_index_params,
122+
):
112123
with patch('pyobvector.client.index_param.IndexParam'):
113124
# Test initialization with default parameters
114125
storage = OceanBaseStorage(
@@ -141,8 +152,19 @@ def test_oceanbase_storage_initialization(mock_ob_client):
141152

142153

143154
def test_oceanbase_storage_operations(mock_ob_client):
155+
# Create a mock factory that returns a new mock IndexParams with iterator
156+
# each time
157+
def create_mock_index_params():
158+
mock_index_param = MagicMock()
159+
mock_index_params = MagicMock()
160+
mock_index_params.__iter__.return_value = iter([mock_index_param])
161+
return mock_index_params
162+
144163
with patch('pyobvector.schema.VECTOR'):
145-
with patch('pyobvector.client.index_param.IndexParams'):
164+
with patch(
165+
'pyobvector.client.index_param.IndexParams',
166+
side_effect=create_mock_index_params,
167+
):
146168
with patch('pyobvector.client.index_param.IndexParam'):
147169
with patch('sqlalchemy.func'):
148170
# Setup mock for query results
@@ -187,9 +209,20 @@ def test_oceanbase_storage_operations(mock_ob_client):
187209

188210

189211
def test_distance_to_similarity_conversion():
212+
# Create a mock factory that returns a new mock IndexParams with iterator
213+
# each time
214+
def create_mock_index_params():
215+
mock_index_param = MagicMock()
216+
mock_index_params = MagicMock()
217+
mock_index_params.__iter__.return_value = iter([mock_index_param])
218+
return mock_index_params
219+
190220
with patch('pyobvector.client.ObVecClient'):
191221
with patch('pyobvector.schema.VECTOR'):
192-
with patch('pyobvector.client.index_param.IndexParams'):
222+
with patch(
223+
'pyobvector.client.index_param.IndexParams',
224+
side_effect=create_mock_index_params,
225+
):
193226
with patch('pyobvector.client.index_param.IndexParam'):
194227
# Test cosine distance conversion
195228
cosine_storage = OceanBaseStorage(

0 commit comments

Comments
 (0)