Repository navigation
refactor(python): type google adk class swaps - #1505
Conversation
- type swap method sets as `Methods[Cls]` so each replacement takes its class as `self` - split root swaps into node and agent builders Signed-off-by: Greyson Lalonde <[email protected]>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
| :--- | :--- |
Typed method mapping contract python/nemo_relay/integrations/google_adk/_swap.py |
Method mappings and builder callbacks now use instance-aware callable types. |
Typed method factories python/nemo_relay/integrations/google_adk/_backends/*, python/nemo_relay/integrations/google_adk/_models.py, python/nemo_relay/integrations/google_adk/_nodes.py, python/nemo_relay/integrations/google_adk/_tools.py |
Backend, model, node, and tool method factories now declare their corresponding Methods return types. |
Root method selection python/nemo_relay/integrations/google_adk/_root.py |
Root observation selects agent-specific or non-agent method sets. The agent method set combines the base root methods with a wrapped run_async method. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Refactor
Possibly related PRs
- NVIDIA/NeMo-Relay#1498: Updates repository type annotations, which this PR continues in the Google ADK integration.
Merge Risk: 
Minimal · up to 24768
-
The change is limited to typing and preserves the existing Google ADK wrapper behavior, so it is mergeable with normal checks.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Description check
-
Explanation
The description explains the objective, implementation details, expected behavior, review starting points, and both overview confirmations. It omits the template's Related Issues section, but the description is otherwise complete and relevant.
-
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
…-swap-typing Signed-off-by: Greyson Lalonde <[email protected]>
Overview
This change improves type checking for the Google ADK integration. It helps the type checker match each wrapped method to the correct Google ADK class.
No user-facing behavior changes are expected.
Details
Where should the reviewer start?
Start in
python/nemo_relay/integrations/google_adk/_swap.pywith theMethodsand_Buildertype aliases.Next, review
observe_root,_root_methods, and_agent_root_methodsinpython/nemo_relay/integrations/google_adk/_root.py.Summary by CodeRabbit