From 44258a4afcbc74250edc2910cfd5423443b7f1ab Mon Sep 17 00:00:00 2001 From: Massimiliano Pippi Date: Fri, 21 Jun 2024 11:14:34 +0200 Subject: [PATCH] cargo load the whole bunch --- integrations/amazon_bedrock/pyproject.toml | 71 ++++++----------- integrations/amazon_sagemaker/pyproject.toml | 67 +++++----------- integrations/anthropic/pyproject.toml | 75 ++++++------------ integrations/chroma/pyproject.toml | 70 ++++++----------- integrations/cohere/pyproject.toml | 17 ++-- integrations/deepeval/pyproject.toml | 10 +-- integrations/elasticsearch/pyproject.toml | 77 ++++++------------ integrations/fastembed/pyproject.toml | 72 ++++++----------- integrations/google_ai/pyproject.toml | 68 ++++++---------- integrations/google_vertex/pyproject.toml | 69 ++++++---------- integrations/gradient/pyproject.toml | 64 +++++---------- .../instructor_embedders/pyproject.toml | 19 ++--- integrations/jina/pyproject.toml | 10 +-- integrations/langfuse/pyproject.toml | 34 +++----- integrations/llama_cpp/pyproject.toml | 77 ++++++------------ integrations/mistral/pyproject.toml | 10 +-- integrations/mongodb_atlas/pyproject.toml | 73 ++++++----------- integrations/nvidia/pyproject.toml | 2 +- integrations/ollama/pyproject.toml | 69 ++++++---------- integrations/opensearch/pyproject.toml | 78 ++++++------------- integrations/optimum/pyproject.toml | 14 ++-- integrations/pgvector/pyproject.toml | 73 ++++++----------- integrations/pinecone/pyproject.toml | 11 +-- integrations/qdrant/pyproject.toml | 13 ++-- integrations/ragas/pyproject.toml | 10 +-- integrations/unstructured/pyproject.toml | 78 ++++++------------- integrations/weaviate/pyproject.toml | 10 +-- 27 files changed, 393 insertions(+), 848 deletions(-) diff --git a/integrations/amazon_bedrock/pyproject.toml b/integrations/amazon_bedrock/pyproject.toml index bbdc61484..411631da9 100644 --- a/integrations/amazon_bedrock/pyproject.toml +++ b/integrations/amazon_bedrock/pyproject.toml @@ -10,9 +10,7 @@ readme = "README.md" requires-python = ">=3.8" license = "Apache-2.0" keywords = [] -authors = [ - { name = "deepset GmbH", email = "info@deepset.ai" }, -] +authors = [{ name = "deepset GmbH", email = "info@deepset.ai" }] classifiers = [ "License :: OSI Approved :: Apache Software License", "Development Status :: 4 - Beta", @@ -25,11 +23,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = [ - "haystack-ai", - "boto3>=1.28.57", - "transformers" -] +dependencies = ["haystack-ai", "boto3>=1.28.57", "transformers"] [project.urls] Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/amazon_bedrock#readme" @@ -51,50 +45,29 @@ git_describe_command = 'git describe --tags --match="integrations/amazon_bedrock dependencies = [ "coverage[toml]>=6.5", "pytest", + "pytest-rerunfailures", "haystack-pydoc-tools", ] [tool.hatch.envs.default.scripts] -test = "pytest {args:tests}" +test = "pytest --reruns 3 --reruns-delay 30 -x {args:tests}" test-cov = "coverage run -m pytest {args:tests}" -cov-report = [ - "- coverage combine", - "coverage report", -] -cov = [ - "test-cov", - "cov-report", -] -docs = [ - "pydoc-markdown pydoc/config.yml" -] +cov-report = ["- coverage combine", "coverage report"] +cov = ["test-cov", "cov-report"] +docs = ["pydoc-markdown pydoc/config.yml"] [[tool.hatch.envs.all.matrix]] python = ["3.8", "3.9", "3.10", "3.11", "3.12"] [tool.hatch.envs.lint] detached = true -dependencies = [ - "black>=23.1.0", - "mypy>=1.0.0", - "ruff>=0.0.243", -] +dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"] [tool.hatch.envs.lint.scripts] typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}" -style = [ - "ruff {args:.}", - "black --check --diff {args:.}", -] +style = ["ruff {args:.}", "black --check --diff {args:.}"] -fmt = [ - "black {args:.}", - "ruff --fix {args:.}", - "style", -] +fmt = ["black {args:.}", "ruff --fix {args:.}", "style"] -all = [ - "style", - "typing", -] +all = ["style", "typing"] [tool.black] target-version = ["py38"] @@ -134,11 +107,19 @@ ignore = [ # Allow non-abstract empty methods in abstract base classes "B027", # Ignore checks for possible passwords - "S105", "S106", "S107", + "S105", + "S106", + "S107", # Ignore complexity - "C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915", + "C901", + "PLR0911", + "PLR0912", + "PLR0913", + "PLR0915", # Ignore unused params - "ARG001", "ARG002", "ARG005", + "ARG001", + "ARG002", + "ARG005", ] unfixable = [ # Don't touch unused imports @@ -162,12 +143,8 @@ parallel = true [tool.coverage.report] omit = ["*/tests/*", "*/__init__.py"] -show_missing=true -exclude_lines = [ - "no cov", - "if __name__ == .__main__.:", - "if TYPE_CHECKING:", -] +show_missing = true +exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] [[tool.mypy.overrides]] module = [ diff --git a/integrations/amazon_sagemaker/pyproject.toml b/integrations/amazon_sagemaker/pyproject.toml index a1f6ff239..0bef45ee2 100644 --- a/integrations/amazon_sagemaker/pyproject.toml +++ b/integrations/amazon_sagemaker/pyproject.toml @@ -13,9 +13,7 @@ readme = "README.md" requires-python = ">=3.8" license = "Apache-2.0" keywords = [] -authors = [ - { name = "deepset GmbH", email = "info@deepset.ai" }, -] +authors = [{ name = "deepset GmbH", email = "info@deepset.ai" }] classifiers = [ "License :: OSI Approved :: Apache Software License", "Development Status :: 4 - Beta", @@ -28,10 +26,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = [ - "haystack-ai", - "boto3>=1.28.57", -] +dependencies = ["haystack-ai", "boto3>=1.28.57"] [project.urls] Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/amazon_sagemaker_haystack#readme" @@ -53,49 +48,28 @@ git_describe_command = 'git describe --tags --match="integrations/amazon_sagemak dependencies = [ "coverage[toml]>=6.5", "pytest", + "pytest-rerunfailures", "haystack-pydoc-tools", ] [tool.hatch.envs.default.scripts] -test = "pytest {args:tests}" +test = "pytest --reruns 3 --reruns-delay 30 -x {args:tests}" test-cov = "coverage run -m pytest {args:tests}" -cov-report = [ - "- coverage combine", - "coverage report", -] -cov = [ - "test-cov", - "cov-report", -] +cov-report = ["- coverage combine", "coverage report"] +cov = ["test-cov", "cov-report"] -docs = [ - "pydoc-markdown pydoc/config.yml" -] +docs = ["pydoc-markdown pydoc/config.yml"] [[tool.hatch.envs.all.matrix]] python = ["3.8", "3.9", "3.10", "3.11"] [tool.hatch.envs.lint] detached = true -dependencies = [ - "black>=23.1.0", - "mypy>=1.0.0", - "ruff>=0.0.243", -] +dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"] [tool.hatch.envs.lint.scripts] typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}" -style = [ - "ruff {args:.}", - "black --check --diff {args:.}", -] -fmt = [ - "black {args:.}", - "ruff --fix {args:.}", - "style", -] -all = [ - "style", - "typing", -] +style = ["ruff {args:.}", "black --check --diff {args:.}"] +fmt = ["black {args:.}", "ruff --fix {args:.}", "style"] +all = ["style", "typing"] [tool.black] target-version = ["py38"] @@ -140,9 +114,15 @@ ignore = [ # Allow boolean positional values in function calls, like `dict.get(... True)` "FBT003", # Ignore checks for possible passwords - "S105", "S106", "S107", + "S105", + "S106", + "S107", # Ignore complexity - "C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915", + "C901", + "PLR0911", + "PLR0912", + "PLR0913", + "PLR0915", ] unfixable = [ # Don't touch unused imports @@ -166,12 +146,8 @@ parallel = true [tool.coverage.report] omit = ["*/tests/*", "*/__init__.py"] -show_missing=true -exclude_lines = [ - "no cov", - "if __name__ == .__main__.:", - "if TYPE_CHECKING:", -] +show_missing = true +exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] [[tool.mypy.overrides]] module = [ @@ -185,7 +161,6 @@ module = [ ignore_missing_imports = true - [tool.pytest.ini_options] addopts = "--strict-markers" markers = [ diff --git a/integrations/anthropic/pyproject.toml b/integrations/anthropic/pyproject.toml index b04a54258..c8ef25cbb 100644 --- a/integrations/anthropic/pyproject.toml +++ b/integrations/anthropic/pyproject.toml @@ -10,9 +10,7 @@ readme = "README.md" requires-python = ">=3.8" license = "Apache-2.0" keywords = [] -authors = [ - { name = "deepset GmbH", email = "info@deepset.ai" }, -] +authors = [{ name = "deepset GmbH", email = "info@deepset.ai" }] classifiers = [ "License :: OSI Approved :: Apache Software License", "Development Status :: 4 - Beta", @@ -25,10 +23,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = [ - "haystack-ai", - "anthropic", -] +dependencies = ["haystack-ai", "anthropic"] [project.urls] Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/anthropic#readme" @@ -50,50 +45,29 @@ git_describe_command = 'git describe --tags --match="integrations/anthropic-v[0- dependencies = [ "coverage[toml]>=6.5", "pytest", + "pytest-rerunfailures", "haystack-pydoc-tools", ] [tool.hatch.envs.default.scripts] -test = "pytest {args:tests}" +test = "pytest --reruns 3 --reruns-delay 30 -x {args:tests}" test-cov = "coverage run -m pytest {args:tests}" -cov-report = [ - "- coverage combine", - "coverage report", -] -cov = [ - "test-cov", - "cov-report", -] -docs = [ - "pydoc-markdown pydoc/config.yml" -] +cov-report = ["- coverage combine", "coverage report"] +cov = ["test-cov", "cov-report"] +docs = ["pydoc-markdown pydoc/config.yml"] [[tool.hatch.envs.all.matrix]] python = ["3.8", "3.9", "3.10", "3.11", "3.12"] [tool.hatch.envs.lint] detached = true -dependencies = [ - "black>=23.1.0", - "mypy>=1.0.0", - "ruff>=0.0.243", -] +dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"] [tool.hatch.envs.lint.scripts] typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}" -style = [ - "ruff {args:.}", - "black --check --diff {args:.}", -] +style = ["ruff {args:.}", "black --check --diff {args:.}"] -fmt = [ - "black {args:.}", - "ruff --fix {args:.}", - "style", -] +fmt = ["black {args:.}", "ruff --fix {args:.}", "style"] -all = [ - "style", - "typing", -] +all = ["style", "typing"] [tool.black] target-version = ["py38"] @@ -133,11 +107,19 @@ ignore = [ # Allow non-abstract empty methods in abstract base classes "B027", # Ignore checks for possible passwords - "S105", "S106", "S107", + "S105", + "S106", + "S107", # Ignore complexity - "C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915", + "C901", + "PLR0911", + "PLR0912", + "PLR0913", + "PLR0915", # Ignore unused params - "ARG001", "ARG002", "ARG005", + "ARG001", + "ARG002", + "ARG005", ] unfixable = [ # Don't touch unused imports @@ -161,12 +143,8 @@ parallel = true [tool.coverage.report] omit = ["*/tests/*", "*/__init__.py"] -show_missing=true -exclude_lines = [ - "no cov", - "if __name__ == .__main__.:", - "if TYPE_CHECKING:", -] +show_missing = true +exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] [[tool.mypy.overrides]] module = [ @@ -180,8 +158,5 @@ ignore_missing_imports = true [tool.pytest.ini_options] addopts = "--strict-markers" -markers = [ - "unit: unit tests", - "integration: integration tests", -] +markers = ["unit: unit tests", "integration: integration tests"] log_cli = true diff --git a/integrations/chroma/pyproject.toml b/integrations/chroma/pyproject.toml index 0544eff28..6c786a3fe 100644 --- a/integrations/chroma/pyproject.toml +++ b/integrations/chroma/pyproject.toml @@ -10,9 +10,7 @@ readme = "README.md" requires-python = ">=3.8" license = "Apache-2.0" keywords = [] -authors = [ - { name = "John Doe", email = "jd@example.com" }, -] +authors = [{ name = "John Doe", email = "jd@example.com" }] classifiers = [ "License :: OSI Approved :: Apache Software License", "Development Status :: 4 - Beta", @@ -24,11 +22,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = [ - "haystack-ai", - "chromadb>=0.5.0", - "typing_extensions>=4.8.0" -] +dependencies = ["haystack-ai", "chromadb>=0.5.0", "typing_extensions>=4.8.0"] [project.urls] Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/chroma#readme" @@ -50,23 +44,16 @@ git_describe_command = 'git describe --tags --match="integrations/chroma-v[0-9]* dependencies = [ "coverage[toml]>=6.5", "pytest", + "pytest-rerunfailures", "haystack-pydoc-tools", "databind-core<4.5.0", # FIXME: the latest 4.5.0 causes loops in pip resolver ] [tool.hatch.envs.default.scripts] -test = "pytest {args:tests}" +test = "pytest --reruns 3 --reruns-delay 30 -x {args:tests}" test-cov = "coverage run -m pytest {args:tests}" -cov-report = [ - "- coverage combine", - "coverage report", -] -cov = [ - "test-cov", - "cov-report", -] -docs = [ - "pydoc-markdown pydoc/config.yml" -] +cov-report = ["- coverage combine", "coverage report"] +cov = ["test-cov", "cov-report"] +docs = ["pydoc-markdown pydoc/config.yml"] [[tool.hatch.envs.all.matrix]] python = ["3.9", "3.10"] @@ -77,23 +64,13 @@ dependencies = [ "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243", - "numpy", # we need the stubs from the main package + "numpy", # we need the stubs from the main package ] [tool.hatch.envs.lint.scripts] typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}" -style = [ - "ruff {args:.}", - "black --check --diff {args:.}", -] -fmt = [ - "black {args:.}", - "ruff --fix {args:.}", - "style", -] -all = [ - "style", - "typing", -] +style = ["ruff {args:.}", "black --check --diff {args:.}"] +fmt = ["black {args:.}", "ruff --fix {args:.}", "style"] +all = ["style", "typing"] [tool.hatch.metadata] allow-direct-references = true @@ -139,9 +116,15 @@ ignore = [ # Allow boolean positional values in function calls, like `dict.get(... True)` "FBT003", # Ignore checks for possible passwords - "S105", "S106", "S107", + "S105", + "S106", + "S107", # Ignore complexity - "C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915", + "C901", + "PLR0911", + "PLR0912", + "PLR0913", + "PLR0915", # Ignore unused params "ARG002", ] @@ -169,20 +152,13 @@ parallel = false [tool.coverage.report] omit = ["*/tests/*", "*/__init__.py"] -show_missing=true -exclude_lines = [ - "no cov", - "if __name__ == .__main__.:", - "if TYPE_CHECKING:", -] +show_missing = true +exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] [tool.pytest.ini_options] minversion = "6.0" -markers = [ - "unit: unit tests", - "integration: integration tests" -] +markers = ["unit: unit tests", "integration: integration tests"] [[tool.mypy.overrides]] module = [ @@ -190,6 +166,6 @@ module = [ "haystack.*", "haystack_integrations.*", "pytest.*", - "numpy.*" + "numpy.*", ] ignore_missing_imports = true diff --git a/integrations/cohere/pyproject.toml b/integrations/cohere/pyproject.toml index 3f4ad5c0b..e095d9804 100644 --- a/integrations/cohere/pyproject.toml +++ b/integrations/cohere/pyproject.toml @@ -22,10 +22,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = [ - "haystack-ai", - "cohere==5.*", -] +dependencies = ["haystack-ai", "cohere==5.*"] [project.urls] Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/cohere#readme" @@ -46,7 +43,7 @@ git_describe_command = 'git describe --tags --match="integrations/cohere-v[0-9]* [tool.hatch.envs.default] dependencies = ["coverage[toml]>=6.5", "pytest", "haystack-pydoc-tools"] [tool.hatch.envs.default.scripts] -test = "pytest {args:tests}" +test = "pytest --reruns 3 --reruns-delay 30 -x {args:tests}" test-cov = "coverage run -m pytest {args:tests}" cov-report = ["- coverage combine", "coverage report"] cov = ["test-cov", "cov-report"] @@ -138,12 +135,8 @@ parallel = false [tool.coverage.report] omit = ["*/tests/*", "*/__init__.py"] -show_missing=true -exclude_lines = [ - "no cov", - "if __name__ == .__main__.:", - "if TYPE_CHECKING:", -] +show_missing = true +exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] [[tool.mypy.overrides]] @@ -164,6 +157,6 @@ markers = [ "embedders: embedders tests", "generators: generators tests", "chat_generators: chat_generators tests", - "ranker: ranker tests" + "ranker: ranker tests", ] log_cli = true diff --git a/integrations/deepeval/pyproject.toml b/integrations/deepeval/pyproject.toml index 1da5cd820..caaa35b59 100644 --- a/integrations/deepeval/pyproject.toml +++ b/integrations/deepeval/pyproject.toml @@ -43,7 +43,7 @@ git_describe_command = 'git describe --tags --match="integrations/deepeval-v[0-9 [tool.hatch.envs.default] dependencies = ["coverage[toml]>=6.5", "pytest", "haystack-pydoc-tools"] [tool.hatch.envs.default.scripts] -test = "pytest {args:tests}" +test = "pytest --reruns 3 --reruns-delay 30 -x {args:tests}" test-cov = "coverage run -m pytest {args:tests}" cov-report = ["- coverage combine", "coverage report"] cov = ["test-cov", "cov-report"] @@ -139,12 +139,8 @@ parallel = false [tool.coverage.report] omit = ["*/tests/*", "*/__init__.py"] -show_missing=true -exclude_lines = [ - "no cov", - "if __name__ == .__main__.:", - "if TYPE_CHECKING:", -] +show_missing = true +exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] [[tool.mypy.overrides]] diff --git a/integrations/elasticsearch/pyproject.toml b/integrations/elasticsearch/pyproject.toml index 1612601e2..8c6494240 100644 --- a/integrations/elasticsearch/pyproject.toml +++ b/integrations/elasticsearch/pyproject.toml @@ -10,9 +10,7 @@ readme = "README.md" requires-python = ">=3.8" license = "Apache-2.0" keywords = [] -authors = [ - { name = "Silvano Cerza", email = "silvanocerza@gmail.com" }, -] +authors = [{ name = "Silvano Cerza", email = "silvanocerza@gmail.com" }] classifiers = [ "License :: OSI Approved :: Apache Software License", "Development Status :: 4 - Beta", @@ -24,10 +22,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = [ - "haystack-ai", - "elasticsearch>=8,<9", -] +dependencies = ["haystack-ai", "elasticsearch>=8,<9"] [project.urls] Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/elasticsearch#readme" @@ -49,49 +44,28 @@ git_describe_command = 'git describe --tags --match="integrations/elasticsearch- dependencies = [ "coverage[toml]>=6.5", "pytest", + "pytest-rerunfailures", "pytest-xdist", "haystack-pydoc-tools", ] [tool.hatch.envs.default.scripts] -test = "pytest {args:tests}" +test = "pytest --reruns 3 --reruns-delay 30 -x {args:tests}" test-cov = "coverage run -m pytest {args:tests}" -cov-report = [ - "- coverage combine", - "coverage report", -] -cov = [ - "test-cov", - "cov-report", -] -docs = [ - "pydoc-markdown pydoc/config.yml" -] +cov-report = ["- coverage combine", "coverage report"] +cov = ["test-cov", "cov-report"] +docs = ["pydoc-markdown pydoc/config.yml"] [[tool.hatch.envs.all.matrix]] python = ["3.8", "3.9", "3.10", "3.11"] [tool.hatch.envs.lint] detached = true -dependencies = [ - "black>=23.1.0", - "mypy>=1.0.0", - "ruff>=0.0.243", -] +dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"] [tool.hatch.envs.lint.scripts] typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}" -style = [ - "ruff {args:.}", - "black --check --diff {args:.}", -] -fmt = [ - "black {args:.}", - "ruff --fix {args:.}", - "style", -] -all = [ - "style", - "typing", -] +style = ["ruff {args:.}", "black --check --diff {args:.}"] +fmt = ["black {args:.}", "ruff --fix {args:.}", "style"] +all = ["style", "typing"] [tool.hatch.metadata] allow-direct-references = true @@ -137,9 +111,15 @@ ignore = [ # Allow boolean positional values in function calls, like `dict.get(... True)` "FBT003", # Ignore checks for possible passwords - "S105", "S106", "S107", + "S105", + "S106", + "S107", # Ignore complexity - "C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915", + "C901", + "PLR0911", + "PLR0912", + "PLR0913", + "PLR0915", ] unfixable = [ # Don't touch unused imports @@ -164,25 +144,14 @@ parallel = false [tool.coverage.report] omit = ["*/tests/*", "*/__init__.py"] -show_missing=true -exclude_lines = [ - "no cov", - "if __name__ == .__main__.:", - "if TYPE_CHECKING:", -] +show_missing = true +exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] [tool.pytest.ini_options] minversion = "6.0" -markers = [ - "unit: unit tests", - "integration: integration tests" -] +markers = ["unit: unit tests", "integration: integration tests"] [[tool.mypy.overrides]] -module = [ - "haystack.*", - "haystack_integrations.*", - "pytest.*" -] +module = ["haystack.*", "haystack_integrations.*", "pytest.*"] ignore_missing_imports = true diff --git a/integrations/fastembed/pyproject.toml b/integrations/fastembed/pyproject.toml index 538972651..b723ffe58 100644 --- a/integrations/fastembed/pyproject.toml +++ b/integrations/fastembed/pyproject.toml @@ -10,9 +10,7 @@ readme = "README.md" requires-python = ">=3.8" license = "Apache-2.0" keywords = [] -authors = [ - { name = "deepset GmbH", email = "info@deepset.ai" }, -] +authors = [{ name = "deepset GmbH", email = "info@deepset.ai" }] classifiers = [ "License :: OSI Approved :: Apache Software License", "Development Status :: 4 - Beta", @@ -25,10 +23,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = [ -"haystack-ai>=2.0.1", -"fastembed>=0.2.5", -] +dependencies = ["haystack-ai>=2.0.1", "fastembed>=0.2.5"] [project.urls] Source = "https://github.com/deepset-ai/haystack-core-integrations" @@ -50,50 +45,28 @@ git_describe_command = 'git describe --tags --match="integrations/fastembed-v[0- dependencies = [ "coverage[toml]>=6.5", "pytest", + "pytest-rerunfailures", "ipython", "haystack-pydoc-tools", ] [tool.hatch.envs.default.scripts] -test = "pytest {args:tests}" +test = "pytest --reruns 3 --reruns-delay 30 -x {args:tests}" test-cov = "coverage run -m pytest {args:tests}" -cov-report = [ - "- coverage combine", - "coverage report", -] -cov = [ - "test-cov", - "cov-report", -] -docs = [ - "pydoc-markdown pydoc/config.yml" -] +cov-report = ["- coverage combine", "coverage report"] +cov = ["test-cov", "cov-report"] +docs = ["pydoc-markdown pydoc/config.yml"] [[tool.hatch.envs.all.matrix]] python = ["3.8", "3.9", "3.10", "3.11", "3.12"] [tool.hatch.envs.lint] detached = true -dependencies = [ - "black>=23.1.0", - "mypy>=1.0.0", - "ruff>=0.0.243", - "numpy" -] +dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243", "numpy"] [tool.hatch.envs.lint.scripts] typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}" -style = [ - "ruff {args:.}", - "black --check --diff {args:.}", -] -fmt = [ - "black {args:.}", - "ruff --fix {args:.}", - "style", -] -all = [ - "style", - "typing", -] +style = ["ruff {args:.}", "black --check --diff {args:.}"] +fmt = ["black {args:.}", "ruff --fix {args:.}", "style"] +all = ["style", "typing"] [tool.black] target-version = ["py38"] @@ -135,11 +108,18 @@ ignore = [ "B027", # Allow boolean positional values in function calls, like `dict.get(... True)` "FBT003", - "FBT001", "FBT002", + "FBT001", + "FBT002", # Ignore checks for possible passwords - "S105", "S106", "S107", + "S105", + "S106", + "S107", # Ignore complexity - "C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915", + "C901", + "PLR0911", + "PLR0912", + "PLR0913", + "PLR0915", ] unfixable = [ # Don't touch unused imports @@ -165,12 +145,8 @@ parallel = false [tool.coverage.report] omit = ["*/tests/*", "*/__init__.py"] -show_missing=true -exclude_lines = [ - "no cov", - "if __name__ == .__main__.:", - "if TYPE_CHECKING:", -] +show_missing = true +exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] [[tool.mypy.overrides]] module = [ @@ -178,6 +154,6 @@ module = [ "haystack_integrations.*", "fastembed.*", "pytest.*", - "numpy.*" + "numpy.*", ] ignore_missing_imports = true diff --git a/integrations/google_ai/pyproject.toml b/integrations/google_ai/pyproject.toml index d7a31fa74..9726fe180 100644 --- a/integrations/google_ai/pyproject.toml +++ b/integrations/google_ai/pyproject.toml @@ -10,9 +10,7 @@ readme = "README.md" requires-python = ">=3.8" license = "Apache-2.0" keywords = [] -authors = [ - { name = "deepset GmbH", email = "info@deepset.ai" }, -] +authors = [{ name = "deepset GmbH", email = "info@deepset.ai" }] classifiers = [ "License :: OSI Approved :: Apache Software License", "Development Status :: 4 - Beta", @@ -24,10 +22,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = [ - "haystack-ai", - "google-generativeai>=0.3.1" -] +dependencies = ["haystack-ai", "google-generativeai>=0.3.1"] [project.urls] Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/google_ai_haystack#readme" @@ -49,47 +44,26 @@ git_describe_command = 'git describe --tags --match="integrations/google_ai-v[0- dependencies = [ "coverage[toml]>=6.5", "pytest", + "pytest-rerunfailures", "haystack-pydoc-tools", ] [tool.hatch.envs.default.scripts] -test = "pytest {args:tests}" +test = "pytest --reruns 3 --reruns-delay 30 -x {args:tests}" test-cov = "coverage run -m pytest {args:tests}" -cov-report = [ - "- coverage combine", - "coverage report", -] -cov = [ - "test-cov", - "cov-report", -] -docs = [ - "pydoc-markdown pydoc/config.yml" -] +cov-report = ["- coverage combine", "coverage report"] +cov = ["test-cov", "cov-report"] +docs = ["pydoc-markdown pydoc/config.yml"] [[tool.hatch.envs.all.matrix]] python = ["3.8", "3.9", "3.10", "3.11"] [tool.hatch.envs.lint] detached = true -dependencies = [ - "black>=23.1.0", - "mypy>=1.0.0", - "ruff>=0.0.243", -] +dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"] [tool.hatch.envs.lint.scripts] typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}" -style = [ - "ruff {args:.}", - "black --check --diff {args:.}", -] -fmt = [ - "black {args:.}", - "ruff --fix {args:.}", - "style", -] -all = [ - "style", - "typing", -] +style = ["ruff {args:.}", "black --check --diff {args:.}"] +fmt = ["black {args:.}", "ruff --fix {args:.}", "style"] +all = ["style", "typing"] [tool.black] target-version = ["py38"] @@ -132,9 +106,15 @@ ignore = [ # Allow boolean positional values in function calls, like `dict.get(... True)` "FBT003", # Ignore checks for possible passwords - "S105", "S106", "S107", + "S105", + "S106", + "S107", # Ignore complexity - "C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915", + "C901", + "PLR0911", + "PLR0912", + "PLR0913", + "PLR0915", ] unfixable = [ # Don't touch unused imports @@ -159,12 +139,8 @@ parallel = false [tool.coverage.report] omit = ["*/tests/*", "*/__init__.py"] -show_missing=true -exclude_lines = [ - "no cov", - "if __name__ == .__main__.:", - "if TYPE_CHECKING:", -] +show_missing = true +exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] [[tool.mypy.overrides]] module = [ @@ -174,4 +150,4 @@ module = [ "pytest.*", "numpy.*", ] -ignore_missing_imports = true \ No newline at end of file +ignore_missing_imports = true diff --git a/integrations/google_vertex/pyproject.toml b/integrations/google_vertex/pyproject.toml index 349bb06a0..21f923215 100644 --- a/integrations/google_vertex/pyproject.toml +++ b/integrations/google_vertex/pyproject.toml @@ -10,9 +10,7 @@ readme = "README.md" requires-python = ">=3.8" license = "Apache-2.0" keywords = [] -authors = [ - { name = "deepset GmbH", email = "info@deepset.ai" }, -] +authors = [{ name = "deepset GmbH", email = "info@deepset.ai" }] classifiers = [ "License :: OSI Approved :: Apache Software License", "Development Status :: 4 - Beta", @@ -24,11 +22,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = [ - "haystack-ai", - "google-cloud-aiplatform>=1.38", - "pyarrow>3", -] +dependencies = ["haystack-ai", "google-cloud-aiplatform>=1.38", "pyarrow>3"] [project.urls] Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/google_vertex#readme" @@ -50,47 +44,26 @@ git_describe_command = 'git describe --tags --match="integrations/google_vertex- dependencies = [ "coverage[toml]>=6.5", "pytest", + "pytest-rerunfailures", "haystack-pydoc-tools", ] [tool.hatch.envs.default.scripts] -test = "pytest {args:tests}" +test = "pytest --reruns 3 --reruns-delay 30 -x {args:tests}" test-cov = "coverage run -m pytest {args:tests}" -cov-report = [ - "- coverage combine", - "coverage report", -] -cov = [ - "test-cov", - "cov-report", -] -docs = [ - "pydoc-markdown pydoc/config.yml" -] +cov-report = ["- coverage combine", "coverage report"] +cov = ["test-cov", "cov-report"] +docs = ["pydoc-markdown pydoc/config.yml"] [[tool.hatch.envs.all.matrix]] python = ["3.8", "3.9", "3.10", "3.11"] [tool.hatch.envs.lint] detached = true -dependencies = [ - "black>=23.1.0", - "mypy>=1.0.0", - "ruff>=0.0.243", -] +dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"] [tool.hatch.envs.lint.scripts] typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}" -style = [ - "ruff {args:.}", - "black --check --diff {args:.}", -] -fmt = [ - "black {args:.}", - "ruff --fix {args:.}", - "style", -] -all = [ - "style", - "typing", -] +style = ["ruff {args:.}", "black --check --diff {args:.}"] +fmt = ["black {args:.}", "ruff --fix {args:.}", "style"] +all = ["style", "typing"] [tool.black] target-version = ["py38"] @@ -130,9 +103,15 @@ ignore = [ # Allow non-abstract empty methods in abstract base classes "B027", # Ignore checks for possible passwords - "S105", "S106", "S107", + "S105", + "S106", + "S107", # Ignore complexity - "C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915", + "C901", + "PLR0911", + "PLR0912", + "PLR0913", + "PLR0915", ] unfixable = [ # Don't touch unused imports @@ -157,12 +136,8 @@ parallel = false [tool.coverage.report] omit = ["*/tests/*", "*/__init__.py"] -show_missing=true -exclude_lines = [ - "no cov", - "if __name__ == .__main__.:", - "if TYPE_CHECKING:", -] +show_missing = true +exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] [[tool.mypy.overrides]] @@ -182,4 +157,4 @@ markers = [ "embedders: embedders tests", "generators: generators tests", ] -log_cli = true \ No newline at end of file +log_cli = true diff --git a/integrations/gradient/pyproject.toml b/integrations/gradient/pyproject.toml index 0ed7c66d2..6500f5fb8 100644 --- a/integrations/gradient/pyproject.toml +++ b/integrations/gradient/pyproject.toml @@ -26,10 +26,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = [ - "haystack-ai", - "gradientai>=1.4.0", -] +dependencies = ["haystack-ai", "gradientai>=1.4.0"] optional-dependencies = { tqdm = ["tqdm"] } [project.urls] @@ -52,47 +49,26 @@ git_describe_command = 'git describe --tags --match="integrations/gradient-v[0-9 dependencies = [ "coverage[toml]>=6.5", "pytest", + "pytest-rerunfailures", "haystack-pydoc-tools", ] [tool.hatch.envs.default.scripts] -test = "pytest {args:tests}" +test = "pytest --reruns 3 --reruns-delay 30 -x {args:tests}" test-cov = "coverage run -m pytest {args:tests}" -cov-report = [ - "- coverage combine", - "coverage report", -] -cov = [ - "test-cov", - "cov-report", -] -docs = [ - "pydoc-markdown pydoc/config.yml" -] +cov-report = ["- coverage combine", "coverage report"] +cov = ["test-cov", "cov-report"] +docs = ["pydoc-markdown pydoc/config.yml"] [[tool.hatch.envs.all.matrix]] python = ["3.8", "3.9", "3.10", "3.11"] [tool.hatch.envs.lint] detached = true -dependencies = [ - "black>=23.1.0", - "mypy>=1.0.0", - "ruff>=0.0.243", -] +dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"] [tool.hatch.envs.lint.scripts] typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}" -style = [ - "ruff {args:.}", - "black --check --diff {args:.}", -] -fmt = [ - "black {args:.}", - "ruff --fix {args:.}", - "style", -] -all = [ - "style", - "typing", -] +style = ["ruff {args:.}", "black --check --diff {args:.}"] +fmt = ["black {args:.}", "ruff --fix {args:.}", "style"] +all = ["style", "typing"] [tool.black] target-version = ["py38"] @@ -135,9 +111,15 @@ ignore = [ # Allow boolean positional values in function calls, like `dict.get(... True)` "FBT003", # Ignore checks for possible passwords - "S105", "S106", "S107", + "S105", + "S106", + "S107", # Ignore complexity - "C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915", + "C901", + "PLR0911", + "PLR0912", + "PLR0913", + "PLR0915", ] unfixable = [ # Don't touch unused imports @@ -162,12 +144,8 @@ parallel = false [tool.coverage.report] omit = ["*/tests/*", "*/__init__.py"] -show_missing=true -exclude_lines = [ - "no cov", - "if __name__ == .__main__.:", - "if TYPE_CHECKING:", -] +show_missing = true +exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] [[tool.mypy.overrides]] @@ -178,4 +156,4 @@ module = [ "pytest.*", "numpy.*", ] -ignore_missing_imports = true \ No newline at end of file +ignore_missing_imports = true diff --git a/integrations/instructor_embedders/pyproject.toml b/integrations/instructor_embedders/pyproject.toml index faf5d0216..359d7f2e8 100644 --- a/integrations/instructor_embedders/pyproject.toml +++ b/integrations/instructor_embedders/pyproject.toml @@ -67,22 +67,15 @@ git_describe_command = 'git describe --tags --match="integrations/instructor_emb dependencies = [ "coverage[toml]>=6.5", "pytest", + "pytest-rerunfailures", "haystack-pydoc-tools", ] [tool.hatch.envs.default.scripts] -test = "pytest {args:tests}" +test = "pytest --reruns 3 --reruns-delay 30 -x {args:tests}" test-cov = "coverage run -m pytest {args:tests}" -cov-report = [ - "- coverage combine", - "coverage report", -] -cov = [ - "test-cov", - "cov-report", -] -docs = [ - "pydoc-markdown pydoc/config.yml" -] +cov-report = ["- coverage combine", "coverage report"] +cov = ["test-cov", "cov-report"] +docs = ["pydoc-markdown pydoc/config.yml"] [[tool.hatch.envs.test.matrix]] python = ["38", "39", "310", "311"] @@ -104,7 +97,7 @@ parallel = true [tool.coverage.report] omit = ["*/tests/*", "*/__init__.py"] -show_missing=true +show_missing = true exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] [tool.ruff] diff --git a/integrations/jina/pyproject.toml b/integrations/jina/pyproject.toml index e724cac96..bcf951834 100644 --- a/integrations/jina/pyproject.toml +++ b/integrations/jina/pyproject.toml @@ -45,7 +45,7 @@ git_describe_command = 'git describe --tags --match="integrations/jina-v[0-9]*"' [tool.hatch.envs.default] dependencies = ["coverage[toml]>=6.5", "pytest", "haystack-pydoc-tools"] [tool.hatch.envs.default.scripts] -test = "pytest {args:tests}" +test = "pytest --reruns 3 --reruns-delay 30 -x {args:tests}" test-cov = "coverage run -m pytest {args:tests}" cov-report = ["- coverage combine", "coverage report"] cov = ["test-cov", "cov-report"] @@ -135,12 +135,8 @@ parallel = false [tool.coverage.report] omit = ["*/tests/*", "*/__init__.py"] -show_missing=true -exclude_lines = [ - "no cov", - "if __name__ == .__main__.:", - "if TYPE_CHECKING:", -] +show_missing = true +exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] [[tool.mypy.overrides]] module = ["haystack.*", "haystack_integrations.*", "pytest.*"] diff --git a/integrations/langfuse/pyproject.toml b/integrations/langfuse/pyproject.toml index 504d816ae..f535e99ca 100644 --- a/integrations/langfuse/pyproject.toml +++ b/integrations/langfuse/pyproject.toml @@ -10,9 +10,7 @@ readme = "README.md" requires-python = ">=3.8" license = "Apache-2.0" keywords = [] -authors = [ - { name = "deepset GmbH", email = "info@deepset.ai" }, -] +authors = [{ name = "deepset GmbH", email = "info@deepset.ai" }] classifiers = [ "Development Status :: 4 - Beta", "Programming Language :: Python", @@ -24,10 +22,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = [ - "haystack-ai>=2.1.0", - "langfuse" -] +dependencies = ["haystack-ai>=2.1.0", "langfuse"] [project.urls] Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/langfuse#readme" @@ -50,19 +45,14 @@ git_describe_command = 'git describe --tags --match="integrations/langfuse-v[0-9 dependencies = [ "coverage[toml]>=6.5", "pytest", + "pytest-rerunfailures", "haystack-pydoc-tools", ] [tool.hatch.envs.default.scripts] -test = "pytest {args:tests}" +test = "pytest --reruns 3 --reruns-delay 30 -x {args:tests}" test-cov = "coverage run -m pytest {args:tests}" -cov-report = [ - "- coverage combine", - "coverage report", -] -cov = [ - "test-cov", - "cov-report", -] +cov-report = ["- coverage combine", "coverage report"] +cov = ["test-cov", "cov-report"] docs = ["pydoc-markdown pydoc/config.yml"] @@ -160,12 +150,8 @@ parallel = false [tool.coverage.report] omit = ["*/tests/*", "*/__init__.py"] -show_missing=true -exclude_lines = [ - "no cov", - "if __name__ == .__main__.:", - "if TYPE_CHECKING:", -] +show_missing = true +exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] [[tool.mypy.overrides]] module = [ @@ -179,7 +165,5 @@ ignore_missing_imports = true [tool.pytest.ini_options] addopts = "--strict-markers" -markers = [ - "integration: integration tests", -] +markers = ["integration: integration tests"] log_cli = true diff --git a/integrations/llama_cpp/pyproject.toml b/integrations/llama_cpp/pyproject.toml index a90118ee4..05ff6747c 100644 --- a/integrations/llama_cpp/pyproject.toml +++ b/integrations/llama_cpp/pyproject.toml @@ -15,7 +15,7 @@ authors = [ { name = "Ashwin Mathur", email = "" }, ] classifiers = [ - "License :: OSI Approved :: Apache Software License", + "License :: OSI Approved :: Apache Software License", "Development Status :: 4 - Beta", "Programming Language :: Python", "Programming Language :: Python :: 3.8", @@ -26,10 +26,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = [ - "haystack-ai", - "llama-cpp-python" -] +dependencies = ["haystack-ai", "llama-cpp-python"] [project.urls] Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/llama_cpp#readme" @@ -51,50 +48,29 @@ git_describe_command = 'git describe --tags --match="integrations/llama_cpp-v[0- dependencies = [ "coverage[toml]>=6.5", "pytest", + "pytest-rerunfailures", "haystack-pydoc-tools", - "transformers[sentencepiece]" + "transformers[sentencepiece]", ] [tool.hatch.envs.default.scripts] -test = "pytest {args:tests}" +test = "pytest --reruns 3 --reruns-delay 30 -x {args:tests}" test-cov = "coverage run -m pytest {args:tests}" -cov-report = [ - "- coverage combine", - "coverage report", -] -cov = [ - "test-cov", - "cov-report", -] -docs = [ - "pydoc-markdown pydoc/config.yml" -] +cov-report = ["- coverage combine", "coverage report"] +cov = ["test-cov", "cov-report"] +docs = ["pydoc-markdown pydoc/config.yml"] [[tool.hatch.envs.all.matrix]] python = ["3.8", "3.9", "3.10", "3.11", "3.12"] [tool.hatch.envs.lint] detached = true -dependencies = [ - "black>=23.1.0", - "mypy>=1.0.0", - "ruff>=0.0.243", -] +dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"] [tool.hatch.envs.lint.scripts] typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}" -style = [ - "ruff {args:.}", - "black --check --diff {args:.}", -] -fmt = [ - "black {args:.}", - "ruff --fix {args:.}", - "style", -] -all = [ - "style", - "typing", -] +style = ["ruff {args:.}", "black --check --diff {args:.}"] +fmt = ["black {args:.}", "ruff --fix {args:.}", "style"] +all = ["style", "typing"] [tool.hatch.metadata] allow-direct-references = true @@ -140,9 +116,15 @@ ignore = [ # Allow non-abstract empty methods in abstract base classes "B027", # Ignore checks for possible passwords - "S105", "S106", "S107", + "S105", + "S106", + "S107", # Ignore complexity - "C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915", + "C901", + "PLR0911", + "PLR0912", + "PLR0913", + "PLR0915", ] unfixable = [ # Don't touch unused imports @@ -167,27 +149,16 @@ parallel = false [tool.coverage.report] omit = ["*/tests/*", "*/__init__.py"] -show_missing=true -exclude_lines = [ - "no cov", - "if __name__ == .__main__.:", - "if TYPE_CHECKING:", -] +show_missing = true +exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] [tool.pytest.ini_options] markers = [ "integration: marks tests as slow (deselect with '-m \"not integration\"')", ] -addopts = [ - "--import-mode=importlib", -] +addopts = ["--import-mode=importlib"] [[tool.mypy.overrides]] -module = [ - "haystack.*", - "haystack_integrations.*", - "pytest.*", - "llama_cpp.*" -] +module = ["haystack.*", "haystack_integrations.*", "pytest.*", "llama_cpp.*"] ignore_missing_imports = true diff --git a/integrations/mistral/pyproject.toml b/integrations/mistral/pyproject.toml index 460dbc4cc..f57c1ff80 100644 --- a/integrations/mistral/pyproject.toml +++ b/integrations/mistral/pyproject.toml @@ -43,7 +43,7 @@ git_describe_command = 'git describe --tags --match="integrations/mistral-v[0-9] [tool.hatch.envs.default] dependencies = ["coverage[toml]>=6.5", "pytest", "haystack-pydoc-tools"] [tool.hatch.envs.default.scripts] -test = "pytest {args:tests}" +test = "pytest --reruns 3 --reruns-delay 30 -x {args:tests}" test-cov = "coverage run -m pytest {args:tests}" cov-report = ["- coverage combine", "coverage report"] cov = ["test-cov", "cov-report"] @@ -135,12 +135,8 @@ parallel = false [tool.coverage.report] omit = ["*/tests/*", "*/__init__.py"] -show_missing=true -exclude_lines = [ - "no cov", - "if __name__ == .__main__.:", - "if TYPE_CHECKING:", -] +show_missing = true +exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] [[tool.mypy.overrides]] diff --git a/integrations/mongodb_atlas/pyproject.toml b/integrations/mongodb_atlas/pyproject.toml index df6a1dec6..8ca6f2f88 100644 --- a/integrations/mongodb_atlas/pyproject.toml +++ b/integrations/mongodb_atlas/pyproject.toml @@ -10,9 +10,7 @@ readme = "README.md" requires-python = ">=3.8" license = "Apache-2.0" keywords = [] -authors = [ - { name = "deepset GmbH", email = "info@deepset.ai" }, -] +authors = [{ name = "deepset GmbH", email = "info@deepset.ai" }] classifiers = [ "License :: OSI Approved :: Apache Software License", "Development Status :: 4 - Beta", @@ -25,10 +23,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = [ - "haystack-ai", - "pymongo[srv]", -] +dependencies = ["haystack-ai", "pymongo[srv]"] [project.urls] Source = "https://github.com/deepset-ai/haystack-core-integrations" @@ -50,49 +45,28 @@ git_describe_command = 'git describe --tags --match="integrations/mongodb_atlas- dependencies = [ "coverage[toml]>=6.5", "pytest", + "pytest-rerunfailures", "ipython", "haystack-pydoc-tools", ] [tool.hatch.envs.default.scripts] -test = "pytest {args:tests}" +test = "pytest --reruns 3 --reruns-delay 30 -x {args:tests}" test-cov = "coverage run -m pytest {args:tests}" -cov-report = [ - "- coverage combine", - "coverage report", -] -cov = [ - "test-cov", - "cov-report", -] -docs = [ - "pydoc-markdown pydoc/config.yml" -] +cov-report = ["- coverage combine", "coverage report"] +cov = ["test-cov", "cov-report"] +docs = ["pydoc-markdown pydoc/config.yml"] [[tool.hatch.envs.all.matrix]] python = ["3.8", "3.9", "3.10", "3.11", "3.12"] [tool.hatch.envs.lint] detached = true -dependencies = [ - "black>=23.1.0", - "mypy>=1.0.0", - "ruff>=0.0.243", -] +dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"] [tool.hatch.envs.lint.scripts] typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}" -style = [ - "ruff {args:.}", - "black --check --diff {args:.}", -] -fmt = [ - "black {args:.}", - "ruff --fix {args:.}", - "style", -] -all = [ - "style", - "typing", -] +style = ["ruff {args:.}", "black --check --diff {args:.}"] +fmt = ["black {args:.}", "ruff --fix {args:.}", "style"] +all = ["style", "typing"] [tool.black] target-version = ["py38"] @@ -135,9 +109,15 @@ ignore = [ # Allow boolean positional values in function calls, like `dict.get(... True)` "FBT003", # Ignore checks for possible passwords - "S105", "S106", "S107", + "S105", + "S106", + "S107", # Ignore complexity - "C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915", + "C901", + "PLR0911", + "PLR0912", + "PLR0913", + "PLR0915", ] unfixable = [ # Don't touch unused imports @@ -164,19 +144,10 @@ parallel = false [tool.coverage.report] omit = ["*/tests/*", "*/__init__.py"] -show_missing=true -exclude_lines = [ - "no cov", - "if __name__ == .__main__.:", - "if TYPE_CHECKING:", -] +show_missing = true +exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] [[tool.mypy.overrides]] -module = [ - "haystack.*", - "haystack_integrations.*", - "pymongo.*", - "pytest.*" -] +module = ["haystack.*", "haystack_integrations.*", "pymongo.*", "pytest.*"] ignore_missing_imports = true diff --git a/integrations/nvidia/pyproject.toml b/integrations/nvidia/pyproject.toml index 6d823407b..7e467fca2 100644 --- a/integrations/nvidia/pyproject.toml +++ b/integrations/nvidia/pyproject.toml @@ -44,7 +44,7 @@ git_describe_command = 'git describe --tags --match="integrations/nvidia-v[0-9]* [tool.hatch.envs.default] dependencies = ["coverage[toml]>=6.5", "pytest", "haystack-pydoc-tools"] [tool.hatch.envs.default.scripts] -test = "pytest {args:tests}" +test = "pytest --reruns 3 --reruns-delay 30 -x {args:tests}" test-cov = "coverage run -m pytest {args:tests}" cov-report = ["- coverage combine", "coverage report"] cov = ["test-cov", "cov-report"] diff --git a/integrations/ollama/pyproject.toml b/integrations/ollama/pyproject.toml index d98e2a6ca..3a937d3ff 100644 --- a/integrations/ollama/pyproject.toml +++ b/integrations/ollama/pyproject.toml @@ -16,7 +16,7 @@ authors = [ { name = "deepset GmbH", email = "info@deepset.ai" }, ] classifiers = [ - "License :: OSI Approved :: Apache Software License", + "License :: OSI Approved :: Apache Software License", "Development Status :: 4 - Beta", "Programming Language :: Python", "Programming Language :: Python :: 3.8", @@ -49,22 +49,15 @@ git_describe_command = 'git describe --tags --match="integrations/ollama-v[0-9]* dependencies = [ "coverage[toml]>=6.5", "pytest", + "pytest-rerunfailures", "haystack-pydoc-tools", ] [tool.hatch.envs.default.scripts] -test = "pytest {args:tests}" +test = "pytest --reruns 3 --reruns-delay 30 -x {args:tests}" test-cov = "coverage run -m pytest {args:tests}" -cov-report = [ - "- coverage combine", - "coverage report", -] -cov = [ - "test-cov", - "cov-report", -] -docs = [ - "pydoc-markdown pydoc/config.yml" -] +cov-report = ["- coverage combine", "coverage report"] +cov = ["test-cov", "cov-report"] +docs = ["pydoc-markdown pydoc/config.yml"] [[tool.hatch.envs.all.matrix]] python = ["3.8", "3.9", "3.10", "3.11", "3.12"] @@ -72,27 +65,13 @@ python = ["3.8", "3.9", "3.10", "3.11", "3.12"] [tool.hatch.envs.lint] detached = true -dependencies = [ - "black>=23.1.0", - "mypy>=1.0.0", - "ruff>=0.0.243", -] +dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"] [tool.hatch.envs.lint.scripts] typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}" -style = [ - "ruff {args:.}", - "black --check --diff {args:.}", -] -fmt = [ - "black {args:.}", - "ruff --fix {args:.}", - "style", -] -all = [ - "style", - "typing", -] +style = ["ruff {args:.}", "black --check --diff {args:.}"] +fmt = ["black {args:.}", "ruff --fix {args:.}", "style"] +all = ["style", "typing"] [tool.hatch.metadata] allow-direct-references = true @@ -138,9 +117,15 @@ ignore = [ # Allow non-abstract empty methods in abstract base classes "B027", # Ignore checks for possible passwords - "S105", "S106", "S107", + "S105", + "S106", + "S107", # Ignore complexity - "C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915", + "C901", + "PLR0911", + "PLR0912", + "PLR0913", + "PLR0915", ] unfixable = [ # Don't touch unused imports @@ -164,25 +149,15 @@ parallel = false [tool.coverage.report] omit = ["*/tests/*", "*/__init__.py"] -show_missing=true -exclude_lines = [ - "no cov", - "if __name__ == .__main__.:", - "if TYPE_CHECKING:", -] +show_missing = true +exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] [tool.pytest.ini_options] markers = [ "integration: marks tests as slow (deselect with '-m \"not integration\"')", ] -addopts = [ - "--import-mode=importlib", -] +addopts = ["--import-mode=importlib"] [[tool.mypy.overrides]] -module = [ - "haystack.*", - "haystack_integrations.*", - "pytest.*" -] +module = ["haystack.*", "haystack_integrations.*", "pytest.*"] ignore_missing_imports = true diff --git a/integrations/opensearch/pyproject.toml b/integrations/opensearch/pyproject.toml index 38f93f3a2..af879acd6 100644 --- a/integrations/opensearch/pyproject.toml +++ b/integrations/opensearch/pyproject.toml @@ -10,9 +10,7 @@ readme = "README.md" requires-python = ">=3.8" license = "Apache-2.0" keywords = [] -authors = [ - { name = "deepset", email = "info@deepset.ai" }, -] +authors = [{ name = "deepset", email = "info@deepset.ai" }] classifiers = [ "License :: OSI Approved :: Apache Software License", "Development Status :: 4 - Beta", @@ -24,10 +22,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = [ - "haystack-ai", - "opensearch-py>=2,<3", -] +dependencies = ["haystack-ai", "opensearch-py>=2,<3"] [project.urls] Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/opensearch#readme" @@ -49,50 +44,29 @@ git_describe_command = 'git describe --tags --match="integrations/opensearch-v[0 dependencies = [ "coverage[toml]>=6.5", "pytest", + "pytest-rerunfailures", "pytest-xdist", "haystack-pydoc-tools", ] [tool.hatch.envs.default.scripts] -test = "pytest {args:tests}" +test = "pytest --reruns 3 --reruns-delay 30 -x {args:tests}" test-cov = "coverage run -m pytest {args:tests}" -cov-report = [ - "- coverage combine", - "coverage report", -] -cov = [ - "test-cov", - "cov-report", -] +cov-report = ["- coverage combine", "coverage report"] +cov = ["test-cov", "cov-report"] -docs = [ - "pydoc-markdown pydoc/config.yml" -] +docs = ["pydoc-markdown pydoc/config.yml"] [[tool.hatch.envs.all.matrix]] python = ["3.8", "3.9", "3.10", "3.11"] [tool.hatch.envs.lint] detached = true -dependencies = [ - "black>=23.1.0", - "mypy>=1.0.0", - "ruff>=0.0.243", -] +dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"] [tool.hatch.envs.lint.scripts] typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}" -style = [ - "ruff {args:.}", - "black --check --diff {args:.}", -] -fmt = [ - "black {args:.}", - "ruff --fix {args:.}", - "style", -] -all = [ - "style", - "typing", -] +style = ["ruff {args:.}", "black --check --diff {args:.}"] +fmt = ["black {args:.}", "ruff --fix {args:.}", "style"] +all = ["style", "typing"] [tool.hatch.metadata] allow-direct-references = true @@ -138,9 +112,15 @@ ignore = [ # Allow boolean positional values in function calls, like `dict.get(... True)` "FBT003", # Ignore checks for possible passwords - "S105", "S106", "S107", + "S105", + "S106", + "S107", # Ignore complexity - "C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915", + "C901", + "PLR0911", + "PLR0912", + "PLR0913", + "PLR0915", ] unfixable = [ # Don't touch unused imports @@ -165,26 +145,14 @@ parallel = false [tool.coverage.report] omit = ["*/tests/*", "*/__init__.py"] -show_missing=true -exclude_lines = [ - "no cov", - "if __name__ == .__main__.:", - "if TYPE_CHECKING:", -] +show_missing = true +exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] [tool.pytest.ini_options] minversion = "6.0" -markers = [ - "unit: unit tests", - "integration: integration tests" -] +markers = ["unit: unit tests", "integration: integration tests"] [[tool.mypy.overrides]] -module = [ - "haystack.*", - "haystack_integrations.*", - "pytest.*", - "opensearchpy.*", -] +module = ["haystack.*", "haystack_integrations.*", "pytest.*", "opensearchpy.*"] ignore_missing_imports = true diff --git a/integrations/optimum/pyproject.toml b/integrations/optimum/pyproject.toml index a0ed15f92..e5c1c1d78 100644 --- a/integrations/optimum/pyproject.toml +++ b/integrations/optimum/pyproject.toml @@ -57,11 +57,13 @@ git_describe_command = 'git describe --tags --match="integrations/optimum-v[0-9] dependencies = [ "coverage[toml]>=6.5", "pytest", + "pytest-rerunfailures", "haystack-pydoc-tools", - "databind-core<4.5.0", "setuptools", # FIXME: the latest 4.5.0 causes loops in pip resolver + "databind-core<4.5.0", + "setuptools", # FIXME: the latest 4.5.0 causes loops in pip resolver ] [tool.hatch.envs.default.scripts] -test = "pytest {args:tests}" +test = "pytest --reruns 3 --reruns-delay 30 -x {args:tests}" test-cov = "coverage run -m pytest {args:tests}" cov-report = ["- coverage combine", "coverage report"] cov = ["test-cov", "cov-report"] @@ -161,12 +163,8 @@ parallel = false [tool.coverage.report] omit = ["*/tests/*", "*/__init__.py"] -show_missing=true -exclude_lines = [ - "no cov", - "if __name__ == .__main__.:", - "if TYPE_CHECKING:", -] +show_missing = true +exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] [[tool.mypy.overrides]] diff --git a/integrations/pgvector/pyproject.toml b/integrations/pgvector/pyproject.toml index b440cf28e..9ea2d3a58 100644 --- a/integrations/pgvector/pyproject.toml +++ b/integrations/pgvector/pyproject.toml @@ -10,9 +10,7 @@ readme = "README.md" requires-python = ">=3.8" license = "Apache-2.0" keywords = [] -authors = [ - { name = "deepset GmbH", email = "info@deepset.ai" }, -] +authors = [{ name = "deepset GmbH", email = "info@deepset.ai" }] classifiers = [ "License :: OSI Approved :: Apache Software License", "Development Status :: 4 - Beta", @@ -25,11 +23,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = [ - "haystack-ai", - "pgvector", - "psycopg[binary]" -] +dependencies = ["haystack-ai", "pgvector", "psycopg[binary]"] [project.urls] Source = "https://github.com/deepset-ai/haystack-core-integrations" @@ -51,49 +45,28 @@ git_describe_command = 'git describe --tags --match="integrations/pgvector-v[0-9 dependencies = [ "coverage[toml]>=6.5", "pytest", + "pytest-rerunfailures", "ipython", "haystack-pydoc-tools", ] [tool.hatch.envs.default.scripts] -test = "pytest {args:tests}" +test = "pytest --reruns 3 --reruns-delay 30 -x {args:tests}" test-cov = "coverage run -m pytest {args:tests}" -cov-report = [ - "- coverage combine", - "coverage report", -] -cov = [ - "test-cov", - "cov-report", -] -docs = [ - "pydoc-markdown pydoc/config.yml" -] +cov-report = ["- coverage combine", "coverage report"] +cov = ["test-cov", "cov-report"] +docs = ["pydoc-markdown pydoc/config.yml"] [[tool.hatch.envs.all.matrix]] python = ["3.8", "3.9", "3.10", "3.11", "3.12"] [tool.hatch.envs.lint] detached = true -dependencies = [ - "black>=23.1.0", - "mypy>=1.0.0", - "ruff>=0.0.243", -] +dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"] [tool.hatch.envs.lint.scripts] typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}" -style = [ - "ruff {args:.}", - "black --check --diff {args:.}", -] -fmt = [ - "black {args:.}", - "ruff --fix {args:.}", - "style", -] -all = [ - "style", - "typing", -] +style = ["ruff {args:.}", "black --check --diff {args:.}"] +fmt = ["black {args:.}", "ruff --fix {args:.}", "style"] +all = ["style", "typing"] [tool.black] target-version = ["py38"] @@ -136,9 +109,15 @@ ignore = [ # Allow boolean positional values in function calls, like `dict.get(... True)` "FBT003", # Ignore checks for possible passwords - "S105", "S106", "S107", + "S105", + "S106", + "S107", # Ignore complexity - "C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915", + "C901", + "PLR0911", + "PLR0912", + "PLR0913", + "PLR0915", # ignore function-call-in-default-argument "B008", ] @@ -167,17 +146,11 @@ parallel = false [tool.coverage.report] omit = ["*/tests/*", "*/__init__.py"] -show_missing=true -exclude_lines = [ - "no cov", - "if __name__ == .__main__.:", - "if TYPE_CHECKING:", -] +show_missing = true +exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] [tool.pytest.ini_options] -markers = [ - "integration: integration tests" -] +markers = ["integration: integration tests"] [[tool.mypy.overrides]] @@ -186,6 +159,6 @@ module = [ "haystack_integrations.*", "pgvector.*", "psycopg.*", - "pytest.*" + "pytest.*", ] ignore_missing_imports = true diff --git a/integrations/pinecone/pyproject.toml b/integrations/pinecone/pyproject.toml index dec8394a1..c79b80161 100644 --- a/integrations/pinecone/pyproject.toml +++ b/integrations/pinecone/pyproject.toml @@ -24,7 +24,7 @@ classifiers = [ ] dependencies = [ "haystack-ai", - "pinecone-client>=3" # our implementation is not compatible with pinecone-client <3 + "pinecone-client>=3", # our implementation is not compatible with pinecone-client <3 ] [project.urls] @@ -47,6 +47,7 @@ git_describe_command = 'git describe --tags --match="integrations/pinecone-v[0-9 dependencies = [ "coverage[toml]>=6.5", "pytest", + "pytest-rerunfailures", "pytest-xdist", "haystack-pydoc-tools", ] @@ -150,12 +151,8 @@ parallel = false [tool.coverage.report] omit = ["*/tests/*", "*/__init__.py"] -show_missing=true -exclude_lines = [ - "no cov", - "if __name__ == .__main__.:", - "if TYPE_CHECKING:", -] +show_missing = true +exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] [tool.pytest.ini_options] minversion = "6.0" diff --git a/integrations/qdrant/pyproject.toml b/integrations/qdrant/pyproject.toml index 05de42585..f535fd7a6 100644 --- a/integrations/qdrant/pyproject.toml +++ b/integrations/qdrant/pyproject.toml @@ -46,7 +46,7 @@ git_describe_command = 'git describe --tags --match="integrations/qdrant-v[0-9]* [tool.hatch.envs.default] dependencies = ["coverage[toml]>=6.5", "pytest", "haystack-pydoc-tools"] [tool.hatch.envs.default.scripts] -test = "pytest {args:tests}" +test = "pytest --reruns 3 --reruns-delay 30 -x {args:tests}" test-cov = "coverage run -m pytest {args:tests}" cov-report = ["- coverage combine", "coverage report"] cov = ["test-cov", "cov-report"] @@ -105,7 +105,8 @@ ignore = [ # Allow boolean positional values in function calls, like `dict.get(... True)` "FBT003", # Allow boolean arguments in function definition - "FBT001", "FBT002", + "FBT001", + "FBT002", # Ignore checks for possible passwords "S105", "S106", @@ -140,12 +141,8 @@ parallel = false [tool.coverage.report] omit = ["*/tests/*", "*/__init__.py"] -show_missing=true -exclude_lines = [ - "no cov", - "if __name__ == .__main__.:", - "if TYPE_CHECKING:", -] +show_missing = true +exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] [[tool.mypy.overrides]] diff --git a/integrations/ragas/pyproject.toml b/integrations/ragas/pyproject.toml index a763ab17c..6a43aebea 100644 --- a/integrations/ragas/pyproject.toml +++ b/integrations/ragas/pyproject.toml @@ -43,7 +43,7 @@ git_describe_command = 'git describe --tags --match="integrations/ragas-v[0-9]*" [tool.hatch.envs.default] dependencies = ["coverage[toml]>=6.5", "pytest", "haystack-pydoc-tools"] [tool.hatch.envs.default.scripts] -test = "pytest {args:tests}" +test = "pytest --reruns 3 --reruns-delay 30 -x {args:tests}" test-cov = "coverage run -m pytest {args:tests}" cov-report = ["- coverage combine", "coverage report"] cov = ["test-cov", "cov-report"] @@ -140,12 +140,8 @@ parallel = false [tool.coverage.report] omit = ["*/tests/*", "*/__init__.py"] -show_missing=true -exclude_lines = [ - "no cov", - "if __name__ == .__main__.:", - "if TYPE_CHECKING:", -] +show_missing = true +exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] [[tool.mypy.overrides]] diff --git a/integrations/unstructured/pyproject.toml b/integrations/unstructured/pyproject.toml index 8619991a0..05a8b6f30 100644 --- a/integrations/unstructured/pyproject.toml +++ b/integrations/unstructured/pyproject.toml @@ -10,9 +10,7 @@ readme = "README.md" requires-python = ">=3.9" license = "Apache-2.0" keywords = [] -authors = [ - { name = "deepset GmbH", email = "info@deepset.ai" }, -] +authors = [{ name = "deepset GmbH", email = "info@deepset.ai" }] classifiers = [ "License :: OSI Approved :: Apache Software License", "Development Status :: 4 - Beta", @@ -23,10 +21,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = [ - "haystack-ai", - "unstructured", -] +dependencies = ["haystack-ai", "unstructured"] [project.urls] Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/unstructured#readme" @@ -48,49 +43,28 @@ git_describe_command = 'git describe --tags --match="integrations/unstructured-v dependencies = [ "coverage[toml]>=6.5", "pytest", + "pytest-rerunfailures", "pytest-xdist", "haystack-pydoc-tools", ] [tool.hatch.envs.default.scripts] -test = "pytest {args:tests}" +test = "pytest --reruns 3 --reruns-delay 30 -x {args:tests}" test-cov = "coverage run -m pytest {args:tests}" -cov-report = [ - "- coverage combine", - "coverage report", -] -cov = [ - "test-cov", - "cov-report", -] -docs = [ - "pydoc-markdown pydoc/config.yml" -] +cov-report = ["- coverage combine", "coverage report"] +cov = ["test-cov", "cov-report"] +docs = ["pydoc-markdown pydoc/config.yml"] [[tool.hatch.envs.all.matrix]] python = ["3.9", "3.10", "3.11"] [tool.hatch.envs.lint] detached = true -dependencies = [ - "black>=23.1.0", - "mypy>=1.0.0", - "ruff>=0.0.243", -] +dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"] [tool.hatch.envs.lint.scripts] typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}" -style = [ - "ruff {args:.}", - "black --check --diff {args:.}", -] -fmt = [ - "black {args:.}", - "ruff --fix {args:.}", - "style", -] -all = [ - "style", - "typing", -] +style = ["ruff {args:.}", "black --check --diff {args:.}"] +fmt = ["black {args:.}", "ruff --fix {args:.}", "style"] +all = ["style", "typing"] [tool.hatch.metadata] allow-direct-references = true @@ -136,9 +110,15 @@ ignore = [ # Allow boolean positional values in function calls, like `dict.get(... True)` "FBT003", # Ignore checks for possible passwords - "S105", "S106", "S107", + "S105", + "S106", + "S107", # Ignore complexity - "C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915", + "C901", + "PLR0911", + "PLR0912", + "PLR0913", + "PLR0915", ] unfixable = [ # Don't touch unused imports @@ -162,25 +142,13 @@ parallel = true [tool.coverage.report] omit = ["*/tests/*", "*/__init__.py"] -show_missing=true -exclude_lines = [ - "no cov", - "if __name__ == .__main__.:", - "if TYPE_CHECKING:", -] +show_missing = true +exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] [tool.pytest.ini_options] minversion = "6.0" -markers = [ - "unit: unit tests", - "integration: integration tests" -] +markers = ["unit: unit tests", "integration: integration tests"] [[tool.mypy.overrides]] -module = [ - "haystack.*", - "haystack_integrations.*", - "pytest.*", - "unstructured.*", -] +module = ["haystack.*", "haystack_integrations.*", "pytest.*", "unstructured.*"] ignore_missing_imports = true diff --git a/integrations/weaviate/pyproject.toml b/integrations/weaviate/pyproject.toml index b0a618505..b4be4fbe6 100644 --- a/integrations/weaviate/pyproject.toml +++ b/integrations/weaviate/pyproject.toml @@ -49,7 +49,7 @@ git_describe_command = 'git describe --tags --match="integrations/weaviate-v[0-9 [tool.hatch.envs.default] dependencies = ["coverage[toml]>=6.5", "pytest", "ipython"] [tool.hatch.envs.default.scripts] -test = "pytest {args:tests}" +test = "pytest --reruns 3 --reruns-delay 30 -x {args:tests}" test-cov = "coverage run -m pytest {args:tests}" cov-report = ["- coverage combine", "coverage report"] cov = ["test-cov", "cov-report"] @@ -141,12 +141,8 @@ parallel = false [tool.coverage.report] omit = ["*/tests/*", "*/__init__.py"] -show_missing=true -exclude_lines = [ - "no cov", - "if __name__ == .__main__.:", - "if TYPE_CHECKING:", -] +show_missing = true +exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] [[tool.mypy.overrides]]