Python: Simplify Python Poe tasks and unify package selectors (#4722)

* updated automation tasks and commands, with alias for the time being

* Restore aggregate test exclusions

Preserve the legacy all-tests scope for test --all by excluding lab and devui from the default aggregate sweep, while still allowing explicit package selection. Also ignore hidden/generated test directories such as .mypy_cache during aggregate discovery.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* updated versions in pre-commit

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Eduard van Valkenburg
2026-03-18 19:39:11 +01:00
committed by GitHub
Unverified
parent d3d0100822
commit f48c4512d3
60 changed files with 1704 additions and 527 deletions
@@ -135,8 +135,7 @@ async def scenario_max_function_calls():
)
response = await agent.run(
"Search for the weather in Paris, London, Tokyo, "
"New York, and Sydney, and also search for best travel tips."
"Search for the weather in Paris, London, Tokyo, New York, and Sydney, and also search for best travel tips."
)
print(f" Response: {response.text[:200]}...")
print()
@@ -236,8 +235,12 @@ async def scenario_per_agent_tool_limits():
session_b = agent_b.create_session()
await agent_b.run("Look up quantum computing", session=session_b)
print(f" agent_a_lookup.invocation_count = {agent_a_lookup.invocation_count} (limit {agent_a_lookup.max_invocations})")
print(f" agent_b_lookup.invocation_count = {agent_b_lookup.invocation_count} (limit {agent_b_lookup.max_invocations})")
print(
f" agent_a_lookup.invocation_count = {agent_a_lookup.invocation_count} (limit {agent_a_lookup.max_invocations})"
)
print(
f" agent_b_lookup.invocation_count = {agent_b_lookup.invocation_count} (limit {agent_b_lookup.max_invocations})"
)
print(" → Agent A hit its limit; Agent B used 1 of 5.")
print()
@@ -254,8 +257,8 @@ async def scenario_combined():
client = OpenAIResponsesClient()
# 1. Configure the client with both iteration and function call limits.
client.function_invocation_configuration["max_iterations"] = 5 # max 5 LLM roundtrips
client.function_invocation_configuration["max_function_calls"] = 8 # max 8 total tool calls
client.function_invocation_configuration["max_iterations"] = 5 # max 5 LLM roundtrips
client.function_invocation_configuration["max_function_calls"] = 8 # max 8 total tool calls
print(f" max_iterations = {client.function_invocation_configuration['max_iterations']}")
print(f" max_function_calls = {client.function_invocation_configuration['max_function_calls']}")
@@ -47,12 +47,8 @@ async def main() -> None:
session = agent.create_session()
# Run the agent with the session; tools receive it via ctx.session.
print(
f"Agent: {await agent.run('What is the weather in London?', session=session)}"
)
print(
f"Agent: {await agent.run('What is the weather in Amsterdam?', session=session)}"
)
print(f"Agent: {await agent.run('What is the weather in London?', session=session)}")
print(f"Agent: {await agent.run('What is the weather in Amsterdam?', session=session)}")
print(f"Agent: {await agent.run('What cities did I ask about?', session=session)}")