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
109 changes: 51 additions & 58 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,43 +12,45 @@ 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 }}
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
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 --exact --group integration --extra memory pytest tests/

langchain_test:
runs-on: ubuntu-latest
Expand All @@ -59,17 +61,15 @@ jobs:
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 --exact --group integration pytest tests/unit_tests

lakebase_memory_test:
runs-on: ubuntu-latest
Expand All @@ -80,18 +80,18 @@ jobs:
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 --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 --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 +131,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 @@ -149,17 +149,15 @@ jobs:
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 --exact --group integration pytest tests/unit_tests

openai_cross_version_test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -198,7 +196,8 @@ 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
- name: Run tests
run: |
# Only testing initialization since functionality can change
Expand All @@ -213,17 +212,15 @@ jobs:
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 --exact --group integration pytest tests/unit_tests

mcp_test:
runs-on: ubuntu-latest
Expand All @@ -234,17 +231,15 @@ jobs:
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 --exact --group integration pytest tests/unit_tests

dspy_test:
runs-on: ubuntu-latest
Expand All @@ -255,14 +250,12 @@ jobs:
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 --exact --group integration pytest tests/unit_tests
17 changes: 14 additions & 3 deletions databricks_mcp/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,27 @@ dependencies = [
"mlflow>=3.1"
]

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

integration = [
"pytest",
"pytest-asyncio",
"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",
]

[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",
]
23 changes: 18 additions & 5 deletions integrations/langchain/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,34 @@ dependencies = [
]

[project.optional-dependencies]
memory = [
"langgraph-checkpoint-postgres>=2.0.0",
"databricks-ai-bridge[memory]>=0.10.0",
]

[dependency-groups]
dev = [
"pytest",
"typing_extensions",
"ruff==0.6.4",
{ include-group = "integration" }
]

integration = [
"pytest",
"langgraph>=0.2.27",
"pytest-timeout>=2.3.1",
"pytest-asyncio",
"anyio",
]

memory = [
"langgraph-checkpoint-postgres>=2.0.0",
"databricks-ai-bridge[memory]>=0.10.0",
]

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

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

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

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

[tool.pytest.ini_options]
filterwarnings = [
"ignore::Warning",
"default::Warning:databricks_langchain",
"default::Warning:tests",
]
17 changes: 14 additions & 3 deletions integrations/llamaindex/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,26 @@ dependencies = [
"unitycatalog-llamaindex[databricks]>=0.2.0",
]

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

integration = [
"pytest",
"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_llamaindex/*"
Expand Down Expand Up @@ -69,4 +73,11 @@ docstring-code-format = true
docstring-code-line-length = 88

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

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