From ad561be4c623dc994a272885366ed99d05e06876 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 18:17:38 +0000 Subject: [PATCH] Fix #2390: Add databricks-sdk dependency to tools extra Co-Authored-By: Joe Moura --- pyproject.toml | 2 +- tests/tools/test_databricks_import.py | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 tests/tools/test_databricks_import.py diff --git a/pyproject.toml b/pyproject.toml index 2e319e8d0..2dfe3f1c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ Documentation = "https://docs.crewai.com" Repository = "https://github.com/crewAIInc/crewAI" [project.optional-dependencies] -tools = ["crewai-tools>=0.37.0"] +tools = ["crewai-tools>=0.37.0", "databricks-sdk>=0.46.0"] embeddings = [ "tiktoken~=0.7.0" ] diff --git a/tests/tools/test_databricks_import.py b/tests/tools/test_databricks_import.py new file mode 100644 index 000000000..676c6b46b --- /dev/null +++ b/tests/tools/test_databricks_import.py @@ -0,0 +1,13 @@ +import pytest + +def test_databricks_sdk_import(): + """Test that databricks-sdk can be imported without errors. + + This test verifies that the databricks-sdk dependency is properly installed + when using the tools extra, which is required by the databricks_query_tool. + """ + try: + import databricks.sdk + assert True + except ImportError as e: + pytest.fail(f"Failed to import databricks.sdk: {e}")