Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@ classifiers = [ # List of https://pypi.org/classifiers/
]
dependencies = [
# go/keep-sorted start
"google-genai>=1.21.1, <2.0.0", # Google GenAI SDK
"google-adk", # Google ADK
"httpx>=0.27.0, <1.0.0", # For OpenMemory service
"redis>=5.0.0, <6.0.0", # Redis for session storage
# go/keep-sorted end
"google-genai>=1.21.1, <2.0.0", # Google GenAI SDK
"orjson>=3.11.3",
# go/keep-sorted end
]
dynamic = ["version"]

Expand All @@ -41,9 +39,23 @@ changelog = "https://github.com/google/adk-python-community/blob/main/CHANGELOG.
documentation = "https://google.github.io/adk-docs/"

[project.optional-dependencies]
firestore = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

While adding google-cloud-firestore as an optional dependency is a good step, please ensure that the corresponding utility that uses it handles the ImportError gracefully if the dependency is not installed. This is to prevent runtime errors for users who do not install the [firestore] extra. Based on other files in this library, it's likely this check is missing.

"google-cloud-firestore", # Firestore client library
]
redis = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

Making redis an optional dependency is the correct approach, but it introduces a runtime issue. The module src/google/adk_community/sessions/redis_session_service.py imports redis.asyncio at the top level without handling its potential absence. This will cause an ImportError for users who install the package without the [redis] extra. The code needs to be updated to handle this, for example by wrapping the import in a try...except ImportError block and raising a clear error if the RedisSessionService is used without redis being installed.

"redis>=5.0.0, <6.0.0", # Redis for session storage
]
openmemory = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

Making httpx an optional dependency is a good change. However, the module that uses it, src/google/adk_community/memory/open_memory_service.py, imports httpx unconditionally at the top level. This will cause an ImportError for users who install the package without the [openmemory] extra. The code should be updated to handle the case where httpx is not installed, for example by using a try...except ImportError block and raising an informative error if OpenMemoryService is instantiated without httpx being available.

"httpx>=0.27.0, <1.0.0", # For OpenMemory service
]
all = [
"google-cloud-firestore", # Firestore client library
"httpx>=0.27.0, <1.0.0", # For OpenMemory service
"redis>=5.0.0, <6.0.0", # Redis for session storage
]
test = [
"pytest>=8.4.2",
"pytest-asyncio>=1.2.0",
"pytest>=8.4.2",
"pytest-asyncio>=1.2.0",
]


Expand Down