Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make tests show coverage #566

Merged
merged 2 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions integrations/astra/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -158,24 +158,21 @@ ban-relative-imports = "parents"
"tests/**/*" = ["PLR2004", "S101", "TID252"]

[tool.coverage.run]
source_pkgs = ["haystack_integrations", "tests"]
source = ["haystack_integrations"]
branch = true
parallel = true
omit = [
"example"
]
parallel = false

[tool.coverage.paths]
astra_haystack = ["src"]
tests = ["tests"]

[tool.coverage.report]
omit = ["*/tests/*", "*/__init__.py"]
show_missing=true
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]


[tool.pytest.ini_options]
minversion = "6.0"
markers = [
Expand Down
13 changes: 5 additions & 8 deletions integrations/chroma/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -160,24 +160,21 @@ ban-relative-imports = "parents"
"tests/**/*" = ["PLR2004", "S101", "TID252"]

[tool.coverage.run]
source_pkgs = ["src", "tests"]
source = ["haystack_integrations"]
branch = true
parallel = true
omit = [
"example"
]
parallel = false

[tool.coverage.paths]
chroma_haystack = ["src/haystack_integrations", "*/chroma-haystack/src/chroma_haystack"]
tests = ["tests"]

[tool.coverage.report]
omit = ["*/tests/*", "*/__init__.py"]
show_missing=true
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]


[tool.pytest.ini_options]
minversion = "6.0"
markers = [
Expand Down
19 changes: 10 additions & 9 deletions integrations/cohere/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -128,19 +128,20 @@ ban-relative-imports = "parents"
"tests/**/*" = ["PLR2004", "S101", "TID252"]

[tool.coverage.run]
source_pkgs = ["src", "tests"]
source = ["haystack_integrations"]
branch = true
parallel = true
parallel = false

[tool.coverage.paths]
cohere_haystack = [
"src/haystack_integrations",
"*/cohere/src/haystack_integrations",
]
tests = ["tests", "*/cohere/tests"]

[tool.coverage.report]
exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"]
omit = ["*/tests/*", "*/__init__.py"]
show_missing=true
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]


[[tool.mypy.overrides]]
module = [
Expand Down
19 changes: 10 additions & 9 deletions integrations/deepeval/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -131,19 +131,20 @@ ban-relative-imports = "all"
"tests/**/*" = ["PLR2004", "S101", "TID252"]

[tool.coverage.run]
source_pkgs = ["src", "tests"]
source = ["haystack_integrations"]
branch = true
parallel = true
parallel = false

[tool.coverage.paths]
deepeval_haystack = [
"src/haystack_integrations",
"*/deepeval-haystack/src/deepeval_haystack",
]
tests = ["tests"]

[tool.coverage.report]
exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"]
omit = ["*/tests/*", "*/__init__.py"]
show_missing=true
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]


[[tool.mypy.overrides]]
module = [
Expand Down
10 changes: 5 additions & 5 deletions integrations/elasticsearch/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -156,21 +156,21 @@ ban-relative-imports = "parents"
"tests/**/*" = ["PLR2004", "S101", "TID252"]

[tool.coverage.run]
source_pkgs = ["src", "tests"]
source = ["haystack_integrations"]
branch = true
parallel = true
parallel = false

[tool.coverage.paths]
elasticsearch_haystack = ["src/haystack_integrations", "*/elasticsearch/src/haystack_integrations"]
tests = ["tests", "*/elasticsearch/src/tests"]

[tool.coverage.report]
omit = ["*/tests/*", "*/__init__.py"]
show_missing=true
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]


[tool.pytest.ini_options]
minversion = "6.0"
markers = [
Expand Down
6 changes: 2 additions & 4 deletions integrations/google_ai/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,8 @@ ban-relative-imports = "parents"
[tool.coverage.run]
source = ["haystack_integrations"]
branch = true
parallel = true
parallel = false

[tool.coverage.paths]
google_ai_haystack = ["src"]
tests = ["tests"]

[tool.coverage.report]
omit = ["*/tests/*", "*/__init__.py"]
Expand All @@ -168,6 +165,7 @@ exclude_lines = [
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]

[[tool.mypy.overrides]]
module = [
"google.*",
Expand Down
10 changes: 5 additions & 5 deletions integrations/google_vertex/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -148,21 +148,21 @@ ban-relative-imports = "parents"
"tests/**/*" = ["PLR2004", "S101", "TID252"]

[tool.coverage.run]
source_pkgs = ["haystack_integrations", "tests"]
source = ["haystack_integrations"]
branch = true
parallel = true
parallel = false

[tool.coverage.paths]
google_vertex_haystack = ["src/"]
tests = ["tests"]

[tool.coverage.report]
omit = ["*/tests/*", "*/__init__.py"]
show_missing=true
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]


[[tool.mypy.overrides]]
module = [
"vertexai.*",
Expand Down
6 changes: 2 additions & 4 deletions integrations/gradient/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,8 @@ ban-relative-imports = "parents"
[tool.coverage.run]
source = ["haystack_integrations"]
branch = true
parallel = true
parallel = false

[tool.coverage.paths]
gradient_haystack = ["src"]
tests = ["tests", "*/gradient-haystack/tests"]

[tool.coverage.report]
omit = ["*/tests/*", "*/__init__.py"]
Expand All @@ -172,6 +169,7 @@ exclude_lines = [
"if TYPE_CHECKING:",
]


[[tool.mypy.overrides]]
module = [
"gradientai.*",
Expand Down
15 changes: 9 additions & 6 deletions integrations/jina/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,19 @@ ban-relative-imports = "parents"
"tests/**/*" = ["PLR2004", "S101", "TID252"]

[tool.coverage.run]
source_pkgs = ["jina_haystack", "tests"]
source = ["haystack_integrations"]
branch = true
parallel = true
parallel = false

[tool.coverage.paths]
jina_haystack = ["src"]
tests = ["tests", "*/jina-haystack/tests"]

[tool.coverage.report]
exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"]
omit = ["*/tests/*", "*/__init__.py"]
show_missing=true
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]

[[tool.mypy.overrides]]
module = ["haystack.*", "haystack_integrations.*", "pytest.*"]
Expand Down
17 changes: 8 additions & 9 deletions integrations/llama_cpp/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -158,22 +158,21 @@ ban-relative-imports = "parents"
"tests/**" = ["T201"]

[tool.coverage.run]
source_pkgs = ["llama_cpp_haystack", "tests"]
source = ["haystack_integrations"]
branch = true
parallel = true
parallel = false


[tool.coverage.paths]
llama_cpp_haystack = ["src/haystack_integrations", "*/llama-cpp-haystack/src"]
tests = ["tests", "*/llama-cpp-haystack/tests"]

[tool.coverage.report]
omit = ["*/tests/*", "*/__init__.py"]
show_missing=true
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]


[tool.pytest.ini_options]
markers = [
"integration: marks tests as slow (deselect with '-m \"not integration\"')",
Expand Down
19 changes: 10 additions & 9 deletions integrations/mistral/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,19 +127,20 @@ ban-relative-imports = "parents"
"tests/**/*" = ["PLR2004", "S101", "TID252"]

[tool.coverage.run]
source_pkgs = ["src", "tests"]
source = ["haystack_integrations"]
branch = true
parallel = true
parallel = false

[tool.coverage.paths]
mistral_haystack = [
"src/haystack_integrations",
"*/mistral/src/haystack_integrations",
]
tests = ["tests", "*/mistral/tests"]

[tool.coverage.report]
exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"]
omit = ["*/tests/*", "*/__init__.py"]
show_missing=true
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]


[[tool.mypy.overrides]]
module = [
Expand Down
19 changes: 10 additions & 9 deletions integrations/nvidia/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -129,19 +129,20 @@ ban-relative-imports = "parents"
"tests/**/*" = ["PLR2004", "S101", "TID252"]

[tool.coverage.run]
source_pkgs = ["src", "tests"]
source = ["haystack_integrations"]
branch = true
parallel = true
parallel = false

[tool.coverage.paths]
nvidia_haystack = [
"src/haystack_integrations",
"*/nvidia/src/haystack_integrations",
]
tests = ["tests", "*/nvidia/tests"]

[tool.coverage.report]
exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"]
omit = ["*/tests/*", "*/__init__.py"]
show_missing=true
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]


[[tool.mypy.overrides]]
module = [
Expand Down
10 changes: 5 additions & 5 deletions integrations/opensearch/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -157,21 +157,21 @@ ban-relative-imports = "parents"
"tests/**/*" = ["PLR2004", "S101", "TID252"]

[tool.coverage.run]
source_pkgs = ["src", "tests"]
source = ["haystack_integrations"]
branch = true
parallel = true
parallel = false

[tool.coverage.paths]
opensearch_haystack = ["src/haystack_integrations", "*/opensearch-haystack/src"]
tests = ["tests", "*/opensearch-haystack/tests"]

[tool.coverage.report]
omit = ["*/tests/*", "*/__init__.py"]
show_missing=true
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]


[tool.pytest.ini_options]
minversion = "6.0"
markers = [
Expand Down
16 changes: 10 additions & 6 deletions integrations/optimum/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,20 @@ ban-relative-imports = "parents"
"tests/**" = ["T201"]

[tool.coverage.run]
source_pkgs = ["optimum", "tests"]
source = ["haystack_integrations"]
branch = true
parallel = true
parallel = false

[tool.coverage.paths]
optimum = ["src/haystack_integrations"]
tests = ["tests"]

[tool.coverage.report]
exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"]
omit = ["*/tests/*", "*/__init__.py"]
show_missing=true
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]


[[tool.mypy.overrides]]
module = [
Expand Down
Loading