Skip to content

Commit efc1d8e

Browse files
authored
Merge branch 'main' into github_repo_forker_tool_integration
2 parents 549a548 + be8d028 commit efc1d8e

50 files changed

Lines changed: 586 additions & 365 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.

.github/workflows/llama_cpp.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,9 @@ jobs:
5050
- name: Install Hatch
5151
run: pip install --upgrade hatch
5252

53-
# TODO: Once this integration is properly typed, use hatch run test:types
54-
# https://github.com/deepset-ai/haystack-core-integrations/issues/1771
5553
- name: Lint
5654
if: matrix.python-version == '3.9' && runner.os == 'Linux'
57-
run: hatch run fmt-check && hatch run lint:typing
55+
run: hatch run fmt-check && hatch run test:types
5856

5957
- name: Generate docs
6058
if: matrix.python-version == '3.9' && runner.os == 'Linux'

.github/workflows/mongodb_atlas.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,9 @@ jobs:
4646
- name: Install Hatch
4747
run: pip install --upgrade hatch
4848

49-
# TODO: Once this integration is properly typed, use hatch run test:types
50-
# https://github.com/deepset-ai/haystack-core-integrations/issues/1771
5149
- name: Lint
5250
if: matrix.python-version == '3.9' && runner.os == 'Linux'
53-
run: hatch run fmt-check && hatch run lint:typing
51+
run: hatch run fmt-check && hatch run test:types
5452

5553
- name: Generate docs
5654
if: matrix.python-version == '3.9' && runner.os == 'Linux'

.github/workflows/nvidia.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,9 @@ jobs:
5151
- name: Install Hatch
5252
run: pip install --upgrade hatch
5353

54-
# TODO: Once this integration is properly typed, use hatch run test:types
55-
# https://github.com/deepset-ai/haystack-core-integrations/issues/1771
5654
- name: Lint
5755
if: matrix.python-version == '3.9' && runner.os == 'Linux'
58-
run: hatch run fmt-check && hatch run lint:typing
56+
run: hatch run fmt-check && hatch run test:types
5957

6058
- name: Generate docs
6159
if: matrix.python-version == '3.9' && runner.os == 'Linux'

.github/workflows/weaviate.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,9 @@ jobs:
4444
- name: Install Hatch
4545
run: pip install --upgrade hatch
4646

47-
# TODO: Once this integration is properly typed, use hatch run test:types
48-
# https://github.com/deepset-ai/haystack-core-integrations/issues/1771
4947
- name: Lint
5048
if: matrix.python-version == '3.9' && runner.os == 'Linux'
51-
run: hatch run fmt-check && hatch run lint:typing
49+
run: hatch run fmt-check && hatch run test:types
5250

5351
- name: Run Weaviate container
5452
run: docker compose up -d

integrations/astra/src/haystack_integrations/document_stores/astra/astra_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ def __init__(
144144

145145
def query(
146146
self,
147+
*,
147148
vector: Optional[List[float]] = None,
148149
query_filter: Optional[Dict[str, Union[str, float, int, bool, List, dict]]] = None,
149150
top_k: Optional[int] = None,
@@ -317,6 +318,7 @@ def update_document(self, document: Dict, id_key: str):
317318

318319
def delete(
319320
self,
321+
*,
320322
ids: Optional[List[str]] = None,
321323
delete_all: Optional[bool] = None,
322324
filters: Optional[Dict[str, Union[str, float, int, bool, List, dict]]] = None,

integrations/astra/src/haystack_integrations/document_stores/astra/document_store.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,12 @@ def search(
392392

393393
return result
394394

395-
def delete_documents(self, document_ids: Optional[List[str]] = None, delete_all: Optional[bool] = None) -> None:
395+
def delete_documents(
396+
self,
397+
document_ids: Optional[List[str]] = None,
398+
*,
399+
delete_all: Optional[bool] = None,
400+
) -> None:
396401
"""
397402
Deletes documents from the document store.
398403

integrations/astra/tests/test_document_store.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# SPDX-FileCopyrightText: 2023-present Anant Corporation <support@anant.us>
22
#
33
# SPDX-License-Identifier: Apache-2.0
4+
import operator
45
import os
56
from typing import List
67
from unittest import mock
@@ -78,8 +79,6 @@ def assert_documents_are_equal(self, received: List[Document], expected: List[Do
7879
This can happen for example when the Document Store sets a score to returned Documents.
7980
Since we can't know what the score will be, we can't compare the Documents reliably.
8081
"""
81-
import operator
82-
8382
received.sort(key=operator.attrgetter("id"))
8483
expected.sort(key=operator.attrgetter("id"))
8584
assert received == expected

integrations/google_genai/tests/test_chat_generator.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
from haystack.tools import Tool, Toolset
1010
from haystack.utils.auth import Secret
1111

12-
from haystack_integrations.components.generators.google_genai import GoogleGenAIChatGenerator
12+
from haystack_integrations.components.generators.google_genai.chat.chat_generator import (
13+
GoogleGenAIChatGenerator,
14+
_convert_message_to_google_genai_format,
15+
)
1316

1417

1518
@pytest.fixture
@@ -112,11 +115,6 @@ def test_convert_message_to_google_genai_format_complex(self):
112115
Test that the GoogleGenAIChatGenerator can convert a complex sequence of ChatMessages to Google GenAI format.
113116
In particular, we check that different tool results are handled properly in sequence.
114117
"""
115-
from haystack.dataclasses import ToolCall
116-
117-
from haystack_integrations.components.generators.google_genai.chat.chat_generator import (
118-
_convert_message_to_google_genai_format,
119-
)
120118

121119
messages = [
122120
ChatMessage.from_system("You are good assistant"),

integrations/llama_cpp/CHANGELOG.md

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

3+
## [integrations/llama_cpp-v1.1.0] - 2025-06-19
4+
5+
### 🐛 Bug Fixes
6+
7+
- Fix llama.cpp types; add py.typed; Toolset support (#1973)
8+
9+
### 🧪 Testing
10+
11+
- Test llama.cpp with python 3.12 (#1601)
12+
13+
### ⚙️ CI
14+
15+
- Review testing workflows (#1541)
16+
17+
### 🧹 Chores
18+
19+
- Remove Python 3.8 support (#1421)
20+
- Use Haystack logging across integrations (#1484)
21+
- Update ChatGenerators with `deserialize_tools_or_toolset_inplace` (#1623)
22+
- Align core-integrations Hatch scripts (#1898)
23+
24+
### 🌀 Miscellaneous
25+
26+
- Chore: remove `jsonschema` dependency from `default` environment (#1368)
27+
328
## [integrations/llama_cpp-v1.0.0] - 2025-02-07
429

530
### 🚀 Features

integrations/llama_cpp/pyproject.toml

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ classifiers = [
2626
"Programming Language :: Python :: Implementation :: CPython",
2727
"Programming Language :: Python :: Implementation :: PyPy",
2828
]
29-
dependencies = ["haystack-ai>=2.9.0", "llama-cpp-python>=0.2.87"]
29+
dependencies = ["haystack-ai>=2.13.0", "llama-cpp-python>=0.2.87"]
3030

3131
[project.urls]
3232
Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/llama_cpp#readme"
@@ -68,18 +68,13 @@ unit = 'pytest -m "not integration" {args:tests}'
6868
integration = 'pytest -m "integration" {args:tests}'
6969
all = 'pytest {args:tests}'
7070
cov-retry = 'all --cov=haystack_integrations --reruns 3 --reruns-delay 30 -x'
71-
types = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
71+
types = "mypy -p haystack_integrations.components.generators.llama_cpp {args}"
7272

73-
# TODO: remove lint environment once this integration is properly typed
74-
# test environment should be used instead
75-
# https://github.com/deepset-ai/haystack-core-integrations/issues/1771
76-
[tool.hatch.envs.lint]
77-
installer = "uv"
78-
detached = true
79-
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
80-
81-
[tool.hatch.envs.lint.scripts]
82-
typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
73+
[tool.mypy]
74+
install_types = true
75+
non_interactive = true
76+
check_untyped_defs = true
77+
disallow_incomplete_defs = true
8378

8479
[tool.hatch.metadata]
8580
allow-direct-references = true
@@ -169,7 +164,3 @@ markers = [
169164
"integration: marks tests as slow (deselect with '-m \"not integration\"')",
170165
]
171166
addopts = ["--import-mode=importlib"]
172-
173-
[[tool.mypy.overrides]]
174-
module = ["haystack.*", "haystack_integrations.*", "pytest.*", "llama_cpp.*"]
175-
ignore_missing_imports = true

0 commit comments

Comments
 (0)