Skip to content

Commit 4b4b96c

Browse files
authored
Merge branch 'main' into chroma_client_settings
2 parents d41ab9c + 49cc809 commit 4b4b96c

82 files changed

Lines changed: 890 additions & 167 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

integrations/aimlapi/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ installer = "uv"
4646
dependencies = ["haystack-pydoc-tools", "ruff"]
4747
[tool.hatch.envs.default.scripts]
4848
docs = ["pydoc-markdown pydoc/config_docusaurus.yml"]
49-
fmt = "ruff check --fix {args} && ruff format {args}"
49+
fmt = "ruff check --fix {args}; ruff format {args}"
5050
fmt-check = "ruff check {args} && ruff format --check {args}"
5151

5252
[tool.hatch.envs.test]

integrations/amazon_bedrock/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Changelog
22

3+
## [integrations/amazon_bedrock-v5.4.0] - 2026-01-08
4+
5+
### 🚀 Features
6+
7+
- Update `S3Downloader` to auto call run `warm_up` on first run instead raising error (#2673)
8+
9+
### 🧹 Chores
10+
11+
- Make fmt command more forgiving (#2671)
12+
13+
### 🌀 Miscellaneous
14+
15+
- Fix: Fix doc links (#2661)
16+
317
## [integrations/amazon_bedrock-v5.3.1] - 2025-12-19
418

519
### 🐛 Bug Fixes

integrations/amazon_bedrock/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ dependencies = ["haystack-pydoc-tools", "ruff"]
4747

4848
[tool.hatch.envs.default.scripts]
4949
docs = ["pydoc-markdown pydoc/config_docusaurus.yml"]
50-
fmt = "ruff check --fix {args} && ruff format {args}"
50+
fmt = "ruff check --fix {args}; ruff format {args}"
5151
fmt-check = "ruff check {args} && ruff format --check {args}"
5252

5353
[tool.hatch.envs.test]

integrations/amazon_bedrock/src/haystack_integrations/components/downloaders/s3/s3_downloader.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,7 @@ def run(
142142
"""
143143

144144
if self._storage is None:
145-
msg = f"The component {self.__class__.__name__} was not warmed up. Call 'warm_up()' before calling run()."
146-
raise RuntimeError(msg)
145+
self.warm_up()
147146

148147
filtered_documents = self._filter_documents_by_extensions(documents) if self.file_extensions else documents
149148

integrations/amazon_bedrock/tests/test_s3_downloader.py

Lines changed: 9 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ def test_to_dict_with_parameters(self, tmp_path):
129129

130130
def test_run(self, tmp_path, mock_s3_storage, mock_boto3_session):
131131
d = S3Downloader(file_root_path=str(tmp_path))
132-
S3Downloader.warm_up(d)
133132
d._storage = mock_s3_storage
134133

135134
docs = [
@@ -141,7 +140,6 @@ def test_run(self, tmp_path, mock_s3_storage, mock_boto3_session):
141140

142141
def test_run_with_extensions(self, tmp_path, mock_s3_storage, mock_boto3_session):
143142
d = S3Downloader(file_root_path=str(tmp_path), file_extensions=[".txt"])
144-
S3Downloader.warm_up(d)
145143
d._storage = mock_s3_storage
146144

147145
docs = [
@@ -155,25 +153,19 @@ def test_run_with_extensions(self, tmp_path, mock_s3_storage, mock_boto3_session
155153

156154
def test_run_with_input_file_meta_key(self, tmp_path, mock_s3_storage, mock_boto3_session):
157155
d = S3Downloader(file_root_path=str(tmp_path), file_name_meta_key="custom_file_key")
158-
S3Downloader.warm_up(d)
159156
d._storage = mock_s3_storage
160157

161-
docs = [
162-
Document(meta={"file_id": str(uuid4()), "custom_file_key": "a.txt"}),
163-
]
158+
docs = [Document(meta={"file_id": str(uuid4()), "custom_file_key": "a.txt"})]
164159

165160
out = d.run(documents=docs)
166161
assert len(out["documents"]) == 1
167162
assert out["documents"][0].meta["custom_file_key"] == "a.txt"
168163

169164
def test_run_with_s3_key_generation_function(self, tmp_path, mock_s3_storage, mock_boto3_session):
170165
d = S3Downloader(file_root_path=str(tmp_path), s3_key_generation_function=s3_key_generation_function)
171-
S3Downloader.warm_up(d)
172166
d._storage = mock_s3_storage
173167

174-
docs = [
175-
Document(meta={"file_id": str(uuid4()), "file_name": "a.txt"}),
176-
]
168+
docs = [Document(meta={"file_id": str(uuid4()), "file_name": "a.txt"})]
177169
out = d.run(documents=docs)
178170
assert len(out["documents"]) == 1
179171
assert out["documents"][0].meta["file_name"] == "a.txt"
@@ -189,7 +181,6 @@ def test_run_with_s3_key_generation_function_and_file_extensions(
189181
s3_key_generation_function=s3_key_generation_function,
190182
file_extensions=[".txt"],
191183
)
192-
S3Downloader.warm_up(d)
193184
d._storage = mock_s3_storage
194185

195186
docs = [
@@ -210,8 +201,6 @@ def test_run_with_s3_key_generation_function_and_file_extensions(
210201
def test_live_run(self, tmp_path, monkeypatch):
211202
d = S3Downloader(file_root_path=str(tmp_path))
212203
monkeypatch.setenv("S3_DOWNLOADER_PREFIX", "")
213-
S3Downloader.warm_up(d)
214-
215204
docs = [
216205
Document(meta={"file_id": str(uuid4()), "file_name": "text-sample.txt"}),
217206
Document(meta={"file_id": str(uuid4()), "file_name": "document-sample.pdf"}),
@@ -229,9 +218,7 @@ def test_live_run(self, tmp_path, monkeypatch):
229218
)
230219
def test_live_run_with_no_documents(self, tmp_path):
231220
d = S3Downloader(file_root_path=str(tmp_path))
232-
S3Downloader.warm_up(d)
233-
docs = []
234-
out = d.run(documents=docs)
221+
out = d.run(documents=[])
235222
assert len(out["documents"]) == 0
236223

237224
@pytest.mark.integration
@@ -247,10 +234,8 @@ def test_live_run_with_no_documents(self, tmp_path):
247234
def test_live_run_with_custom_meta_key(self, tmp_path, monkeypatch):
248235
d = S3Downloader(file_root_path=str(tmp_path), file_name_meta_key="custom_name")
249236
monkeypatch.setenv("S3_DOWNLOADER_PREFIX", "")
250-
S3Downloader.warm_up(d)
251-
docs = [
252-
Document(meta={"custom_name": "text-sample.txt"}),
253-
]
237+
d.warm_up()
238+
docs = [Document(meta={"custom_name": "text-sample.txt"})]
254239
out = d.run(documents=docs)
255240
assert len(out["documents"]) == 1
256241
assert out["documents"][0].meta["custom_name"] == "text-sample.txt"
@@ -263,11 +248,8 @@ def test_live_run_with_custom_meta_key(self, tmp_path, monkeypatch):
263248
def test_live_run_with_prefix(self, tmp_path, monkeypatch):
264249
d = S3Downloader(file_root_path=str(tmp_path))
265250
monkeypatch.setenv("S3_DOWNLOADER_PREFIX", "subfolder/")
266-
267-
S3Downloader.warm_up(d)
268-
docs = [
269-
Document(meta={"file_name": "employees.json"}),
270-
]
251+
d.warm_up()
252+
docs = [Document(meta={"file_name": "employees.json"})]
271253
out = d.run(documents=docs)
272254
assert len(out["documents"]) == 1
273255
assert out["documents"][0].meta["file_name"] == "employees.json"
@@ -286,10 +268,8 @@ def test_live_run_with_s3_key_generation_function_and_file_extensions(self, tmp_
286268
file_name_meta_key="file_name",
287269
s3_key_generation_function=s3_key_generation_function,
288270
)
289-
S3Downloader.warm_up(d)
290-
docs = [
291-
Document(meta={"file_name": "dog.jpg"}),
292-
]
271+
d.warm_up()
272+
docs = [Document(meta={"file_name": "dog.jpg"})]
293273
out = d.run(documents=docs)
294274
assert len(out["documents"]) == 1
295275
assert out["documents"][0].meta["file_name"] == "dog.jpg"

integrations/amazon_sagemaker/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ installer = "uv"
4949
dependencies = ["haystack-pydoc-tools", "ruff"]
5050
[tool.hatch.envs.default.scripts]
5151
docs = ["pydoc-markdown pydoc/config_docusaurus.yml"]
52-
fmt = "ruff check --fix {args} && ruff format {args}"
52+
fmt = "ruff check --fix {args}; ruff format {args}"
5353
fmt-check = "ruff check {args} && ruff format --check {args}"
5454

5555
[tool.hatch.envs.test]

integrations/anthropic/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ dependencies = ["haystack-pydoc-tools", "ruff"]
4747

4848
[tool.hatch.envs.default.scripts]
4949
docs = ["pydoc-markdown pydoc/config_docusaurus.yml"]
50-
fmt = "ruff check --fix {args} && ruff format {args}"
50+
fmt = "ruff check --fix {args}; ruff format {args}"
5151
fmt-check = "ruff check {args} && ruff format --check {args}"
5252

5353
[tool.hatch.envs.test]

integrations/astra/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ installer = "uv"
4646
dependencies = ["haystack-pydoc-tools", "ruff"]
4747
[tool.hatch.envs.default.scripts]
4848
docs = ["pydoc-markdown pydoc/config_docusaurus.yml"]
49-
fmt = "ruff check --fix {args} && ruff format {args}"
49+
fmt = "ruff check --fix {args}; ruff format {args}"
5050
fmt-check = "ruff check {args} && ruff format --check {args}"
5151

5252
[tool.hatch.envs.test]

integrations/azure_ai_search/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ dependencies = ["haystack-pydoc-tools", "ruff"]
4747

4848
[tool.hatch.envs.default.scripts]
4949
docs = ["pydoc-markdown pydoc/config_docusaurus.yml"]
50-
fmt = "ruff check --fix {args} && ruff format {args}"
50+
fmt = "ruff check --fix {args}; ruff format {args}"
5151
fmt-check = "ruff check {args} && ruff format --check {args}"
5252

5353
[tool.hatch.envs.test]

integrations/chroma/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ dependencies = ["haystack-pydoc-tools", "ruff"]
4747

4848
[tool.hatch.envs.default.scripts]
4949
docs = ["pydoc-markdown pydoc/config_docusaurus.yml"]
50-
fmt = "ruff check --fix {args} && ruff format {args}"
50+
fmt = "ruff check --fix {args}; ruff format {args}"
5151
fmt-check = "ruff check {args} && ruff format --check {args}"
5252

5353
[tool.hatch.envs.test]

0 commit comments

Comments
 (0)