Skip to content

Commit f397967

Browse files
authored
docs: simplify pydoc configs (#2855)
* docs: simplify pydoc configs * small raises fix
1 parent b506f90 commit f397967

90 files changed

Lines changed: 457 additions & 1123 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CONTRIBUTING.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -273,17 +273,15 @@ change the code to also change relevant comments and docstrings. This type of do
273273
developers, but it can be handy for users at times. You can browse it on the dedicated section in the
274274
[documentation website](https://docs.haystack.deepset.ai/reference/integrations-chroma).
275275

276-
We use `pydoc-markdown` to convert docstrings into properly formatted Markdown files, and while the CI takes care of
277-
generating and publishing the updated documentation at every merge on the `main` branch, you can generate the docs
276+
We use [`haystack-pydoc-tools`](https://github.com/deepset-ai/haystack-pydoc-tools) to convert docstrings into properly formatted Markdown files, and while the CI takes care of
277+
generating and publishing the updated documentation once a new version is released, you can generate the docs
278278
locally using Hatch. From an integration folder:
279279

280280
```console
281281
$ hatch run docs
282282
```
283283

284-
If you see a warning referring to a missing `README_API_KEY` env var, that's expected.
285-
286-
If you want to customise the conversion process, the `pydoc-markdown` config files are stored in a `pydoc/` folder
284+
If you want to customise the conversion process, the `haystack-pydoc-tools` config files are stored in a `pydoc/` folder
287285
for each integration.
288286

289287
#### Documentation pages
Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,13 @@
11
loaders:
2-
- ignore_when_discovered:
3-
- __init__
4-
modules:
5-
- haystack_integrations.components.generators.aimlapi.chat.chat_generator
6-
search_path:
7-
- ../src
8-
type: haystack_pydoc_tools.loaders.CustomPythonLoader
2+
- modules:
3+
- haystack_integrations.components.generators.aimlapi.chat.chat_generator
4+
search_path: [../src]
95
processors:
10-
- do_not_filter_modules: false
11-
documented_only: true
12-
expression: null
13-
skip_empty_modules: true
14-
type: filter
15-
- type: smart
16-
- type: crossref
6+
- type: filter
7+
documented_only: true
8+
skip_empty_modules: true
179
renderer:
1810
description: AIMLAPI integration for Haystack
1911
id: integrations-aimlapi
20-
markdown:
21-
add_member_class_prefix: false
22-
add_method_class_prefix: true
23-
classdef_code_block: false
24-
descriptive_class_title: false
25-
descriptive_module_title: true
26-
filename: aimlapi.md
12+
filename: aimlapi.md
2713
title: AIMLAPI
28-
type: haystack_pydoc_tools.renderers.DocusaurusRenderer

integrations/aimlapi/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ git_describe_command = 'git describe --tags --match="integrations/aimlapi-v[0-9]
4444
installer = "uv"
4545
dependencies = ["haystack-pydoc-tools", "ruff"]
4646
[tool.hatch.envs.default.scripts]
47-
docs = ["pydoc-markdown pydoc/config_docusaurus.yml"]
47+
docs = ["haystack-pydoc pydoc/config_docusaurus.yml"]
4848
fmt = "ruff check --fix {args}; ruff format {args}"
4949
fmt-check = "ruff check {args} && ruff format --check {args}"
5050

Lines changed: 18 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,24 @@
11
loaders:
2-
- ignore_when_discovered:
3-
- __init__
4-
modules:
5-
- haystack_integrations.common.amazon_bedrock.errors
6-
- haystack_integrations.components.embedders.amazon_bedrock.document_embedder
7-
- haystack_integrations.components.embedders.amazon_bedrock.text_embedder
8-
- haystack_integrations.components.embedders.amazon_bedrock.document_image_embedder
9-
- haystack_integrations.components.generators.amazon_bedrock.generator
10-
- haystack_integrations.components.generators.amazon_bedrock.adapters
11-
- haystack_integrations.common.amazon_bedrock.errors
12-
- haystack_integrations.components.generators.amazon_bedrock.chat.chat_generator
13-
- haystack_integrations.components.rankers.amazon_bedrock.ranker
14-
- haystack_integrations.components.downloaders.s3.s3_downloader
15-
- haystack_integrations.common.s3.utils
16-
- haystack_integrations.common.s3.errors
17-
search_path:
18-
- ../src
19-
type: haystack_pydoc_tools.loaders.CustomPythonLoader
2+
- modules:
3+
- haystack_integrations.common.amazon_bedrock.errors
4+
- haystack_integrations.components.embedders.amazon_bedrock.document_embedder
5+
- haystack_integrations.components.embedders.amazon_bedrock.text_embedder
6+
- haystack_integrations.components.embedders.amazon_bedrock.document_image_embedder
7+
- haystack_integrations.components.generators.amazon_bedrock.generator
8+
- haystack_integrations.components.generators.amazon_bedrock.adapters
9+
- haystack_integrations.common.amazon_bedrock.errors
10+
- haystack_integrations.components.generators.amazon_bedrock.chat.chat_generator
11+
- haystack_integrations.components.rankers.amazon_bedrock.ranker
12+
- haystack_integrations.components.downloaders.s3.s3_downloader
13+
- haystack_integrations.common.s3.utils
14+
- haystack_integrations.common.s3.errors
15+
search_path: [../src]
2016
processors:
21-
- do_not_filter_modules: false
22-
documented_only: true
23-
expression: null
24-
skip_empty_modules: true
25-
type: filter
26-
- expression: name not in ['BedrockRanker']
27-
type: filter
28-
- type: smart
29-
- type: crossref
17+
- type: filter
18+
documented_only: true
19+
skip_empty_modules: true
3020
renderer:
3121
description: Amazon Bedrock integration for Haystack
3222
id: integrations-amazon-bedrock
33-
markdown:
34-
add_member_class_prefix: false
35-
add_method_class_prefix: true
36-
classdef_code_block: false
37-
descriptive_class_title: false
38-
descriptive_module_title: true
39-
filename: amazon_bedrock.md
23+
filename: amazon_bedrock.md
4024
title: Amazon Bedrock
41-
type: haystack_pydoc_tools.renderers.DocusaurusRenderer

integrations/amazon_bedrock/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ installer = "uv"
4545
dependencies = ["haystack-pydoc-tools", "ruff"]
4646

4747
[tool.hatch.envs.default.scripts]
48-
docs = ["pydoc-markdown pydoc/config_docusaurus.yml"]
48+
docs = ["haystack-pydoc pydoc/config_docusaurus.yml"]
4949
fmt = "ruff check --fix {args}; ruff format {args}"
5050
fmt-check = "ruff check {args} && ruff format --check {args}"
5151

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,13 @@
11
loaders:
2-
- ignore_when_discovered:
3-
- __init__
4-
modules:
5-
- haystack_integrations.components.generators.amazon_sagemaker.sagemaker
6-
search_path:
7-
- ../src
8-
type: haystack_pydoc_tools.loaders.CustomPythonLoader
2+
- modules:
3+
- haystack_integrations.components.generators.amazon_sagemaker.sagemaker
4+
search_path: [../src]
95
processors:
10-
- do_not_filter_modules: false
11-
documented_only: true
12-
expression: null
13-
skip_empty_modules: true
14-
type: filter
15-
- type: smart
16-
- type: crossref
6+
- type: filter
7+
documented_only: true
8+
skip_empty_modules: true
179
renderer:
1810
description: Amazon Sagemaker integration for Haystack
1911
id: integrations-amazon-sagemaker
20-
markdown:
21-
add_member_class_prefix: false
22-
add_method_class_prefix: true
23-
classdef_code_block: false
24-
descriptive_class_title: false
25-
descriptive_module_title: true
26-
filename: amazon_sagemaker.md
12+
filename: amazon_sagemaker.md
2713
title: Amazon Sagemaker
28-
type: haystack_pydoc_tools.renderers.DocusaurusRenderer

integrations/amazon_sagemaker/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ git_describe_command = 'git describe --tags --match="integrations/amazon_sagemak
4747
installer = "uv"
4848
dependencies = ["haystack-pydoc-tools", "ruff"]
4949
[tool.hatch.envs.default.scripts]
50-
docs = ["pydoc-markdown pydoc/config_docusaurus.yml"]
50+
docs = ["haystack-pydoc pydoc/config_docusaurus.yml"]
5151
fmt = "ruff check --fix {args}; ruff format {args}"
5252
fmt-check = "ruff check {args} && ruff format --check {args}"
5353

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,15 @@
11
loaders:
2-
- ignore_when_discovered:
3-
- __init__
4-
modules:
5-
- haystack_integrations.components.generators.anthropic.generator
6-
- haystack_integrations.components.generators.anthropic.chat.chat_generator
7-
- haystack_integrations.components.generators.anthropic.chat.vertex_chat_generator
8-
search_path:
9-
- ../src
10-
type: haystack_pydoc_tools.loaders.CustomPythonLoader
2+
- modules:
3+
- haystack_integrations.components.generators.anthropic.generator
4+
- haystack_integrations.components.generators.anthropic.chat.chat_generator
5+
- haystack_integrations.components.generators.anthropic.chat.vertex_chat_generator
6+
search_path: [../src]
117
processors:
12-
- do_not_filter_modules: false
13-
documented_only: true
14-
expression: null
15-
skip_empty_modules: true
16-
type: filter
17-
- type: smart
18-
- type: crossref
8+
- type: filter
9+
documented_only: true
10+
skip_empty_modules: true
1911
renderer:
2012
description: Anthropic integration for Haystack
2113
id: integrations-anthropic
22-
markdown:
23-
add_member_class_prefix: false
24-
add_method_class_prefix: true
25-
descriptive_class_title: false
26-
descriptive_module_title: true
27-
filename: anthropic.md
14+
filename: anthropic.md
2815
title: Anthropic
29-
type: haystack_pydoc_tools.renderers.DocusaurusRenderer

integrations/anthropic/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ installer = "uv"
4646
dependencies = ["haystack-pydoc-tools", "ruff"]
4747

4848
[tool.hatch.envs.default.scripts]
49-
docs = ["pydoc-markdown pydoc/config_docusaurus.yml"]
49+
docs = ["haystack-pydoc pydoc/config_docusaurus.yml"]
5050
fmt = "ruff check --fix {args}; ruff format {args}"
5151
fmt-check = "ruff check {args} && ruff format --check {args}"
5252

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,15 @@
11
loaders:
2-
- ignore_when_discovered:
3-
- __init__
4-
modules:
5-
- haystack_integrations.components.retrievers.astra.retriever
6-
- haystack_integrations.document_stores.astra.document_store
7-
- haystack_integrations.document_stores.astra.errors
8-
search_path:
9-
- ../src
10-
type: haystack_pydoc_tools.loaders.CustomPythonLoader
2+
- modules:
3+
- haystack_integrations.components.retrievers.astra.retriever
4+
- haystack_integrations.document_stores.astra.document_store
5+
- haystack_integrations.document_stores.astra.errors
6+
search_path: [../src]
117
processors:
12-
- do_not_filter_modules: false
13-
documented_only: true
14-
expression: null
15-
skip_empty_modules: true
16-
type: filter
17-
- type: smart
18-
- type: crossref
8+
- type: filter
9+
documented_only: true
10+
skip_empty_modules: true
1911
renderer:
2012
description: Astra integration for Haystack
2113
id: integrations-astra
22-
markdown:
23-
add_member_class_prefix: false
24-
add_method_class_prefix: true
25-
classdef_code_block: false
26-
descriptive_class_title: false
27-
descriptive_module_title: true
28-
filename: astra.md
14+
filename: astra.md
2915
title: Astra
30-
type: haystack_pydoc_tools.renderers.DocusaurusRenderer

0 commit comments

Comments
 (0)