Skip to content

Commit dd68dbc

Browse files
authored
chore: move optional dependencies to dependency groups (#230)
1 parent 401548b commit dd68dbc

File tree

7 files changed

+37
-33
lines changed

7 files changed

+37
-33
lines changed

.github/workflows/main.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: tests
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
pull_request:
88
types:
99
- opened
@@ -24,7 +24,7 @@ jobs:
2424
python-version: "3.10"
2525
- name: Install dependencies
2626
run: |
27-
pip install .[lint]
27+
pip install . --group lint
2828
- name: Lint Python code with ruff
2929
run: |
3030
ruff check .
@@ -45,7 +45,7 @@ jobs:
4545
python-version: ${{ matrix.python-version }}
4646
- name: Install dependencies
4747
run: |
48-
pip install ".[dev, memory]"
48+
pip install ".[memory]" --group dev
4949
- name: Run tests
5050
run: |
5151
pytest tests/
@@ -66,7 +66,7 @@ jobs:
6666
- name: Install dependencies
6767
run: |
6868
pip install .
69-
pip install integrations/langchain[dev]
69+
pip install integrations/langchain --group dev
7070
- name: Run tests
7171
run: |
7272
pytest integrations/langchain/tests/unit_tests
@@ -87,7 +87,7 @@ jobs:
8787
- name: Install dependencies
8888
run: |
8989
pip install .[memory]
90-
pip install "integrations/langchain[dev, memory]"
90+
pip install "integrations/langchain[memory]" --group dev
9191
- name: Run tests
9292
run: |
9393
pytest tests/databricks_ai_bridge/test_lakebase.py
@@ -132,7 +132,7 @@ jobs:
132132
cp -r older-version/integrations/langchain integrations/
133133
- name: Install langchain dependency
134134
run: |
135-
pip install integrations/langchain[dev]
135+
pip install integrations/langchain --group dev
136136
- name: Run tests
137137
run: |
138138
# Only testing initialization since functionality can change
@@ -157,7 +157,7 @@ jobs:
157157
- name: Install dependencies
158158
run: |
159159
pip install .
160-
pip install integrations/openai[dev]
160+
pip install integrations/openai --group dev
161161
- name: Run tests
162162
run: |
163163
pytest integrations/openai/tests/unit_tests
@@ -199,7 +199,8 @@ jobs:
199199
cp -r older-version/integrations/openai integrations/
200200
- name: Install openai dependency
201201
run: |
202-
pip install integrations/openai[dev]
202+
pip install .
203+
pip install integrations/openai --group dev
203204
- name: Run tests
204205
run: |
205206
# Only testing initialization since functionality can change
@@ -221,7 +222,7 @@ jobs:
221222
- name: Install dependencies
222223
run: |
223224
pip install .
224-
pip install integrations/llamaindex[dev]
225+
pip install integrations/llamaindex --group dev
225226
- name: Run tests
226227
run: |
227228
pytest integrations/llamaindex/tests/unit_tests
@@ -242,7 +243,7 @@ jobs:
242243
- name: Install dependencies
243244
run: |
244245
pip install .
245-
pip install -e databricks_mcp[dev]
246+
pip install -e databricks_mcp --group dev
246247
- name: Run tests
247248
run: |
248249
pytest databricks_mcp/tests/unit_tests
@@ -263,7 +264,7 @@ jobs:
263264
- name: Install dependencies
264265
run: |
265266
pip install .
266-
pip install integrations/dspy[dev]
267+
pip install integrations/dspy --group dev
267268
- name: Run tests
268269
run: |
269270
pytest integrations/dspy/tests/unit_tests

databricks_mcp/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies = [
1515
"mlflow>=3.1"
1616
]
1717

18-
[project.optional-dependencies]
18+
[dependency-groups]
1919
dev = [
2020
"pytest",
2121
"pytest-asyncio",

integrations/dspy/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dependencies = [
1414
"mlflow>=3.0.0",
1515
]
1616

17-
[project.optional-dependencies]
17+
[dependency-groups]
1818
dev = [
1919
"pytest",
2020
"ruff",

integrations/langchain/pyproject.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ dependencies = [
2323
]
2424

2525
[project.optional-dependencies]
26+
memory = [
27+
"langgraph-checkpoint-postgres>=2.0.0",
28+
"databricks-ai-bridge[memory]>=0.10.0",
29+
]
30+
31+
[dependency-groups]
2632
dev = [
2733
"pytest",
2834
"pytest-asyncio",
@@ -37,10 +43,6 @@ integration = [
3743
"anyio",
3844
]
3945

40-
memory = [
41-
"langgraph-checkpoint-postgres>=2.0.0",
42-
"databricks-ai-bridge[memory]>=0.10.0",
43-
]
4446

4547
[build-system]
4648
requires = ["hatchling"]

integrations/llamaindex/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies = [
1515
"unitycatalog-llamaindex[databricks]>=0.2.0",
1616
]
1717

18-
[project.optional-dependencies]
18+
[dependency-groups]
1919
dev = [
2020
"pytest",
2121
"typing_extensions",
@@ -69,4 +69,4 @@ docstring-code-format = true
6969
docstring-code-line-length = 88
7070

7171
[tool.ruff.lint.pydocstyle]
72-
convention = "google"
72+
convention = "google"

integrations/openai/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ dependencies = [
2020
"openai-agents>=0.5.0"
2121
]
2222

23-
[project.optional-dependencies]
23+
[dependency-groups]
2424
dev = [
2525
"pytest",
2626
"pytest-asyncio",

pyproject.toml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,12 @@ dependencies = [
2121
[project.license]
2222
file = "LICENSE.txt"
2323

24-
[build-system]
25-
requires = ["hatchling"]
26-
build-backend = "hatchling.build"
27-
28-
[tool.hatch.build]
29-
include = [
30-
"src/*"
24+
[project.optional-dependencies]
25+
memory = [
26+
"psycopg[binary,pool]>=3.1",
3127
]
3228

33-
[tool.hatch.build.targets.wheel]
34-
packages = ["src/databricks_ai_bridge"]
35-
36-
[project.optional-dependencies]
29+
[dependency-groups]
3730
dev = [
3831
"hatch",
3932
"pytest",
@@ -56,10 +49,18 @@ lint = [
5649
"ruff==0.12.10",
5750
]
5851

59-
memory = [
60-
"psycopg[binary,pool]>=3.1",
52+
[build-system]
53+
requires = ["hatchling"]
54+
build-backend = "hatchling.build"
55+
56+
[tool.hatch.build]
57+
include = [
58+
"src/*"
6159
]
6260

61+
[tool.hatch.build.targets.wheel]
62+
packages = ["src/databricks_ai_bridge"]
63+
6364
[tool.ruff]
6465
line-length = 100
6566
target-version = "py39"

0 commit comments

Comments
 (0)