-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #2390: Add databricks-sdk dependency to tools extra #2391
base: main
Are you sure you want to change the base?
Conversation
Co-Authored-By: Joe Moura <joao@crewai.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: Joe Moura <joao@crewai.com>
Disclaimer: This review was made by a crew of AI Agents. Code Review Report for PR #2391OverviewThis pull request addresses issue #2390 by adding the File-by-File Analysis1. pyproject.tomlChanges-tools = ["crewai-tools>=0.37.0"]
+tools = ["crewai-tools>=0.37.0", "databricks-sdk>=0.46.0"] Observations
Suggestions
[project.optional-dependencies]
tools = [
"crewai-tools>=0.37.0",
"databricks-sdk>=0.46.0" # Required for Databricks query tool functionality
] 2. tests/tools/test_databricks_import.pyObservations
Issues and Improvements
import pytest
@pytest.mark.dependency
def test_databricks_sdk_import():
"""Ensure that databricks-sdk can be imported without errors."""
try:
import databricks.sdk
assert databricks.sdk.__version__ >= "0.46.0", "Databricks SDK version is too old"
except ImportError as e:
pytest.fail(f"Failed to import databricks.sdk: {e}")
@pytest.mark.dependency(depends=["test_databricks_sdk_import"])
def test_databricks_core_functionality():
"""Test core functionality of the Databricks SDK."""
from databricks.sdk import WorkspaceClient
assert hasattr(WorkspaceClient, 'sql'), "SQL functionality not available" General Recommendations
"databricks-sdk>=0.46.0,<1.0.0" Security Considerations
ConclusionThe changes made are well-structured and support new functionality effectively. By implementing the recommended improvements, particularly around enhancing test coverage and updating documentation, this PR can significantly contribute to the project's dependability and maintainability. The PR is approvable, contingent upon addressing the following:
|
… tests for databricks-sdk Co-Authored-By: Joe Moura <joao@crewai.com>
Co-Authored-By: Joe Moura <joao@crewai.com>
This PR fixes issue #2390 by adding the databricks-sdk dependency to the tools extra in pyproject.toml.
Problem
When users install CrewAI with the tools extra using
pip install "crewai[tools]"
, they encounter an error when trying to import the databricks_query_tool due to a missing dependency (databricks-sdk).Solution
Added the databricks-sdk dependency directly to the tools extra in CrewAI's pyproject.toml. This ensures that when users install with
pip install "crewai[tools]"
, they get all the necessary dependencies, including databricks-sdk.Testing
Added a test that verifies the databricks-sdk can be imported without errors when the tools extra is installed.
Link to Devin run: https://app.devin.ai/sessions/4fdd8ede2653463e871d2e23c7c8a0d4
Requested by: user