Skip to content

Commit 07e6c81

Browse files
committed
10 more
1 parent 4df9021 commit 07e6c81

17 files changed

Lines changed: 269 additions & 181 deletions

File tree

integrations/azure_ai_search/pyproject.toml

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,31 +42,41 @@ root = "../.."
4242
git_describe_command = 'git describe --tags --match="integrations/azure_ai_search-v[0-9]*"'
4343

4444
[tool.hatch.envs.default]
45-
dependencies = [
46-
"coverage[toml]>=6.5",
47-
"pytest",
48-
"pytest-rerunfailures",
49-
"pytest-xdist",
50-
"haystack-pydoc-tools",
51-
]
45+
installer = "uv"
46+
dependencies = ["haystack-pydoc-tools", "ruff"]
5247

5348
[tool.hatch.envs.default.scripts]
54-
test = "pytest {args:tests}"
55-
test-cov = "coverage run -m pytest {args:tests}"
56-
test-cov-retry = "test-cov --reruns 3 --reruns-delay 30 -x"
57-
cov-report = ["- coverage combine", "coverage report"]
58-
cov = ["test-cov", "cov-report"]
59-
cov-retry = ["test-cov-retry", "cov-report"]
6049
docs = ["pydoc-markdown pydoc/config.yml"]
50+
fmt = "ruff check --fix {args} && ruff format {args}"
51+
fmt-check = "ruff check {args} && ruff format --check {args}"
52+
53+
[tool.hatch.envs.test]
54+
dependencies = [
55+
"pytest",
56+
"pytest-asyncio",
57+
"pytest-cov",
58+
"pytest-rerunfailures",
59+
"mypy",
60+
"pip"
61+
]
62+
63+
[tool.hatch.envs.test.scripts]
64+
unit = 'pytest -m "not integration" {args:tests}'
65+
integration = 'pytest -m "integration" {args:tests}'
66+
all = 'pytest {args:tests}'
67+
cov-retry = 'all --cov=haystack_integrations --reruns 3 --reruns-delay 30 -x'
6168

69+
types = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
70+
71+
# TODO: remove lint environment once this integration is properly typed
72+
# test environment should be used instead
73+
# https://github.com/deepset-ai/haystack-core-integrations/issues/1771
6274
[tool.hatch.envs.lint]
6375
detached = true
6476
dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
77+
6578
[tool.hatch.envs.lint.scripts]
6679
typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
67-
style = ["ruff check {args:src/}", "black --check --diff {args:.}"]
68-
fmt = ["black {args:.}", "ruff check --fix {args:.}", "style"]
69-
all = ["style", "typing"]
7080

7181
[tool.hatch.metadata]
7282
allow-direct-references = true
@@ -138,7 +148,7 @@ ban-relative-imports = "parents"
138148

139149
[tool.ruff.lint.per-file-ignores]
140150
# Tests can use magic values, assertions, and relative imports
141-
"tests/**/*" = ["PLR2004", "S101", "TID252", "S311"]
151+
"tests/**/*" = ["PLR2004", "S101", "TID252", "S311", "T201"]
142152
"example/**/*" = ["T201"]
143153

144154
[tool.coverage.run]

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@
8585

8686

8787
class AzureAISearchDocumentStore:
88-
8988
def __init__(
9089
self,
9190
*,

integrations/azure_ai_search/tests/test_bm25_retriever.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ def test_run_time_params():
154154
)
155155
@pytest.mark.integration
156156
class TestRetriever:
157-
158157
def test_run(self, document_store: AzureAISearchDocumentStore):
159158
docs = [Document(id="1", content="Test document")]
160159
document_store.write_documents(docs)

integrations/azure_ai_search/tests/test_embedding_retriever.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ def test_run_time_params():
169169
)
170170
@pytest.mark.integration
171171
class TestRetriever:
172-
173172
def test_run(self, document_store: AzureAISearchDocumentStore):
174173
docs = [Document(id="1")]
175174
document_store.write_documents(docs)

integrations/azure_ai_search/tests/test_hybrid_retriever.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ def test_run_time_params():
175175
)
176176
@pytest.mark.integration
177177
class TestRetriever:
178-
179178
def test_run(self, document_store: AzureAISearchDocumentStore):
180179
docs = [Document(id="1")]
181180
document_store.write_documents(docs)

integrations/github/pyproject.toml

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -43,36 +43,41 @@ git_describe_command = 'git describe --tags --match="integrations/github-v[0-9]*
4343

4444
[tool.hatch.envs.default]
4545
installer = "uv"
46-
dependencies = [
47-
"coverage[toml]>=6.5",
48-
"pytest",
49-
"pytest-rerunfailures",
50-
"haystack-pydoc-tools",
51-
"pytz",
52-
]
53-
46+
dependencies = ["haystack-pydoc-tools", "ruff"]
47+
5448
[tool.hatch.envs.default.scripts]
55-
test = "pytest {args:tests}"
56-
test-cov = "coverage run -m pytest {args:tests}"
57-
test-cov-retry = "test-cov --reruns 3 --reruns-delay 30 -x"
58-
cov-report = ["- coverage combine", "coverage report"]
59-
cov = ["test-cov", "cov-report"]
60-
cov-retry = ["test-cov-retry", "cov-report"]
6149
docs = ["pydoc-markdown pydoc/config.yml"]
62-
fix = "ruff check --fix"
50+
fmt = "ruff check --fix {args} && ruff format {args}"
51+
fmt-check = "ruff check {args} && ruff format --check {args}"
52+
53+
[tool.hatch.envs.test]
54+
dependencies = [
55+
"pytest",
56+
"pytest-asyncio",
57+
"pytest-cov",
58+
"pytest-rerunfailures",
59+
"mypy",
60+
"pip"
61+
]
6362

63+
[tool.hatch.envs.test.scripts]
64+
unit = 'pytest -m "not integration" {args:tests}'
65+
integration = 'pytest -m "integration" {args:tests}'
66+
all = 'pytest {args:tests}'
67+
cov-retry = 'all --cov=haystack_integrations --reruns 3 --reruns-delay 30 -x'
68+
69+
types = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
70+
71+
# TODO: remove lint environment once this integration is properly typed
72+
# test environment should be used instead
73+
# https://github.com/deepset-ai/haystack-core-integrations/issues/1771
6474
[tool.hatch.envs.lint]
6575
installer = "uv"
6676
detached = true
6777
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
78+
6879
[tool.hatch.envs.lint.scripts]
6980
typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
70-
style = [
71-
"ruff check {args:}",
72-
"black --check --diff {args:.}",
73-
]
74-
fmt = ["black {args:.}", "ruff check --fix {args:}", "style"]
75-
all = ["style", "typing"]
7681

7782
[tool.black]
7883
target-version = ["py38"]

integrations/google_ai/pyproject.toml

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,31 +43,41 @@ git_describe_command = 'git describe --tags --match="integrations/google_ai-v[0-
4343

4444
[tool.hatch.envs.default]
4545
installer = "uv"
46-
dependencies = [
47-
"coverage[toml]>=6.5",
48-
"pytest",
49-
"pytest-asyncio",
50-
"pytest-rerunfailures",
51-
"haystack-pydoc-tools",
52-
]
46+
dependencies = ["haystack-pydoc-tools", "ruff"]
47+
5348
[tool.hatch.envs.default.scripts]
54-
test = "pytest {args:tests}"
55-
test-cov = "coverage run -m pytest {args:tests}"
56-
test-cov-retry = "test-cov --reruns 3 --reruns-delay 30 -x"
57-
cov-report = ["- coverage combine", "coverage report"]
58-
cov = ["test-cov", "cov-report"]
59-
cov-retry = ["test-cov-retry", "cov-report"]
6049
docs = ["pydoc-markdown pydoc/config.yml"]
50+
fmt = "ruff check --fix {args} && ruff format {args}"
51+
fmt-check = "ruff check {args} && ruff format --check {args}"
6152

53+
[tool.hatch.envs.test]
54+
dependencies = [
55+
"pytest",
56+
"pytest-asyncio",
57+
"pytest-cov",
58+
"pytest-rerunfailures",
59+
"mypy",
60+
"pip"
61+
]
62+
63+
[tool.hatch.envs.test.scripts]
64+
unit = 'pytest -m "not integration" {args:tests}'
65+
integration = 'pytest -m "integration" {args:tests}'
66+
all = 'pytest {args:tests}'
67+
cov-retry = 'all --cov=haystack_integrations --reruns 3 --reruns-delay 30 -x'
68+
69+
types = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
70+
71+
# TODO: remove lint environment once this integration is properly typed
72+
# test environment should be used instead
73+
# https://github.com/deepset-ai/haystack-core-integrations/issues/1771
6274
[tool.hatch.envs.lint]
6375
installer = "uv"
6476
detached = true
6577
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
78+
6679
[tool.hatch.envs.lint.scripts]
6780
typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
68-
style = ["ruff check {args:.}", "black --check --diff {args:.}"]
69-
fmt = ["black {args:.}", "ruff check --fix {args:.}", "style"]
70-
all = ["style", "typing"]
7181

7282
[tool.black]
7383
target-version = ["py38"]

integrations/google_ai/tests/generators/chat/test_chat_gemini.py

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -339,17 +339,17 @@ def test_serde_in_pipeline(self, monkeypatch):
339339
# add outputs_to_string, inputs_from_state and outputs_to_state tool parameters for compatibility with
340340
# haystack-ai>=2.12.0
341341
if hasattr(tool, "outputs_to_string"):
342-
expected_dict["components"]["generator"]["init_parameters"]["tools"][0]["data"][
343-
"outputs_to_string"
344-
] = tool.outputs_to_string
342+
expected_dict["components"]["generator"]["init_parameters"]["tools"][0]["data"]["outputs_to_string"] = (
343+
tool.outputs_to_string
344+
)
345345
if hasattr(tool, "inputs_from_state"):
346-
expected_dict["components"]["generator"]["init_parameters"]["tools"][0]["data"][
347-
"inputs_from_state"
348-
] = tool.inputs_from_state
346+
expected_dict["components"]["generator"]["init_parameters"]["tools"][0]["data"]["inputs_from_state"] = (
347+
tool.inputs_from_state
348+
)
349349
if hasattr(tool, "outputs_to_state"):
350-
expected_dict["components"]["generator"]["init_parameters"]["tools"][0]["data"][
351-
"outputs_to_state"
352-
] = tool.outputs_to_state
350+
expected_dict["components"]["generator"]["init_parameters"]["tools"][0]["data"]["outputs_to_state"] = (
351+
tool.outputs_to_state
352+
)
353353

354354
assert pipeline_dict == expected_dict
355355

@@ -415,7 +415,6 @@ async def test_run_async(self):
415415
@pytest.mark.integration
416416
@pytest.mark.skipif(not os.environ.get("GOOGLE_API_KEY", None), reason="GOOGLE_API_KEY env var not set")
417417
def test_run_with_tools(self, tools):
418-
419418
gemini_chat = GoogleAIGeminiChatGenerator(model="gemini-2.0-flash-exp", tools=tools)
420419
user_message = [ChatMessage.from_user("What is the temperature in celsius in Berlin?")]
421420
response = gemini_chat.run(messages=user_message)
@@ -452,7 +451,6 @@ def test_run_with_tools(self, tools):
452451
@pytest.mark.integration
453452
@pytest.mark.skipif(not os.environ.get("GOOGLE_API_KEY", None), reason="GOOGLE_API_KEY env var not set")
454453
async def test_run_with_tools_async(self, tools):
455-
456454
gemini_chat = GoogleAIGeminiChatGenerator(model="gemini-2.0-flash-exp", tools=tools)
457455
user_message = [ChatMessage.from_user("What is the temperature in celsius in Berlin?")]
458456
response = await gemini_chat.run_async(messages=user_message)
@@ -488,7 +486,6 @@ async def test_run_with_tools_async(self, tools):
488486
@pytest.mark.integration
489487
@pytest.mark.skipif(not os.environ.get("GOOGLE_API_KEY", None), reason="GOOGLE_API_KEY env var not set")
490488
def test_run_with_tools_and_tool_config(self, tools):
491-
492489
def get_population(city: Annotated[str, "the city for which to get the population, e.g. 'Munich'"] = "Munich"):
493490
"""A simple function to get the population for a location."""
494491
return f"Population of {city}: 1,000,000"
@@ -524,7 +521,6 @@ def get_population(city: Annotated[str, "the city for which to get the populatio
524521
@pytest.mark.integration
525522
@pytest.mark.skipif(not os.environ.get("GOOGLE_API_KEY", None), reason="GOOGLE_API_KEY env var not set")
526523
async def test_run_with_tools_and_tool_config_async(self, tools):
527-
528524
def get_population(city: Annotated[str, "the city for which to get the population, e.g. 'Munich'"] = "Munich"):
529525
"""A simple function to get the population for a location."""
530526
return f"Population of {city}: 1,000,000"

integrations/jina/pyproject.toml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,25 +45,41 @@ git_describe_command = 'git describe --tags --match="integrations/jina-v[0-9]*"'
4545

4646
[tool.hatch.envs.default]
4747
installer = "uv"
48-
dependencies = ["coverage[toml]>=6.5", "pytest", "pytest-rerunfailures", "haystack-pydoc-tools"]
48+
dependencies = ["haystack-pydoc-tools", "ruff"]
49+
4950
[tool.hatch.envs.default.scripts]
50-
test = "pytest {args:tests}"
51-
test-cov = "coverage run -m pytest {args:tests}"
52-
test-cov-retry = "test-cov --reruns 3 --reruns-delay 30 -x"
53-
cov-report = ["- coverage combine", "coverage report"]
54-
cov = ["test-cov", "cov-report"]
55-
cov-retry = ["test-cov-retry", "cov-report"]
5651
docs = ["pydoc-markdown pydoc/config.yml"]
52+
fmt = "ruff check --fix {args} && ruff format {args}"
53+
fmt-check = "ruff check {args} && ruff format --check {args}"
54+
55+
[tool.hatch.envs.test]
56+
dependencies = [
57+
"pytest",
58+
"pytest-asyncio",
59+
"pytest-cov",
60+
"pytest-rerunfailures",
61+
"mypy",
62+
"pip"
63+
]
64+
65+
[tool.hatch.envs.test.scripts]
66+
unit = 'pytest -m "not integration" {args:tests}'
67+
integration = 'pytest -m "integration" {args:tests}'
68+
all = 'pytest {args:tests}'
69+
cov-retry = 'all --cov=haystack_integrations --reruns 3 --reruns-delay 30 -x'
5770

71+
types = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
72+
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
5876
[tool.hatch.envs.lint]
5977
installer = "uv"
6078
detached = true
6179
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
80+
6281
[tool.hatch.envs.lint.scripts]
6382
typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
64-
style = ["ruff check {args:}", "black --check --diff {args:.}"]
65-
fmt = ["black {args:.}", "ruff check --fix {args:}", "style"]
66-
all = ["style", "typing"]
6783

6884
[tool.black]
6985
target-version = ["py38"]

integrations/langfuse/pyproject.toml

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -43,23 +43,34 @@ git_describe_command = 'git describe --tags --match="integrations/langfuse-v[0-9
4343

4444
[tool.hatch.envs.default]
4545
installer = "uv"
46-
dependencies = [
47-
"coverage[toml]>=6.5",
48-
"pytest",
49-
"pytest-rerunfailures",
50-
"haystack-pydoc-tools",
51-
"anthropic-haystack",
52-
"cohere-haystack"
53-
]
46+
dependencies = ["haystack-pydoc-tools", "ruff"]
47+
5448
[tool.hatch.envs.default.scripts]
55-
test = "pytest {args:tests}"
56-
test-cov = "coverage run -m pytest {args:tests}"
57-
test-cov-retry = "test-cov --reruns 3 --reruns-delay 30 -x"
58-
cov-report = ["- coverage combine", "coverage report"]
59-
cov = ["test-cov", "cov-report"]
60-
cov-retry = ["test-cov-retry", "cov-report"]
6149
docs = ["pydoc-markdown pydoc/config.yml"]
50+
fmt = "ruff check --fix {args} && ruff format {args}"
51+
fmt-check = "ruff check {args} && ruff format --check {args}"
52+
53+
[tool.hatch.envs.test]
54+
dependencies = [
55+
"pytest",
56+
"pytest-asyncio",
57+
"pytest-cov",
58+
"pytest-rerunfailures",
59+
"mypy",
60+
"pip"
61+
]
62+
63+
[tool.hatch.envs.test.scripts]
64+
unit = 'pytest -m "not integration" {args:tests}'
65+
integration = 'pytest -m "integration" {args:tests}'
66+
all = 'pytest {args:tests}'
67+
cov-retry = 'all --cov=haystack_integrations --reruns 3 --reruns-delay 30 -x'
68+
69+
types = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
6270

71+
# TODO: remove lint environment once this integration is properly typed
72+
# test environment should be used instead
73+
# https://github.com/deepset-ai/haystack-core-integrations/issues/1771
6374
[tool.hatch.envs.lint]
6475
installer = "uv"
6576
detached = true
@@ -72,9 +83,6 @@ dependencies = [
7283

7384
[tool.hatch.envs.lint.scripts]
7485
typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
75-
style = ["ruff check {args:}", "black --check --diff {args:.}"]
76-
fmt = ["black {args:.}", "ruff check --fix {args:}", "style"]
77-
all = ["style", "typing"]
7886

7987
[tool.hatch.metadata]
8088
allow-direct-references = true

0 commit comments

Comments
 (0)