chroma-haystack 3.4.0__tar.gz → 3.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/CHANGELOG.md +28 -0
  2. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/PKG-INFO +1 -1
  3. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/pyproject.toml +3 -3
  4. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/src/haystack_integrations/components/retrievers/chroma/retriever.py +21 -21
  5. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/src/haystack_integrations/document_stores/chroma/document_store.py +271 -42
  6. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/src/haystack_integrations/document_stores/chroma/filters.py +12 -12
  7. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/tests/conftest.py +4 -2
  8. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/tests/test_document_store.py +110 -6
  9. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/tests/test_document_store_async.py +109 -3
  10. chroma_haystack-3.4.0/pydoc/config.yml +0 -32
  11. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/.gitignore +0 -0
  12. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/LICENSE +0 -0
  13. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/README.md +0 -0
  14. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_01.txt +0 -0
  15. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_02.txt +0 -0
  16. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_03.txt +0 -0
  17. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_04.txt +0 -0
  18. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_05.txt +0 -0
  19. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_06.txt +0 -0
  20. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_07.txt +0 -0
  21. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_08.txt +0 -0
  22. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_09.txt +0 -0
  23. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_10.txt +0 -0
  24. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_11.txt +0 -0
  25. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_12.txt +0 -0
  26. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_20.txt +0 -0
  27. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_21.txt +0 -0
  28. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_22.txt +0 -0
  29. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_23.txt +0 -0
  30. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_24.txt +0 -0
  31. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_25.txt +0 -0
  32. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_26.txt +0 -0
  33. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_27.txt +0 -0
  34. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_28.txt +0 -0
  35. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_29.txt +0 -0
  36. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_30.txt +0 -0
  37. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_31.txt +0 -0
  38. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_32.txt +0 -0
  39. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_40.txt +0 -0
  40. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_41.txt +0 -0
  41. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_42.txt +0 -0
  42. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_43.txt +0 -0
  43. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_44.txt +0 -0
  44. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_45.txt +0 -0
  45. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_46.txt +0 -0
  46. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_50.txt +0 -0
  47. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_51.txt +0 -0
  48. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_52.txt +0 -0
  49. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/data/usr_90.txt +0 -0
  50. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/example/example.py +0 -0
  51. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/pydoc/config_docusaurus.yml +0 -0
  52. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/src/haystack_integrations/components/retrievers/chroma/__init__.py +0 -0
  53. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/src/haystack_integrations/components/retrievers/py.typed +0 -0
  54. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/src/haystack_integrations/document_stores/chroma/__init__.py +0 -0
  55. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/src/haystack_integrations/document_stores/chroma/errors.py +0 -0
  56. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/src/haystack_integrations/document_stores/chroma/utils.py +0 -0
  57. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/src/haystack_integrations/document_stores/py.typed +0 -0
  58. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/tests/__init__.py +0 -0
  59. {chroma_haystack-3.4.0 → chroma_haystack-3.5.0}/tests/test_retriever.py +0 -0
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ## [integrations/chroma-v3.4.1]
4
+
5
+ ### ⚙️ CI
6
+
7
+ - Adopt PEP 585 type hinting (#2475)
8
+
9
+
10
+ ## [integrations/chroma-v3.4.0] - 2025-10-27
11
+
12
+ ### 🚀 Features
13
+
14
+ - Adding delete_all_docs to ChromaDB document store (#2399)
15
+
16
+ ### 📚 Documentation
17
+
18
+ - Add pydoc configurations for Docusaurus (#2411)
19
+
20
+ ### ⚙️ CI
21
+
22
+ - Install dependencies in the `test` environment when testing with lowest direct dependencies and Haystack main (#2418)
23
+
24
+ ### 🧹 Chores
25
+
26
+ - Update md files for new hatch scripts (#1911)
27
+ - Remove black (#1985)
28
+ - Standardize readmes - part 1 (#2202)
29
+
30
+
3
31
  ## [integrations/chroma-v3.3.0] - 2025-06-09
4
32
 
5
33
  ### 🚀 Features
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chroma-haystack
3
- Version: 3.4.0
3
+ Version: 3.5.0
4
4
  Project-URL: Documentation, https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/chroma#readme
5
5
  Project-URL: Issues, https://github.com/deepset-ai/haystack-core-integrations/issues
6
6
  Project-URL: Source, https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/chroma
@@ -46,7 +46,7 @@ installer = "uv"
46
46
  dependencies = ["haystack-pydoc-tools", "ruff"]
47
47
 
48
48
  [tool.hatch.envs.default.scripts]
49
- docs = ["pydoc-markdown pydoc/config.yml"]
49
+ docs = ["pydoc-markdown pydoc/config_docusaurus.yml"]
50
50
  fmt = "ruff check --fix {args} && ruff format {args}"
51
51
  fmt-check = "ruff check {args} && ruff format --check {args}"
52
52
 
@@ -64,7 +64,7 @@ dependencies = [
64
64
  unit = 'pytest -m "not integration" {args:tests}'
65
65
  integration = 'pytest -m "integration" {args:tests}'
66
66
  all = 'pytest {args:tests}'
67
- cov-retry = 'all --cov=haystack_integrations --reruns 3 --reruns-delay 30 -x'
67
+ cov-retry = 'pytest --cov=haystack_integrations --reruns 3 --reruns-delay 30 -x {args:tests}'
68
68
 
69
69
  types = "mypy -p haystack_integrations.components.retrievers.chroma -p haystack_integrations.document_stores.chroma {args}"
70
70
 
@@ -78,7 +78,7 @@ disallow_incomplete_defs = true
78
78
  allow-direct-references = true
79
79
 
80
80
  [tool.ruff]
81
- target-version = "py38"
81
+ target-version = "py39"
82
82
  line-length = 120
83
83
 
84
84
  [tool.ruff.lint]
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # SPDX-License-Identifier: Apache-2.0
4
4
 
5
- from typing import Any, Dict, List, Optional, Union
5
+ from typing import Any, Optional, Union
6
6
 
7
7
  from haystack import Document, component, default_from_dict, default_to_dict
8
8
  from haystack.document_stores.types import FilterPolicy
@@ -48,7 +48,7 @@ class ChromaQueryTextRetriever:
48
48
  def __init__(
49
49
  self,
50
50
  document_store: ChromaDocumentStore,
51
- filters: Optional[Dict[str, Any]] = None,
51
+ filters: Optional[dict[str, Any]] = None,
52
52
  top_k: int = 10,
53
53
  filter_policy: Union[str, FilterPolicy] = FilterPolicy.REPLACE,
54
54
  ):
@@ -65,13 +65,13 @@ class ChromaQueryTextRetriever:
65
65
  filter_policy if isinstance(filter_policy, FilterPolicy) else FilterPolicy.from_str(filter_policy)
66
66
  )
67
67
 
68
- @component.output_types(documents=List[Document])
68
+ @component.output_types(documents=list[Document])
69
69
  def run(
70
70
  self,
71
71
  query: str,
72
- filters: Optional[Dict[str, Any]] = None,
72
+ filters: Optional[dict[str, Any]] = None,
73
73
  top_k: Optional[int] = None,
74
- ) -> Dict[str, Any]:
74
+ ) -> dict[str, Any]:
75
75
  """
76
76
  Run the retriever on the given input data.
77
77
 
@@ -90,13 +90,13 @@ class ChromaQueryTextRetriever:
90
90
  top_k = top_k or self.top_k
91
91
  return {"documents": self.document_store.search([query], top_k, filters)[0]}
92
92
 
93
- @component.output_types(documents=List[Document])
93
+ @component.output_types(documents=list[Document])
94
94
  async def run_async(
95
95
  self,
96
96
  query: str,
97
- filters: Optional[Dict[str, Any]] = None,
97
+ filters: Optional[dict[str, Any]] = None,
98
98
  top_k: Optional[int] = None,
99
- ) -> Dict[str, Any]:
99
+ ) -> dict[str, Any]:
100
100
  """
101
101
  Asynchronously run the retriever on the given input data.
102
102
 
@@ -118,7 +118,7 @@ class ChromaQueryTextRetriever:
118
118
  return {"documents": (await self.document_store.search_async([query], top_k, filters))[0]}
119
119
 
120
120
  @classmethod
121
- def from_dict(cls, data: Dict[str, Any]) -> "ChromaQueryTextRetriever":
121
+ def from_dict(cls, data: dict[str, Any]) -> "ChromaQueryTextRetriever":
122
122
  """
123
123
  Deserializes the component from a dictionary.
124
124
 
@@ -136,7 +136,7 @@ class ChromaQueryTextRetriever:
136
136
 
137
137
  return default_from_dict(cls, data)
138
138
 
139
- def to_dict(self) -> Dict[str, Any]:
139
+ def to_dict(self) -> dict[str, Any]:
140
140
  """
141
141
  Serializes the component to a dictionary.
142
142
 
@@ -161,7 +161,7 @@ class ChromaEmbeddingRetriever:
161
161
  def __init__(
162
162
  self,
163
163
  document_store: ChromaDocumentStore,
164
- filters: Optional[Dict[str, Any]] = None,
164
+ filters: Optional[dict[str, Any]] = None,
165
165
  top_k: int = 10,
166
166
  filter_policy: Union[str, FilterPolicy] = FilterPolicy.REPLACE,
167
167
  ):
@@ -178,13 +178,13 @@ class ChromaEmbeddingRetriever:
178
178
  filter_policy if isinstance(filter_policy, FilterPolicy) else FilterPolicy.from_str(filter_policy)
179
179
  )
180
180
 
181
- @component.output_types(documents=List[Document])
181
+ @component.output_types(documents=list[Document])
182
182
  def run(
183
183
  self,
184
- query_embedding: List[float],
185
- filters: Optional[Dict[str, Any]] = None,
184
+ query_embedding: list[float],
185
+ filters: Optional[dict[str, Any]] = None,
186
186
  top_k: Optional[int] = None,
187
- ) -> Dict[str, Any]:
187
+ ) -> dict[str, Any]:
188
188
  """
189
189
  Run the retriever on the given input data.
190
190
 
@@ -205,13 +205,13 @@ class ChromaEmbeddingRetriever:
205
205
  query_embeddings = [query_embedding]
206
206
  return {"documents": self.document_store.search_embeddings(query_embeddings, top_k, filters)[0]}
207
207
 
208
- @component.output_types(documents=List[Document])
208
+ @component.output_types(documents=list[Document])
209
209
  async def run_async(
210
210
  self,
211
- query_embedding: List[float],
212
- filters: Optional[Dict[str, Any]] = None,
211
+ query_embedding: list[float],
212
+ filters: Optional[dict[str, Any]] = None,
213
213
  top_k: Optional[int] = None,
214
- ) -> Dict[str, Any]:
214
+ ) -> dict[str, Any]:
215
215
  """
216
216
  Asynchronously run the retriever on the given input data.
217
217
 
@@ -235,7 +235,7 @@ class ChromaEmbeddingRetriever:
235
235
  return {"documents": (await self.document_store.search_embeddings_async(query_embeddings, top_k, filters))[0]}
236
236
 
237
237
  @classmethod
238
- def from_dict(cls, data: Dict[str, Any]) -> "ChromaEmbeddingRetriever":
238
+ def from_dict(cls, data: dict[str, Any]) -> "ChromaEmbeddingRetriever":
239
239
  """
240
240
  Deserializes the component from a dictionary.
241
241
 
@@ -253,7 +253,7 @@ class ChromaEmbeddingRetriever:
253
253
 
254
254
  return default_from_dict(cls, data)
255
255
 
256
- def to_dict(self) -> Dict[str, Any]:
256
+ def to_dict(self) -> dict[str, Any]:
257
257
  """
258
258
  Serializes the component to a dictionary.
259
259