Skip to content
Open
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
137 changes: 76 additions & 61 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: tests
on:
push:
branches:
- master
- main
pull_request:
types:
- opened
Expand All @@ -12,86 +12,99 @@ on:
- ready_for_review
workflow_dispatch:

env:
UV_VERSION: "0.9.11"

jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: "3.10"
version: ${{ env.UV_VERSION }}
- name: Install dependencies
run: |
pip install .[lint]
uv sync --group lint
- name: Lint Python code with ruff
run: |
ruff check .
ruff format --check .
uv run ruff check .
uv run ruff format --check .

core_test:
runs-on: ubuntu-latest
name: "core_test (python: ${{ matrix.python-version }}, uv: ${{ matrix.uv-resolution }})"
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
uv-resolution: ["lowest-direct", "highest"]
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: ${{ env.UV_VERSION }}
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install ".[dev, memory]"
- name: Run tests
run: |
pytest tests/
uv run --resolution ${{ matrix.uv-resolution }} \
--exact --group integration --extra memory \
pytest tests/

langchain_test:
runs-on: ubuntu-latest
name: "langchain_test (python: ${{ matrix.python-version }}, uv: ${{ matrix.uv-resolution }})"
strategy:
matrix:
python-version: ["3.10"]
uv-resolution: ["lowest-direct", "highest"]

timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: ${{ env.UV_VERSION }}
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install .
pip install integrations/langchain[dev]
- name: Run tests
working-directory: integrations/langchain
run: |
pytest integrations/langchain/tests/unit_tests
uv run --resolution ${{ matrix.uv-resolution }} \
--exact --group integration pytest tests/unit_tests

lakebase_memory_test:
runs-on: ubuntu-latest
name: "lakebase_memory_test (python: ${{ matrix.python-version }}, uv: ${{ matrix.uv-resolution }})"
strategy:
matrix:
python-version: ["3.10"]
uv-resolution: ["lowest-direct", "highest"]
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: ${{ env.UV_VERSION }}
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Run databricks-ai-bridge Tests
run: |
pip install .[memory]
pip install "integrations/langchain[dev, memory]"
- name: Run tests
uv run --resolution ${{ matrix.uv-resolution }} \
--exact --group integration --extra memory \
pytest tests/databricks_ai_bridge/test_lakebase.py
- name: Run databricks-langchain Tests
working-directory: integrations/langchain
run: |
pytest tests/databricks_ai_bridge/test_lakebase.py
pytest integrations/langchain/tests/unit_tests/test_checkpoint.py
uv run --resolution ${{ matrix.uv-resolution }} \
--exact --group integration --extra memory \
pytest tests/unit_tests/test_checkpoint.py

langchain_cross_version_test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -131,7 +144,7 @@ jobs:
cp -r older-version/integrations/langchain integrations/
- name: Install langchain dependency
run: |
pip install integrations/langchain[dev]
pip install integrations/langchain --group dev
- name: Run tests
run: |
# Only testing initialization since functionality can change
Expand All @@ -142,24 +155,25 @@ jobs:

openai_test:
runs-on: ubuntu-latest
name: "openai_test (python: ${{ matrix.python-version }}, uv: ${{ matrix.uv-resolution }})"
strategy:
matrix:
python-version: ["3.10"]
uv-resolution: ["lowest-direct", "highest"]
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: ${{ env.UV_VERSION }}
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install .
pip install integrations/openai[dev]
- name: Run tests
working-directory: integrations/openai
run: |
pytest integrations/openai/tests/unit_tests
uv run --resolution ${{ matrix.uv-resolution }} \
--exact --group integration pytest tests/unit_tests

openai_cross_version_test:
runs-on: ubuntu-latest
Expand All @@ -180,9 +194,6 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install . "${{ matrix.version.mlflow }}"
- name: Checkout openai version
uses: actions/checkout@v4
with:
Expand All @@ -198,71 +209,75 @@ jobs:
cp -r older-version/integrations/openai integrations/
- name: Install openai dependency
run: |
pip install integrations/openai[dev]
pip install .
pip install integrations/openai --group dev
pip install "${{ matrix.version.mlflow }}"
- name: Run tests
run: |
# Only testing initialization since functionality can change
pytest integrations/openai/tests/unit_tests/test_vector_search_retriever_tool.py::test_vector_search_retriever_tool_init

llamaindex_test:
runs-on: ubuntu-latest
name: "llamaindex_test (python: ${{ matrix.python-version }}, uv: ${{ matrix.uv-resolution }})"
strategy:
matrix:
python-version: ["3.10"]
uv-resolution: ["lowest-direct", "highest"]
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: ${{ env.UV_VERSION }}
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install .
pip install integrations/llamaindex[dev]
- name: Run tests
working-directory: integrations/llamaindex
run: |
pytest integrations/llamaindex/tests/unit_tests
uv run --resolution ${{ matrix.uv-resolution }} --exact --group integration pytest tests/unit_tests

mcp_test:
runs-on: ubuntu-latest
name: "mcp_test (python: ${{ matrix.python-version }}, uv: ${{ matrix.uv-resolution }})"
strategy:
matrix:
python-version: ["3.10"]
uv-resolution: ["lowest-direct", "highest"]
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: ${{ env.UV_VERSION }}
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install .
pip install -e databricks_mcp[dev]
- name: Run tests
working-directory: databricks_mcp
run: |
pytest databricks_mcp/tests/unit_tests
uv run --resolution ${{ matrix.uv-resolution }} \
--exact --group integration pytest tests/unit_tests

dspy_test:
runs-on: ubuntu-latest
name: "dspy_test (python: ${{ matrix.python-version }}, uv: ${{ matrix.uv-resolution }})"
strategy:
matrix:
python-version: ["3.10"]
uv-resolution: ["lowest-direct", "highest"]
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: ${{ env.UV_VERSION }}
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install .
pip install integrations/dspy[dev]
- name: Run tests
working-directory: integrations/dspy
run: |
pytest integrations/dspy/tests/unit_tests
uv run --resolution ${{ matrix.uv-resolution }} \
--exact --group integration pytest tests/unit_tests
21 changes: 16 additions & 5 deletions databricks_mcp/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,33 @@ readme = "README.md"
license = { text="Apache-2.0" }
requires-python = ">=3.10"
dependencies = [
"mcp>=1.9.1",
"mcp>=1.13.0",
"databricks-sdk>=0.49.0",
"databricks-ai-bridge>=0.4.2",
"mlflow>=3.1"
]

[project.optional-dependencies]
[dependency-groups]
dev = [
"pytest",
"pytest-asyncio",
"typing_extensions",
"typing_extensions>=4.15.0",
"databricks-sdk>=0.49.0",
"ruff==0.6.4",
{ include-group = "integration" }
]

integration = [
"pytest>=9.0.0",
"pytest-asyncio>=1.3.0",
"pytest-timeout>=2.3.1",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.uv.sources]
databricks-ai-bridge = { path = "../", editable = true }

[tool.hatch.build]
include = [
"src/databricks_mcp/*"
Expand Down Expand Up @@ -71,3 +75,10 @@ docstring-code-line-length = 88

[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.pytest.ini_options]
filterwarnings = [
"ignore::Warning",
"default::Warning:databricks_mcp",
"default::Warning:tests",
]
17 changes: 15 additions & 2 deletions integrations/dspy/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,22 @@ dependencies = [
"mlflow>=3.0.0",
]

[project.optional-dependencies]
[dependency-groups]
dev = [
"pytest",
"ruff",
{ include-group = "integration" }
]
integration = [
"pytest>=9.0.0",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.uv.sources]
databricks-ai-bridge = { path = "../../", editable = true }

[tool.hatch.build]
include = [
"src/databricks_dspy/*"
Expand Down Expand Up @@ -60,3 +66,10 @@ select = [
[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = 100

[tool.pytest.ini_options]
filterwarnings = [
"ignore::Warning",
"default::Warning:databricks_dspy",
"default::Warning:tests",
]
Loading