Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ classifiers = [
"Topic :: Software Development :: Libraries",
]
dependencies = [
"requests>=2.1.0",
"tqdm>=4.1.0",
"requests>=2.1.0",
"tqdm>=4.1.0",
"pandas>=2.0.0",
"python-dotenv>=1.0.0",
"validators>=0.20.0",
"python-dotenv>=1.0.0",
"validators>=0.20.0",
"filetype>=1.2.0",
"click>=7.1.2",
"PyYAML>=6.0.1",
Expand All @@ -72,6 +72,6 @@ test = [
"pytest>=6.1.0",
"docker>=6.1.3",
"requests-mock>=1.11.0",
"pytest-mock>=3.10.0"
"pytest-mock>=3.10.0",
"pytest-rerunfailures>=16.0"
]

3 changes: 3 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ select = ["D"]
ignore = []
extend-safe-fixes = []

[lint.per-file-ignores]
"tests/**/*.py" = ["D"]

[lint.isort]
known-first-party = ["src"]

Expand Down
26 changes: 19 additions & 7 deletions tests/functional/agent/agent_functional_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def run_input_map(request):
@pytest.fixture(scope="function")
def delete_agents_and_team_agents():
from tests.test_deletion_utils import safe_delete_all_agents_and_team_agents

# Clean up before test
safe_delete_all_agents_and_team_agents()

Expand All @@ -74,7 +74,9 @@ def test_end2end(run_input_map, delete_agents_and_team_agents, AgentFactory):
tools.append(AgentFactory.create_model_tool(**tool_))
if "pipeline_tools" in run_input_map:
for tool in run_input_map["pipeline_tools"]:
tools.append(AgentFactory.create_pipeline_tool(pipeline=tool["pipeline_id"], description=tool["description"]))
tools.append(
AgentFactory.create_pipeline_tool(pipeline=tool["pipeline_id"], description=tool["description"])
)

agent = AgentFactory.create(
name=run_input_map["agent_name"],
Expand Down Expand Up @@ -106,7 +108,10 @@ def test_python_interpreter_tool(delete_agents_and_team_agents, AgentFactory):
tool = AgentFactory.create_python_interpreter_tool()
assert tool is not None
assert tool.name == "Python Interpreter"
assert tool.description == "A Python shell. Use this to execute python commands. Input should be a valid python command."
assert (
tool.description
== "A Python shell. Use this to execute python commands. Input should be a valid python command."
)

agent = AgentFactory.create(
name="Python Developer",
Expand Down Expand Up @@ -180,7 +185,9 @@ def test_update_draft_agent(run_input_map, delete_agents_and_team_agents, AgentF
tools.append(AgentFactory.create_model_tool(**tool_))
if "pipeline_tools" in run_input_map:
for tool in run_input_map["pipeline_tools"]:
tools.append(AgentFactory.create_pipeline_tool(pipeline=tool["pipeline_id"], description=tool["description"]))
tools.append(
AgentFactory.create_pipeline_tool(pipeline=tool["pipeline_id"], description=tool["description"])
)

agent = AgentFactory.create(
name=run_input_map["agent_name"],
Expand Down Expand Up @@ -267,7 +274,9 @@ def test_update_tools_of_agent(run_input_map, delete_agents_and_team_agents, Age

if "pipeline_tools" in run_input_map:
for tool in run_input_map["pipeline_tools"]:
tools.append(AgentFactory.create_pipeline_tool(pipeline=tool["pipeline_id"], description=tool["description"]))
tools.append(
AgentFactory.create_pipeline_tool(pipeline=tool["pipeline_id"], description=tool["description"])
)

agent.tools = tools
agent.update()
Expand All @@ -285,6 +294,7 @@ def test_update_tools_of_agent(run_input_map, delete_agents_and_team_agents, Age
agent.delete()


@pytest.mark.flaky(reruns=2, reruns_delay=2)
@pytest.mark.parametrize(
"tool_config",
[
Expand Down Expand Up @@ -342,7 +352,7 @@ def test_specific_model_parameters_e2e(tool_config, delete_agents_and_team_agent
agent = AgentFactory.create(
name="Test Parameter Agent",
instructions="Test agent with parameterized tools. You MUST use a tool for the tasks. Do not directly answer the question.",
description = "Test agent with parameterized tools",
description="Test agent with parameterized tools",
tools=[tool],
llm_id="6646261c6eb563165658bbb1", # Using LLM ID from test data
)
Expand Down Expand Up @@ -395,7 +405,9 @@ def test_sql_tool(delete_agents_and_team_agents, AgentFactory):
)
assert agent is not None

response = agent.run("Create a table called Person with the following columns: id, name, age, salary, department")
response = agent.run(
"Create a table called Person with the following columns: id, name, age, salary, department"
)
assert response is not None
assert response["completed"] is True
assert response["status"].lower() == "success"
Expand Down