Skip to content

Commit a449872

Browse files
committed
more
1 parent 07e6c81 commit a449872

22 files changed

Lines changed: 304 additions & 230 deletions

File tree

integrations/amazon_sagemaker/pyproject.toml

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -46,31 +46,38 @@ git_describe_command = 'git describe --tags --match="integrations/amazon_sagemak
4646

4747
[tool.hatch.envs.default]
4848
installer = "uv"
49+
dependencies = ["haystack-pydoc-tools", "ruff"]
50+
[tool.hatch.envs.default.scripts]
51+
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]
4956
dependencies = [
50-
"coverage[toml]>=6.5",
51-
"pytest",
52-
"pytest-rerunfailures",
53-
"haystack-pydoc-tools",
57+
"pytest",
58+
"pytest-asyncio",
59+
"pytest-cov",
60+
"pytest-rerunfailures",
61+
"mypy",
62+
"pip"
5463
]
55-
[tool.hatch.envs.default.scripts]
56-
test = "pytest {args:tests}"
57-
test-cov = "coverage run -m pytest {args:tests}"
58-
test-cov-retry = "test-cov --reruns 3 --reruns-delay 30 -x"
59-
cov-report = ["- coverage combine", "coverage report"]
60-
cov = ["test-cov", "cov-report"]
61-
cov-retry = ["test-cov-retry", "cov-report"]
6264

63-
docs = ["pydoc-markdown pydoc/config.yml"]
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'
70+
types = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
6471

72+
# TODO: remove lint environment once this integration is properly typed
73+
# test environment should be used instead
74+
# https://github.com/deepset-ai/haystack-core-integrations/issues/1771
6575
[tool.hatch.envs.lint]
6676
installer = "uv"
6777
detached = true
6878
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
6979
[tool.hatch.envs.lint.scripts]
7080
typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
71-
style = ["ruff check {args:.}", "black --check --diff {args:.}"]
72-
fmt = ["black {args:.}", "ruff check --fix {args:.}", "style"]
73-
all = ["style", "typing"]
7481

7582
[tool.black]
7683
target-version = ["py38"]

integrations/astra/examples/example.py

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -75,31 +75,35 @@
7575
raise ValueError(msg)
7676

7777
logger.info(
78-
f"""filter results: {document_store.filter_documents(
79-
{
80-
"field": "meta",
81-
"operator": "==",
82-
"value": {
83-
"file_path": "/workspace/astra-haystack/examples/data/usr_01.txt",
84-
"source_id": "5b2d27de79bba97da6fc446180d0d99e1024bc7dd6a757037f0934162cfb0916",
85-
},
86-
}
87-
)
88-
}"""
78+
f"""filter results: {
79+
document_store.filter_documents(
80+
{
81+
"field": "meta",
82+
"operator": "==",
83+
"value": {
84+
"file_path": "/workspace/astra-haystack/examples/data/usr_01.txt",
85+
"source_id": "5b2d27de79bba97da6fc446180d0d99e1024bc7dd6a757037f0934162cfb0916",
86+
},
87+
}
88+
)
89+
}"""
8990
)
9091

9192
logger.info(
92-
f"""get_document_by_id {document_store.get_document_by_id(
93-
"92ef055fbae55b2b0fc79d34cbf8a80b0ad7700ca526053223b0cc6d1351df10")}"""
93+
f"""get_document_by_id {
94+
document_store.get_document_by_id("92ef055fbae55b2b0fc79d34cbf8a80b0ad7700ca526053223b0cc6d1351df10")
95+
}"""
9496
)
9597

9698
logger.info(
97-
f"""get_documents_by_ids {document_store.get_documents_by_id(
98-
[
99-
"92ef055fbae55b2b0fc79d34cbf8a80b0ad7700ca526053223b0cc6d1351df10",
100-
"6f2450a51eaa3eeb9239d875402bcfe24b2d3534ff27f26c1f3fc8133b04e756",
101-
]
102-
)}"""
99+
f"""get_documents_by_ids {
100+
document_store.get_documents_by_id(
101+
[
102+
"92ef055fbae55b2b0fc79d34cbf8a80b0ad7700ca526053223b0cc6d1351df10",
103+
"6f2450a51eaa3eeb9239d875402bcfe24b2d3534ff27f26c1f3fc8133b04e756",
104+
]
105+
)
106+
}"""
103107
)
104108

105109
document_store.delete_documents(["92ef055fbae55b2b0fc79d34cbf8a80b0ad7700ca526053223b0cc6d1351df10"])

integrations/astra/pyproject.toml

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,30 +43,38 @@ git_describe_command = 'git describe --tags --match="integrations/astra-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-
]
46+
dependencies = ["haystack-pydoc-tools", "ruff"]
5247
[tool.hatch.envs.default.scripts]
53-
test = "pytest {args:tests}"
54-
test-cov = "coverage run -m pytest {args:tests}"
55-
test-cov-retry = "test-cov --reruns 3 --reruns-delay 30 -x"
56-
cov-report = ["- coverage combine", "coverage report"]
57-
cov = ["test-cov", "cov-report"]
58-
cov-retry = ["test-cov-retry", "cov-report"]
5948
docs = ["pydoc-markdown pydoc/config.yml"]
49+
fmt = "ruff check --fix {args} && ruff format {args}"
50+
fmt-check = "ruff check {args} && ruff format --check {args}"
51+
52+
[tool.hatch.envs.test]
53+
dependencies = [
54+
"pytest",
55+
"pytest-asyncio",
56+
"pytest-cov",
57+
"pytest-rerunfailures",
58+
"mypy",
59+
"pip"
60+
]
61+
62+
[tool.hatch.envs.test.scripts]
63+
unit = 'pytest -m "not integration" {args:tests}'
64+
integration = 'pytest -m "integration" {args:tests}'
65+
all = 'pytest {args:tests}'
66+
cov-retry = 'all --cov=haystack_integrations --reruns 3 --reruns-delay 30 -x'
67+
types = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
6068

69+
# TODO: remove lint environment once this integration is properly typed
70+
# test environment should be used instead
71+
# https://github.com/deepset-ai/haystack-core-integrations/issues/1771
6172
[tool.hatch.envs.lint]
6273
installer = "uv"
6374
detached = true
6475
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
6576
[tool.hatch.envs.lint.scripts]
6677
typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
67-
style = ["ruff check {args:.}", "black --check --diff {args:.}"]
68-
fmt = ["black {args:.}", "ruff check --fix {args:.}", "style"]
69-
all = ["style", "typing"]
7078

7179
[tool.hatch.metadata]
7280
allow-direct-references = true

integrations/astra/tests/test_embedding_retrieval.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
)
1414
@pytest.mark.skipif(os.environ.get("ASTRA_DB_API_ENDPOINT", "") == "", reason="ASTRA_DB_API_ENDPOINT env var not set")
1515
class TestEmbeddingRetrieval:
16-
1716
@pytest.fixture
1817
def document_store(self) -> AstraDocumentStore:
1918
return AstraDocumentStore(

integrations/deepeval/pyproject.toml

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

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

69+
# TODO: remove lint environment once this integration is properly typed
70+
# test environment should be used instead
71+
# https://github.com/deepset-ai/haystack-core-integrations/issues/1771
5672
[tool.hatch.envs.lint]
5773
installer = "uv"
5874
detached = true
5975
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
6076
[tool.hatch.envs.lint.scripts]
6177
typing = "mypy --install-types --non-interactive {args:src/}"
62-
style = ["ruff check {args:.}", "black --check --diff {args:.}"]
63-
fmt = ["black {args:.}", "ruff check --fix {args:.}", "style"]
64-
all = ["style", "typing"]
6578

6679
[tool.black]
6780
target-version = ["py38"]

integrations/deepeval/src/haystack_integrations/components/evaluators/deepeval/metrics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def _validate_input_elements(**kwargs):
171171

172172
same_length = len({len(x) for x in kwargs.values()}) == 1
173173
if not same_length:
174-
msg = f"Mismatching counts in the following inputs: {({k: len(v) for k, v in kwargs.items()})}"
174+
msg = f"Mismatching counts in the following inputs: { ({k: len(v) for k, v in kwargs.items()}) }"
175175
raise ValueError(msg)
176176

177177
@staticmethod

integrations/fastembed/pyproject.toml

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

4444
[tool.hatch.envs.default]
4545
installer = "uv"
46-
dependencies = [
47-
"coverage[toml]>=6.5",
48-
"pytest",
49-
"pytest-rerunfailures",
50-
"ipython",
51-
"haystack-pydoc-tools",
52-
]
46+
dependencies = ["haystack-pydoc-tools", "ruff"]
5347
[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"]
6048
docs = ["pydoc-markdown pydoc/config.yml"]
49+
fmt = "ruff check --fix {args} && ruff format {args}"
50+
fmt-check = "ruff check {args} && ruff format --check {args}"
51+
52+
[tool.hatch.envs.test]
53+
dependencies = [
54+
"pytest",
55+
"pytest-asyncio",
56+
"pytest-cov",
57+
"pytest-rerunfailures",
58+
"mypy",
59+
"pip",
60+
"ipython"
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+
types = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
6169

70+
# TODO: remove lint environment once this integration is properly typed
71+
# test environment should be used instead
72+
# https://github.com/deepset-ai/haystack-core-integrations/issues/1771
6273
[tool.hatch.envs.lint]
6374
installer = "uv"
6475
detached = true
6576
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243", "numpy"]
6677
[tool.hatch.envs.lint.scripts]
6778
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"]
7179

7280
[tool.black]
7381
target-version = ["py38"]

integrations/instructor_embedders/pyproject.toml

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -67,31 +67,39 @@ git_describe_command = 'git describe --tags --match="integrations/instructor_emb
6767

6868
[tool.hatch.envs.default]
6969
installer = "uv"
70-
dependencies = [
71-
"coverage[toml]>=6.5",
72-
"pytest",
73-
"pytest-rerunfailures",
74-
"haystack-pydoc-tools",
75-
]
70+
dependencies = ["haystack-pydoc-tools", "ruff"]
7671
[tool.hatch.envs.default.scripts]
77-
test = "pytest {args:tests}"
78-
test-cov = "coverage run -m pytest {args:tests}"
79-
test-cov-retry = "test-cov --reruns 3 --reruns-delay 30 -x"
80-
cov-report = ["- coverage combine", "coverage report"]
81-
cov = ["test-cov", "cov-report"]
82-
cov-retry = ["test-cov-retry", "cov-report"]
8372
docs = ["pydoc-markdown pydoc/config.yml"]
73+
fmt = "ruff check --fix {args} && ruff format {args}"
74+
fmt-check = "ruff check {args} && ruff format --check {args}"
75+
76+
[tool.hatch.envs.test]
77+
dependencies = [
78+
"pytest",
79+
"pytest-asyncio",
80+
"pytest-cov",
81+
"pytest-rerunfailures",
82+
"mypy",
83+
"pip"
84+
]
85+
86+
[tool.hatch.envs.test.scripts]
87+
unit = 'pytest -m "not integration" {args:tests}'
88+
integration = 'pytest -m "integration" {args:tests}'
89+
all = 'pytest {args:tests}'
90+
cov-retry = 'all --cov=haystack_integrations --reruns 3 --reruns-delay 30 -x'
91+
types = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
8492

93+
# TODO: remove lint environment once this integration is properly typed
94+
# test environment should be used instead
95+
# https://github.com/deepset-ai/haystack-core-integrations/issues/1771
8596
[tool.hatch.envs.lint]
8697
installer = "uv"
8798
detached = true
8899
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
89100

90101
[tool.hatch.envs.lint.scripts]
91102
typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
92-
style = ["ruff check {args:}", "black --check --diff {args:.}"]
93-
fmt = ["black {args:.}", "ruff check --fix {args:}", "style"]
94-
all = ["style", "typing"]
95103

96104
[tool.coverage.run]
97105
source = ["haystack_integrations"]

integrations/langfuse/pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ dependencies = [
5757
"pytest-cov",
5858
"pytest-rerunfailures",
5959
"mypy",
60-
"pip"
60+
"pip",
61+
"anthropic-haystack",
62+
"cohere-haystack",
6163
]
6264

6365
[tool.hatch.envs.test.scripts]

0 commit comments

Comments
 (0)