Skip to content

Commit b290ea6

Browse files
authored
Making chromadb package optional dependency (#174)
Merging without signed commit
1 parent 1b71b32 commit b290ea6

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

chroma_dp/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
try:
2+
import chromadb # noqa: F401
3+
except ImportError:
4+
raise ValueError(
5+
"The chromadb is not installed. This package (chromadbx) requires that Chroma is installed to work. "
6+
"Please install it with `pip install chromadb`"
7+
)
18
from typing import (
29
Optional,
310
Sequence,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ packages = [{ include = "chroma_dp" }]
1616

1717
[tool.poetry.dependencies]
1818
python = ">=3.9,<3.12"
19-
chromadb = ">=0.4.0,<0.6.0"
19+
chromadb = { version = ">=0.4.0,<0.6.0", optional = true }
2020
datasets = "^2.15.0"
2121
tqdm = "^4.66.1"
2222
rich = "^13.7.0"

0 commit comments

Comments
 (0)