-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Generate API docs for Pinecone (#359)
* ci: Generate API docs for Pinecone * Add working directory
- Loading branch information
Showing
3 changed files
with
63 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
loaders: | ||
- type: haystack_pydoc_tools.loaders.CustomPythonLoader | ||
search_path: [../src] | ||
modules: | ||
[ | ||
"haystack_integrations.components.retrievers.pinecone.dense_retriever", | ||
"haystack_integrations.document_stores.pinecone.document_store", | ||
"haystack_integrations.document_stores.pinecone.errors", | ||
"haystack_integrations.document_stores.pinecone.filters", | ||
] | ||
ignore_when_discovered: ["__init__"] | ||
processors: | ||
- type: filter | ||
expression: | ||
documented_only: true | ||
do_not_filter_modules: false | ||
skip_empty_modules: true | ||
- type: smart | ||
- type: crossref | ||
renderer: | ||
type: haystack_pydoc_tools.renderers.ReadmePreviewRenderer | ||
excerpt: Pinecone integration for Haystack | ||
category_slug: haystack-integrations | ||
title: Pinecone | ||
slug: integrations-pinecone | ||
order: 150 | ||
markdown: | ||
descriptive_class_title: false | ||
descriptive_module_title: true | ||
add_method_class_prefix: true | ||
add_member_class_prefix: false | ||
filename: _readme_pinecone.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,7 @@ readme = "README.md" | |
requires-python = ">=3.8" | ||
license = "Apache-2.0" | ||
keywords = [] | ||
authors = [ | ||
{ name = "deepset GmbH", email = "[email protected]" }, | ||
] | ||
authors = [{ name = "deepset GmbH", email = "[email protected]" }] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Programming Language :: Python", | ||
|
@@ -25,8 +23,8 @@ classifiers = [ | |
] | ||
dependencies = [ | ||
"haystack-ai", | ||
"pinecone-client<3", # our implementation is not compatible with pinecone-client>=3 | ||
# see https://github.com/deepset-ai/haystack-core-integrations/issues/223 | ||
"pinecone-client<3", # our implementation is not compatible with pinecone-client>=3 | ||
# see https://github.com/deepset-ai/haystack-core-integrations/issues/223 | ||
] | ||
|
||
[project.urls] | ||
|
@@ -50,47 +48,28 @@ dependencies = [ | |
"coverage[toml]>=6.5", | ||
"pytest", | ||
"pytest-xdist", | ||
"haystack-pydoc-tools", | ||
] | ||
[tool.hatch.envs.default.scripts] | ||
# Pinecone tests are slow (require HTTP requests), so we run them in parallel | ||
# with pytest-xdist (https://pytest-xdist.readthedocs.io/en/stable/distribution.html) | ||
test = "pytest -n auto --maxprocesses=2 {args:tests}" | ||
test-cov = "coverage run -m pytest -n auto --maxprocesses=2 {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"] | ||
|
||
[[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", | ||
"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.hatch.metadata] | ||
allow-direct-references = true | ||
|
@@ -136,9 +115,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,33 +144,19 @@ ban-relative-imports = "parents" | |
source_pkgs = ["src", "tests"] | ||
branch = true | ||
parallel = true | ||
omit = [ | ||
"examples" | ||
] | ||
omit = ["examples"] | ||
|
||
[tool.coverage.paths] | ||
pinecone_haystack = ["src/*"] | ||
tests = ["tests"] | ||
|
||
[tool.coverage.report] | ||
exclude_lines = [ | ||
"no cov", | ||
"if __name__ == .__main__.:", | ||
"if TYPE_CHECKING:", | ||
] | ||
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 = [ | ||
"pinecone.*", | ||
"haystack.*", | ||
"haystack_integrations.*", | ||
"pytest.*" | ||
] | ||
module = ["pinecone.*", "haystack.*", "haystack_integrations.*", "pytest.*"] | ||
ignore_missing_imports = true |