Skip to content

Commit 81ec76d

Browse files
renovate-botaverikitschvishwarajanand
authored
chore(deps): update python-nonmajor (#231)
* chore(deps): update python-nonmajor * fix tests --------- Co-authored-by: Averi Kitsch <akitsch@google.com> Co-authored-by: Vishwaraj Anand <vishwaraj.anand00@gmail.com> Co-authored-by: Vishwaraj Anand <vishwarajanand@google.com>
1 parent ef63226 commit 81ec76d

File tree

7 files changed

+15
-11
lines changed

7 files changed

+15
-11
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ Changelog = "https://github.com/googleapis/langchain-google-cloud-sql-pg-python/
4141
test = [
4242
"black[jupyter]==25.1.0",
4343
"isort==6.0.0",
44-
"mypy==1.11.2",
44+
"mypy==1.13.0",
4545
"pytest-asyncio==0.24.0",
46-
"pytest==8.3.3",
46+
"pytest==8.3.4",
4747
"pytest-cov==6.0.0"
4848
]
4949

requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
cloud-sql-python-connector[asyncpg]==1.12.1
2-
langchain-core==0.3.8
1+
cloud-sql-python-connector[asyncpg]==1.14.0
2+
langchain-core==0.3.22
33
numpy==1.26.4
4-
pgvector==0.3.4
5-
SQLAlchemy[asyncio]==2.0.35
4+
pgvector==0.3.6
5+
SQLAlchemy[asyncio]==2.0.36
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
langchain-community==0.3.16
2-
langchain-google-cloud-sql-pg==0.10.0
2+
langchain-google-cloud-sql-pg==0.11.1
33
langchain-google-vertexai==2.0.12
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
google-cloud-aiplatform[reasoningengine,langchain]==1.79.0
22
google-cloud-resource-manager==1.14.0
33
langchain-community==0.3.16
4-
langchain-google-cloud-sql-pg==0.10.0
4+
langchain-google-cloud-sql-pg==0.11.1
55
langchain-google-vertexai==2.0.12

samples/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
google-cloud-aiplatform[reasoningengine,langchain]==1.79.0
22
google-cloud-resource-manager==1.14.0
33
langchain-community==0.3.16
4-
langchain-google-cloud-sql-pg==0.10.0
4+
langchain-google-cloud-sql-pg==0.11.1
55
langchain-google-vertexai==2.0.12

tests/test_async_vectorstore_search.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,9 @@ async def test_similarity_search_with_relevance_scores_threshold_cosine(self, vs
156156
results = await vs.asimilarity_search_with_relevance_scores(
157157
"foo", **score_threshold
158158
)
159-
assert len(results) == 4
159+
# Note: Since tests use FakeEmbeddings which are non-normalized vectors, results might have scores beyond the range [0,1].
160+
# For a normalized embedding service, a threshold of zero will yield all matched documents.
161+
assert len(results) == 2
160162

161163
score_threshold = {"score_threshold": 0.02}
162164
results = await vs.asimilarity_search_with_relevance_scores(

tests/test_vectorstore_search.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ async def test_similarity_search_with_relevance_scores_threshold_cosine(self, vs
170170
results = await vs.asimilarity_search_with_relevance_scores(
171171
"foo", **score_threshold
172172
)
173-
assert len(results) == 4
173+
# Note: Since tests use FakeEmbeddings which are non-normalized vectors, results might have scores beyond the range [0,1].
174+
# For a normalized embedding service, a threshold of zero will yield all matched documents.
175+
assert len(results) == 2
174176

175177
score_threshold = {"score_threshold": 0.02}
176178
results = await vs.asimilarity_search_with_relevance_scores(

0 commit comments

Comments
 (0)