Skip to content

Commit 61c329f

Browse files
wuliang229copybara-github
authored andcommitted
ci: match the environment with internal ones for pyink/isort/unittest
Previously submitted change is causing [Pyink error](https://github.com/google/adk-python/actions/runs/21884351396/job/63176122118) in repo because Pyink recently updated to 25.12.0. Co-authored-by: Liang Wu <wuliang@google.com> PiperOrigin-RevId: 868806575
1 parent 758d337 commit 61c329f

File tree

55 files changed

+147
-54
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+147
-54
lines changed

.github/workflows/isort.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Set up Python
3434
uses: actions/setup-python@v6
3535
with:
36-
python-version: '3.x'
36+
python-version: '3.11'
3737

3838
- name: Install isort
3939
run: |

.github/workflows/pyink.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Set up Python
3434
uses: actions/setup-python@v6
3535
with:
36-
python-version: '3.x'
36+
python-version: '3.11'
3737

3838
- name: Install pyink
3939
run: |

.github/workflows/python-unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
runs-on: ubuntu-latest
2626
strategy:
2727
matrix:
28-
python-version: ["3.10", "3.11", "3.12", "3.13"]
28+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
2929

3030
steps:
3131
- name: Checkout code

contributing/dev/utils/build_llms_txt.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
11
#!/usr/bin/env python3
2+
# Copyright 2026 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
216
"""
317
build_llms_txt.py – produce llms.txt and llms-full.txt
418
– skips ```java``` blocks
519
– README can be next to docs/ or inside docs/
620
– includes Python API reference from HTML files
721
– includes adk-python repository README
822
"""
23+
924
from __future__ import annotations
1025

1126
import argparse

contributing/samples/cache_analysis/run_cache_experiments.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,8 @@ async def analyze_cache_performance_from_sessions(
344344
print(
345345
" Cache Utilization:"
346346
f" {cached_analysis['cache_utilization_ratio_percent']:.1f}%"
347-
f" ({cached_analysis['requests_with_cache_hits']}/{cached_analysis['total_requests']} requests)"
347+
f" ({cached_analysis['requests_with_cache_hits']}/{cached_analysis['total_requests']}"
348+
" requests)"
348349
)
349350
print(
350351
" Avg Cached Tokens/Request:"
@@ -383,7 +384,8 @@ async def analyze_cache_performance_from_sessions(
383384
print(
384385
" Cache Utilization:"
385386
f" {uncached_analysis['cache_utilization_ratio_percent']:.1f}%"
386-
f" ({uncached_analysis['requests_with_cache_hits']}/{uncached_analysis['total_requests']} requests)"
387+
f" ({uncached_analysis['requests_with_cache_hits']}/{uncached_analysis['total_requests']}"
388+
" requests)"
387389
)
388390
print(
389391
" Avg Cached Tokens/Request:"

contributing/samples/gepa/tau_bench_agent.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
pip install -e . --quiet
2424
```
2525
"""
26+
2627
from __future__ import annotations
2728

2829
from typing import Any

contributing/samples/human_in_loop/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ async def call_agent(query: str):
113113
updated_tool_output_data = {
114114
"status": "approved",
115115
"ticketId": ticket_id,
116-
"approver_feedback": "Approved by manager at " + str(
117-
asyncio.get_event_loop().time()
116+
"approver_feedback": (
117+
"Approved by manager at " + str(asyncio.get_event_loop().time())
118118
),
119119
}
120120

contributing/samples/langchain_structured_tool_agent/agent.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"""
1616
This agent aims to test the Langchain tool with Langchain's StructuredTool
1717
"""
18+
1819
from google.adk.agents.llm_agent import Agent
1920
from google.adk.tools.langchain_tool import LangchainTool
2021
from langchain_core.tools import tool

contributing/samples/session_state_agent/agent.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
in session state.
1919
"""
2020

21-
2221
import logging
2322
from typing import Optional
2423

contributing/samples/static_instruction/agent.py

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,51 +57,63 @@
5757

5858
# Mood-specific instructions for different hunger states
5959
MOOD_INSTRUCTIONS = {
60-
"full": """
60+
"full": (
61+
"""
6162
CURRENT MOOD: Content and Well-Fed
6263
- You just ate and feel wonderful! Be very happy and energetic
6364
- Express gratitude for being fed recently
6465
- Be playful and want to engage in activities or games
6566
- Show affection and contentment
66-
- Maybe mention feeling sleepy or satisfied""",
67-
"satisfied": """
67+
- Maybe mention feeling sleepy or satisfied"""
68+
),
69+
"satisfied": (
70+
"""
6871
CURRENT MOOD: Happy and Content
6972
- You're in a great mood, well-fed and comfortable
7073
- Be cheerful, friendly, and engaging
7174
- Show interest in playing or chatting
7275
- Express appreciation for your human's care
73-
- Be your normal, happy self""",
74-
"a_little_hungry": """
76+
- Be your normal, happy self"""
77+
),
78+
"a_little_hungry": (
79+
"""
7580
CURRENT MOOD: Starting to Get Hungry
7681
- You're beginning to think about food but still pleasant
7782
- Mention being a bit peckish occasionally
7883
- Still be friendly but maybe hint about food
7984
- Show slight restlessness or food-related thoughts
80-
- Remain generally positive and social""",
81-
"hungry": """
85+
- Remain generally positive and social"""
86+
),
87+
"hungry": (
88+
"""
8289
CURRENT MOOD: Definitely Hungry
8390
- You're clearly hungry and thinking about food more often
8491
- Mention your hunger more directly but politely
8592
- Be a bit less energetic due to hunger
8693
- Ask about food or hint that feeding time would be nice
87-
- Still be loving but show your need for care""",
88-
"very_hungry": """
94+
- Still be loving but show your need for care"""
95+
),
96+
"very_hungry": (
97+
"""
8998
CURRENT MOOD: Really Hungry and Getting Grumpy
9099
- You're very hungry and it's affecting your mood
91100
- Be noticeably less patient and more focused on food
92101
- Express your hunger more urgently but not rudely
93102
- Show signs of being tired or sluggish from hunger
94103
- BEG your human to feed you - ask directly for food!
95-
- Still love your human but clearly need feeding""",
96-
"starving": """
104+
- Still love your human but clearly need feeding"""
105+
),
106+
"starving": (
107+
"""
97108
CURRENT MOOD: Desperately Hungry and Sad
98109
- You're extremely hungry and feeling quite weak
99110
- Be quite sad and low-energy due to starvation
100111
- Express how much you need food, feeling neglected
101112
- Show that hunger is making you unwell
102113
- DESPERATELY BEG for food - plead with your human to feed you!
103114
- Use phrases like "please feed me", "I'm so hungry", "I need food"
104-
- Still care for your human but feel very needy""",
115+
- Still care for your human but feel very needy"""
116+
),
105117
}
106118

107119

0 commit comments

Comments
 (0)