weaviate-haystack 2.2.1__tar.gz → 4.0.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 (23) hide show
  1. {weaviate_haystack-2.2.1 → weaviate_haystack-4.0.0}/CHANGELOG.md +13 -1
  2. {weaviate_haystack-2.2.1 → weaviate_haystack-4.0.0}/PKG-INFO +3 -3
  3. {weaviate_haystack-2.2.1 → weaviate_haystack-4.0.0}/pyproject.toml +13 -9
  4. {weaviate_haystack-2.2.1 → weaviate_haystack-4.0.0}/src/haystack_integrations/document_stores/weaviate/document_store.py +2 -2
  5. {weaviate_haystack-2.2.1 → weaviate_haystack-4.0.0}/tests/test_document_store.py +3 -9
  6. {weaviate_haystack-2.2.1 → weaviate_haystack-4.0.0}/.gitignore +0 -0
  7. {weaviate_haystack-2.2.1 → weaviate_haystack-4.0.0}/LICENSE.txt +0 -0
  8. {weaviate_haystack-2.2.1 → weaviate_haystack-4.0.0}/README.md +0 -0
  9. {weaviate_haystack-2.2.1 → weaviate_haystack-4.0.0}/docker-compose.yml +0 -0
  10. {weaviate_haystack-2.2.1 → weaviate_haystack-4.0.0}/pydoc/config.yml +0 -0
  11. {weaviate_haystack-2.2.1 → weaviate_haystack-4.0.0}/src/haystack_integrations/components/retrievers/weaviate/__init__.py +0 -0
  12. {weaviate_haystack-2.2.1 → weaviate_haystack-4.0.0}/src/haystack_integrations/components/retrievers/weaviate/bm25_retriever.py +0 -0
  13. {weaviate_haystack-2.2.1 → weaviate_haystack-4.0.0}/src/haystack_integrations/components/retrievers/weaviate/embedding_retriever.py +0 -0
  14. {weaviate_haystack-2.2.1 → weaviate_haystack-4.0.0}/src/haystack_integrations/document_stores/weaviate/__init__.py +0 -0
  15. {weaviate_haystack-2.2.1 → weaviate_haystack-4.0.0}/src/haystack_integrations/document_stores/weaviate/_filters.py +0 -0
  16. {weaviate_haystack-2.2.1 → weaviate_haystack-4.0.0}/src/haystack_integrations/document_stores/weaviate/auth.py +0 -0
  17. {weaviate_haystack-2.2.1 → weaviate_haystack-4.0.0}/tests/__init__.py +0 -0
  18. {weaviate_haystack-2.2.1 → weaviate_haystack-4.0.0}/tests/conftest.py +0 -0
  19. {weaviate_haystack-2.2.1 → weaviate_haystack-4.0.0}/tests/test_auth.py +0 -0
  20. {weaviate_haystack-2.2.1 → weaviate_haystack-4.0.0}/tests/test_bm25_retriever.py +0 -0
  21. {weaviate_haystack-2.2.1 → weaviate_haystack-4.0.0}/tests/test_embedding_retriever.py +0 -0
  22. {weaviate_haystack-2.2.1 → weaviate_haystack-4.0.0}/tests/test_files/robot1.jpg +0 -0
  23. {weaviate_haystack-2.2.1 → weaviate_haystack-4.0.0}/tests/test_filters.py +0 -0
@@ -1,6 +1,12 @@
1
1
  # Changelog
2
2
 
3
- ## [unreleased]
3
+ ## [integrations/weaviate-v3.0.0] - 2024-09-12
4
+
5
+ ### ⚙️ Miscellaneous Tasks
6
+
7
+ - Weaviate - remove legacy filter support (#1070)
8
+
9
+ ## [integrations/weaviate-v2.2.1] - 2024-09-07
4
10
 
5
11
  ### 🚀 Features
6
12
 
@@ -10,6 +16,12 @@
10
16
 
11
17
  - Weaviate filter error (#811)
12
18
  - Fix connection to Weaviate Cloud Service (#624)
19
+ - Pin weaviate-client (#1046)
20
+ - Weaviate - fix connection issues with some WCS URLs (#1058)
21
+
22
+ ### 🧪 Testing
23
+
24
+ - Do not retry tests in `hatch run test` command (#954)
13
25
 
14
26
  ### ⚙️ Miscellaneous Tasks
15
27
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: weaviate-haystack
3
- Version: 2.2.1
3
+ Version: 4.0.0
4
4
  Summary: An integration of Weaviate vector database with Haystack
5
5
  Project-URL: Source, https://github.com/deepset-ai/haystack-core-integrations
6
6
  Project-URL: Documentation, https://github.com/deepset-ai/haystack-core-integrations/blob/main/integrations/weaviate/README.md
@@ -18,11 +18,11 @@ Classifier: Programming Language :: Python :: 3.11
18
18
  Classifier: Programming Language :: Python :: 3.12
19
19
  Classifier: Programming Language :: Python :: Implementation :: CPython
20
20
  Classifier: Programming Language :: Python :: Implementation :: PyPy
21
- Requires-Python: >=3.8
21
+ Requires-Python: >=3.9
22
22
  Requires-Dist: haystack-ai
23
23
  Requires-Dist: haystack-pydoc-tools
24
24
  Requires-Dist: python-dateutil
25
- Requires-Dist: weaviate-client>=4.0
25
+ Requires-Dist: weaviate-client>=4.9
26
26
  Description-Content-Type: text/markdown
27
27
 
28
28
  # weaviate-haystack
@@ -7,7 +7,7 @@ name = "weaviate-haystack"
7
7
  dynamic = ["version"]
8
8
  description = "An integration of Weaviate vector database with Haystack"
9
9
  readme = "README.md"
10
- requires-python = ">=3.8"
10
+ requires-python = ">=3.9"
11
11
  license = "Apache-2.0"
12
12
  keywords = []
13
13
  authors = [{ name = "deepset GmbH", email = "info@deepset.ai" }]
@@ -25,7 +25,7 @@ classifiers = [
25
25
  ]
26
26
  dependencies = [
27
27
  "haystack-ai",
28
- "weaviate-client>=4.0",
28
+ "weaviate-client>=4.9",
29
29
  "haystack-pydoc-tools",
30
30
  "python-dateutil",
31
31
  ]
@@ -47,6 +47,7 @@ root = "../.."
47
47
  git_describe_command = 'git describe --tags --match="integrations/weaviate-v[0-9]*"'
48
48
 
49
49
  [tool.hatch.envs.default]
50
+ installer = "uv"
50
51
  dependencies = ["coverage[toml]>=6.5", "pytest", "pytest-rerunfailures", "ipython"]
51
52
  [tool.hatch.envs.default.scripts]
52
53
  test = "pytest {args:tests}"
@@ -61,12 +62,13 @@ docs = ["pydoc-markdown pydoc/config.yml"]
61
62
  python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
62
63
 
63
64
  [tool.hatch.envs.lint]
65
+ installer = "uv"
64
66
  detached = true
65
- dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
67
+ dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
66
68
  [tool.hatch.envs.lint.scripts]
67
69
  typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
68
- style = ["ruff check {args:. --exclude tests/}", "black --check --diff {args:.}"]
69
- fmt = ["black {args:.}", "ruff --fix {args:. --exclude tests/}", "style"]
70
+ style = ["ruff check {args:}", "black --check --diff {args:.}"]
71
+ fmt = ["black {args:.}", "ruff check --fix {args:}", "style"]
70
72
  all = ["style", "typing"]
71
73
 
72
74
  [tool.black]
@@ -77,7 +79,9 @@ skip-string-normalization = true
77
79
  [tool.ruff]
78
80
  target-version = "py38"
79
81
  line-length = 120
80
- lint.select = [
82
+
83
+ [tool.ruff.lint]
84
+ select = [
81
85
  "A",
82
86
  "ARG",
83
87
  "B",
@@ -104,7 +108,7 @@ lint.select = [
104
108
  "W",
105
109
  "YTT",
106
110
  ]
107
- lint.ignore = [
111
+ ignore = [
108
112
  # Allow non-abstract empty methods in abstract base classes
109
113
  "B027",
110
114
  # Allow boolean positional values in function calls, like `dict.get(... True)`
@@ -120,13 +124,13 @@ lint.ignore = [
120
124
  "PLR0913",
121
125
  "PLR0915",
122
126
  ]
123
- lint.unfixable = [
127
+ unfixable = [
124
128
  # Don't touch unused imports
125
129
  "F401",
126
130
  ]
127
131
 
128
132
  [tool.ruff.lint.isort]
129
- known-first-party = ["src"]
133
+ known-first-party = ["haystack_integrations"]
130
134
 
131
135
  [tool.ruff.lint.flake8-tidy-imports]
132
136
  ban-relative-imports = "parents"
@@ -12,7 +12,6 @@ from haystack.core.serialization import default_from_dict, default_to_dict
12
12
  from haystack.dataclasses.document import Document
13
13
  from haystack.document_stores.errors import DocumentStoreError, DuplicateDocumentError
14
14
  from haystack.document_stores.types.policy import DuplicatePolicy
15
- from haystack.utils.filters import convert
16
15
 
17
16
  import weaviate
18
17
  from weaviate.collections.classes.data import DataObject
@@ -388,7 +387,8 @@ class WeaviateDocumentStore:
388
387
  :returns: A list of Documents that match the given filters.
389
388
  """
390
389
  if filters and "operator" not in filters and "conditions" not in filters:
391
- filters = convert(filters)
390
+ msg = "Invalid filter syntax. See https://docs.haystack.deepset.ai/docs/metadata-filtering for details."
391
+ raise ValueError(msg)
392
392
 
393
393
  result = []
394
394
  if filters:
@@ -265,6 +265,7 @@ class TestWeaviateDocumentStore(CountDocumentsTest, WriteDocumentsTest, DeleteDo
265
265
  "session_pool_connections": 20,
266
266
  "session_pool_maxsize": 100,
267
267
  "session_pool_max_retries": 3,
268
+ "session_pool_timeout": 5,
268
269
  },
269
270
  "proxies": {"http": "http://proxy:1234", "https": None, "grpc": None},
270
271
  "timeout": [30, 90],
@@ -302,6 +303,7 @@ class TestWeaviateDocumentStore(CountDocumentsTest, WriteDocumentsTest, DeleteDo
302
303
  "connection": {
303
304
  "session_pool_connections": 20,
304
305
  "session_pool_maxsize": 20,
306
+ "session_pool_timeout": 5,
305
307
  },
306
308
  "proxies": {"http": "http://proxy:1234"},
307
309
  "timeout": [10, 60],
@@ -338,6 +340,7 @@ class TestWeaviateDocumentStore(CountDocumentsTest, WriteDocumentsTest, DeleteDo
338
340
  assert document_store._embedded_options.grpc_port == DEFAULT_GRPC_PORT
339
341
  assert document_store._additional_config.connection.session_pool_connections == 20
340
342
  assert document_store._additional_config.connection.session_pool_maxsize == 20
343
+ assert document_store._additional_config.connection.session_pool_timeout == 5
341
344
 
342
345
  def test_to_data_object(self, document_store, test_files_path):
343
346
  doc = Document(content="test doc")
@@ -660,15 +663,6 @@ class TestWeaviateDocumentStore(CountDocumentsTest, WriteDocumentsTest, DeleteDo
660
663
  with pytest.raises(ValueError):
661
664
  document_store._embedding_retrieval(query_embedding=[], distance=0.1, certainty=0.1)
662
665
 
663
- def test_filter_documents_with_legacy_filters(self, document_store):
664
- docs = []
665
- for index in range(10):
666
- docs.append(Document(content="This is some content", meta={"index": index}))
667
- document_store.write_documents(docs)
668
- result = document_store.filter_documents({"content": {"$eq": "This is some content"}})
669
-
670
- assert len(result) == 10
671
-
672
666
  def test_filter_documents_below_default_limit(self, document_store):
673
667
  docs = []
674
668
  for index in range(9998):