chore: remove CI scripts and configs for Readme API (#10147)

This commit is contained in:
Stefano Fiorucci 2025-11-27 13:05:55 +01:00 committed by GitHub
parent 56cf050671
commit 8bdcd34610
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
38 changed files with 1 additions and 1230 deletions

View File

@ -1,56 +0,0 @@
import argparse
import re
import sys
from readme_api import create_new_unstable, get_versions
VERSION_VALIDATOR = re.compile(r"^[0-9]+\.[0-9]+$")
def calculate_new_unstable(version: str):
"""
Calculate the new unstable version based on the given version.
"""
# version must be formatted like so <major>.<minor>
major, minor = version.split(".")
return f"{major}.{int(minor) + 1}-unstable"
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument(
"-v", "--new-version", help="The new unstable version that is being created (e.g. 1.9).", required=True
)
args = parser.parse_args()
if VERSION_VALIDATOR.match(args.new_version) is None:
sys.exit("Version must be formatted like so <major>.<minor>")
# This two are the version that we must have published in the end
new_stable = f"{args.new_version}"
new_unstable = calculate_new_unstable(args.new_version)
versions = get_versions()
new_stable_is_published = new_stable in versions
new_unstable_is_published = new_unstable in versions
if new_stable_is_published and new_unstable_is_published:
# If both versions are published there's nothing to do.
# We fail gracefully.
print(f"Both new version {new_stable} and {new_unstable} are already published.")
sys.exit(0)
elif new_stable_is_published or new_unstable_is_published:
# Either new stable or unstable is already published, it's to risky to
# proceed so we abort the publishing process.
sys.exit(f"Either version {new_stable} or {new_unstable} are already published. Too risky to proceed.")
# This version must exist since it's the one we're trying to promote
# to stable.
current_unstable = f"{new_stable}-unstable"
if current_unstable not in versions:
sys.exit(f"Can't find version {current_unstable} to promote to {new_stable}")
# Create create new unstable from the currently existing one.
# The new unstable will be made stable at a later time by another workflow
create_new_unstable(current_unstable, new_unstable)

View File

@ -1,80 +0,0 @@
import argparse
import base64
import os
import re
from pathlib import Path
import requests
import yaml
VERSION_VALIDATOR = re.compile(r"^[0-9]+\.[0-9]+$")
def readme_token():
"""
Get the Readme API token from the environment variable and encode it in base64.
"""
api_key = os.getenv("README_API_KEY", None)
if not api_key:
raise Exception("README_API_KEY env var is not set")
api_key = f"{api_key}:"
return base64.b64encode(api_key.encode("utf-8")).decode("utf-8")
def create_headers(version: str):
"""
Create headers for the Readme API.
"""
return {"authorization": f"Basic {readme_token()}", "x-readme-version": version}
def get_docs_in_category(category_slug: str, version: str) -> list[str]:
"""
Returns the slugs of all documents in a category for the specific version.
"""
url = f"https://dash.readme.com/api/v1/categories/{category_slug}/docs"
headers = create_headers(version)
res = requests.get(url, headers=headers, timeout=10)
return [doc["slug"] for doc in res.json()]
def delete_doc(slug: str, version: str):
"""
Delete a document from Readme, based on the slug and version.
"""
url = f"https://dash.readme.com/api/v1/docs/{slug}"
headers = create_headers(version)
res = requests.delete(url, headers=headers, timeout=10)
res.raise_for_status()
if __name__ == "__main__":
parser = argparse.ArgumentParser(
description="Delete outdated documentation from Readme.io. "
"It will delete all documents that are not present in the current config files."
)
parser.add_argument(
"-c", "--config-path", help="Path to folder containing YAML documentation configs", required=True, type=Path
)
parser.add_argument("-v", "--version", help="The version that will have its documents deleted", required=True)
args = parser.parse_args()
configs = [yaml.safe_load(c.read_text()) for c in args.config_path.glob("*.yml")]
remote_docs = {}
for config in configs:
category_slug = config["renderer"]["category_slug"]
if category_slug in remote_docs:
continue
docs = get_docs_in_category(category_slug, args.version)
remote_docs[category_slug] = docs
for config in configs:
doc_slug = config["renderer"]["slug"]
category_slug = config["renderer"]["category_slug"]
if doc_slug in remote_docs[category_slug]:
continue
delete_doc(doc_slug, args.version)

View File

@ -1,27 +0,0 @@
import argparse
import re
import sys
from readme_api import get_versions, promote_unstable_to_stable
VERSION_VALIDATOR = re.compile(r"^[0-9]+\.[0-9]+$")
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("-v", "--version", help="The version to promote to stable (e.g. 2.1).", required=True)
args = parser.parse_args()
if VERSION_VALIDATOR.match(args.version) is None:
sys.exit("Version must be formatted like so <major>.<minor>")
unstable_version = f"{args.version}-unstable"
stable_version = args.version
versions = get_versions()
if stable_version in versions:
sys.exit(f"Version {stable_version} is already published.")
if unstable_version not in versions:
sys.exit(f"Can't find version {unstable_version} to promote to {stable_version}")
promote_unstable_to_stable(unstable_version, stable_version)

View File

@ -1,62 +0,0 @@
import base64
import os
import requests
class ReadmeAuth(requests.auth.AuthBase):
"""
Custom authentication class for Readme API.
"""
def __call__(self, r): # noqa: D102
r.headers["authorization"] = f"Basic {readme_token()}"
return r
def readme_token():
"""
Get the Readme API token from the environment variable and encode it in base64.
"""
api_key = os.getenv("RDME_API_KEY", None)
if not api_key:
raise Exception("RDME_API_KEY env var is not set")
api_key = f"{api_key}:"
return base64.b64encode(api_key.encode("utf-8")).decode("utf-8")
def get_versions():
"""
Return all versions currently published in Readme.io.
"""
url = "https://dash.readme.com/api/v1/version"
res = requests.get(url, auth=ReadmeAuth(), timeout=30)
res.raise_for_status()
return [v["version"] for v in res.json()]
def create_new_unstable(current: str, new: str):
"""
Create new version by copying current.
:param current: Existing current unstable version
:param new: Non existing new unstable version
"""
url = "https://dash.readme.com/api/v1/version/"
payload = {"is_beta": False, "version": new, "from": current, "is_hidden": False, "is_stable": False}
res = requests.post(url, json=payload, auth=ReadmeAuth(), timeout=30)
res.raise_for_status()
def promote_unstable_to_stable(unstable: str, stable: str):
"""
Rename the current unstable to stable and set it as stable.
:param unstable: Existing unstable version
:param stable: Non existing new stable version
"""
url = f"https://dash.readme.com/api/v1/version/{unstable}"
payload = {"is_beta": False, "version": stable, "from": unstable, "is_hidden": False, "is_stable": True}
res = requests.put(url, json=payload, auth=ReadmeAuth(), timeout=30)
res.raise_for_status()

View File

@ -60,7 +60,7 @@ jobs:
--title "Bump unstable version" \
--body "This PR bumps the unstable version for \`v2.x\`. \
The release branch \`v${{ steps.versions.outputs.current_release_minor }}.x\` has been correctly created. \
Verify documentation on Readme has been correctly updated before approving and merging this PR." \
Approve and merge this PR." \
--label "ignore-for-release-notes"
- uses: actions/setup-python@v6
@ -70,14 +70,6 @@ jobs:
- name: Install create_unstable_docs.py dependencies
run: pip install requests
# TODO: remove this once migration to Docusaurus is complete
# - name: Release Readme version
# env:
# RDME_API_KEY: ${{ secrets.README_API_KEY }}
# run: |
# git checkout main
# python ./.github/utils/create_unstable_docs.py --new-version ${{ steps.versions.outputs.current_release_minor }}
- name: Generate unstable docs for Docusaurus
run: |
git checkout main

View File

@ -36,16 +36,6 @@ jobs:
with:
python-version: "${{ env.PYTHON_VERSION }}"
- name: Install promote_unstable_docs.py dependencies
run: pip install requests
# TODO: remove this once migration to Docusaurus is complete
# - name: Release Readme version
# env:
# RDME_API_KEY: ${{ secrets.README_API_KEY }}
# run: |
# python ./.github/utils/promote_unstable_docs.py --version ${{ steps.version.outputs.version }}
- name: Promote unstable docs for Docusaurus
run: |
python ./.github/utils/promote_unstable_docs_docusaurus.py --version ${{ steps.version.outputs.version }}

View File

@ -1,66 +0,0 @@
name: Sync docs with Readme
on:
pull_request:
paths:
- "docs/pydoc/**"
# TODO: remove this workflow once migration to Docusaurus is complete
# push:
# branches:
# - main
# # release branches have the form v1.9.x
# - "v[0-9]+.[0-9]+.x"
# # Exclude 1.x release branches, there's another workflow handling those
# - "!v1.[0-9]+.x"
env:
HATCH_VERSION: "1.14.2"
PYTHON_VERSION: "3.10"
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout this repo
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "${{ env.PYTHON_VERSION }}"
- name: Install Hatch
run: pip install "hatch==${{ env.HATCH_VERSION }}"
- name: Generate API docs
env:
# This is necessary to fetch the documentation categories
# from Readme.io as we need them to associate the slug
# in config files with their id.
README_API_KEY: ${{ secrets.README_API_KEY }}
# The command is a bit misleading, we're not actually syncing anything here,
# we're just generating the markdown files from the yaml configs.
run: hatch run readme:sync
- name: Get version
id: version-getter
run: |
VERSION="$(hatch version | cut -d '.' -f 1,2)"
CURRENT_BRANCH="${{ github.ref_name }}"
# If we're on `main` branch we should push docs to the unstable version
if [ "$CURRENT_BRANCH" = "main" ]; then
VERSION="$VERSION-unstable"
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Sync docs
if: github.event_name == 'push'
uses: readmeio/rdme@v9
with:
rdme: docs ./docs/pydoc/temp --key=${{ secrets.README_API_KEY }} --version=${{ steps.version-getter.outputs.version }}
- name: Delete outdated
if: github.event_name == 'push'
env:
README_API_KEY: ${{ secrets.README_API_KEY }}
run: hatch run readme:delete-outdated --version="${{ steps.version-getter.outputs.version }}" --config-path ./docs/pydoc/config

View File

@ -1,27 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/agents]
modules: ["agent", "state/state"]
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.ReadmeCoreRenderer
excerpt: Tool-using agents with provider-agnostic chat model support.
category_slug: haystack-api
title: Agents
slug: agents-api
order: 2
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: agents_api.md

View File

@ -1,27 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/audio]
modules: ["whisper_local", "whisper_remote"]
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.ReadmeCoreRenderer
excerpt: Transcribes audio files.
category_slug: haystack-api
title: Audio
slug: audio-api
order: 3
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: audio_api.md

View File

@ -1,27 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/builders]
modules: ["answer_builder", "prompt_builder", "chat_prompt_builder"]
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.ReadmeCoreRenderer
excerpt: Extract the output of a Generator to an Answer format, and build prompts.
category_slug: haystack-api
title: Builders
slug: builders-api
order: 5
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: builders_api.md

View File

@ -1,27 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/caching]
modules: ["cache_checker"]
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.ReadmeCoreRenderer
excerpt: Checks if any document coming from the given URL is already present in the store.
category_slug: haystack-api
title: Caching
slug: caching-api
order: 7
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: cachings_api.md

View File

@ -1,27 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/classifiers]
modules: ["document_language_classifier", "zero_shot_document_classifier"]
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.ReadmeCoreRenderer
excerpt: Classify documents based on the provided labels.
category_slug: haystack-api
title: Classifiers
slug: classifiers-api
order: 10
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: classifiers_api.md

View File

@ -1,27 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/connectors]
modules: ["openapi_service", "openapi"]
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.ReadmeCoreRenderer
excerpt: Various connectors to integrate with external services.
category_slug: haystack-api
title: Connectors
slug: connectors-api
order: 15
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: connectors_api.md

View File

@ -1,45 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/converters]
modules:
[
"azure",
"csv",
"docx",
"html",
"json",
"markdown",
"msg",
"multi_file_converter",
"openapi_functions",
"output_adapter",
"pdfminer",
"pptx",
"pypdf",
"tika",
"txt",
"xlsx",
]
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.ReadmeCoreRenderer
excerpt: Various converters to transform data from one format to another.
category_slug: haystack-api
title: Converters
slug: converters-api
order: 20
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: converters_api.md

View File

@ -1,28 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/dataclasses]
modules:
["answer", "byte_stream", "chat_message", "document", "image_content", "sparse_embedding", "streaming_chunk"]
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.ReadmeCoreRenderer
excerpt: Core classes that carry data through the system.
category_slug: haystack-api
title: Data Classes
slug: data-classes-api
order: 30
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: data_classes_api.md

View File

@ -1,27 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/document_stores/in_memory]
modules: ["document_store"]
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.ReadmeCoreRenderer
excerpt: Stores your texts and meta data and provides them to the Retriever at query time.
category_slug: haystack-api
title: Document Stores
slug: document-stores-api
order: 40
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: document_stores_api.md

View File

@ -1,27 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/writers]
modules: ["document_writer"]
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.ReadmeCoreRenderer
excerpt: Writes Documents to a DocumentStore.
category_slug: haystack-api
title: Document Writers
slug: document-writers-api
order: 50
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: document_writers_api.md

View File

@ -1,40 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/embedders]
modules:
[
"azure_document_embedder",
"azure_text_embedder",
"hugging_face_api_document_embedder",
"hugging_face_api_text_embedder",
"openai_document_embedder",
"openai_text_embedder",
"sentence_transformers_document_embedder",
"sentence_transformers_text_embedder",
"sentence_transformers_sparse_document_embedder",
"sentence_transformers_sparse_text_embedder",
"image/sentence_transformers_doc_image_embedder",
]
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.ReadmeCoreRenderer
excerpt: Transforms queries into vectors to look for similar or relevant Documents.
category_slug: haystack-api
title: Embedders
slug: embedders-api
order: 60
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: embedders_api.md

View File

@ -1,30 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/evaluation]
modules:
[
"eval_run_result",
]
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.ReadmeCoreRenderer
excerpt: Represents the results of evaluation.
category_slug: haystack-api
title: Evaluation
slug: evaluation-api
order: 61
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: evaluation_api.md

View File

@ -1,38 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/evaluators]
modules:
[
"answer_exact_match",
"context_relevance",
"document_map",
"document_mrr",
"document_ndcg",
"document_recall",
"faithfulness",
"llm_evaluator",
"sas_evaluator",
]
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.ReadmeCoreRenderer
excerpt: Evaluate your pipelines or individual components.
category_slug: haystack-api
title: Evaluators
slug: evaluators-api
order: 63
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: evaluators_api.md

View File

@ -1,34 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/extractors]
modules: [
"named_entity_extractor",
"llm_metadata_extractor",
"image/llm_document_content_extractor",
"regex_text_extractor",
]
ignore_when_discovered: ["__init__"]
processors:
- type: filter
expression:
documented_only: true
do_not_filter_modules: false
skip_empty_modules: true
- type: filter
expression: "name not in ['_BackendEnumMeta', '_NerBackend', '_HfBackend', '_SpacyBackend']"
- type: smart
- type: crossref
renderer:
type: haystack_pydoc_tools.renderers.ReadmeCoreRenderer
excerpt: Components to extract specific elements from textual data.
category_slug: haystack-api
title: Extractors
slug: extractors-api
order: 65
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: extractors_api.md

View File

@ -1,27 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/fetchers]
modules: ["link_content"]
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.ReadmeCoreRenderer
excerpt: Fetches content from a list of URLs and returns a list of extracted content streams.
category_slug: haystack-api
title: Fetchers
slug: fetchers-api
order: 80
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: fetchers_api.md

View File

@ -1,42 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/generators]
modules:
[
"azure",
"hugging_face_local",
"hugging_face_api",
"openai",
"openai_dalle",
"chat/azure",
"chat/azure_responses",
"chat/hugging_face_local",
"chat/hugging_face_api",
"chat/openai",
"chat/openai_responses",
"chat/fallback",
"utils",
]
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.ReadmeCoreRenderer
excerpt: Enables text generation using LLMs.
category_slug: haystack-api
title: Generators
slug: generators-api
order: 70
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: generators_api.md

View File

@ -1,33 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/converters/image]
modules:
[
"document_to_image",
"file_to_document",
"file_to_image",
"pdf_to_image",
]
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.ReadmeCoreRenderer
excerpt: Various converters to transform image data from one format to another.
category_slug: haystack-api
title: Image Converters
slug: image-converters-api
order: 21
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: image_converters_api.md

View File

@ -1,27 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/joiners]
modules: ["answer_joiner", "branch", "document_joiner", "list_joiner", "string_joiner"]
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.ReadmeCoreRenderer
excerpt: Components that join list of different objects
category_slug: haystack-api
title: Joiners
slug: joiners-api
order: 75
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: joiners_api.md

View File

@ -1,27 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/core/pipeline]
modules: ["async_pipeline","pipeline"]
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.ReadmeCoreRenderer
excerpt: Arranges components and integrations in flow.
category_slug: haystack-api
title: Pipeline
slug: pipeline-api
order: 90
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: pipeline_api.md

View File

@ -1,35 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/preprocessors]
modules: [
"csv_document_cleaner",
"csv_document_splitter",
"document_cleaner",
"document_preprocessor",
"document_splitter",
"hierarchical_document_splitter",
"recursive_splitter",
"text_cleaner"]
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.ReadmeCoreRenderer
excerpt: Preprocess your Documents and texts. Clean, split, and more.
category_slug: haystack-api
title: PreProcessors
slug: preprocessors-api
order: 100
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: preprocessors_api.md

View File

@ -1,34 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/rankers]
modules: [
"hugging_face_tei",
"lost_in_the_middle",
"meta_field",
"meta_field_grouping_ranker",
"sentence_transformers_diversity",
"sentence_transformers_similarity",
"transformers_similarity"]
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.ReadmeCoreRenderer
excerpt: Reorders a set of Documents based on their relevance to the query.
category_slug: haystack-api
title: Rankers
slug: rankers-api
order: 110
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: rankers_api.md

View File

@ -1,27 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/readers]
modules: ["extractive"]
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.ReadmeCoreRenderer
excerpt: Takes a query and a set of Documents as input and returns ExtractedAnswers by selecting a text span within the Documents.
category_slug: haystack-api
title: Readers
slug: readers-api
order: 120
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: readers_api.md

View File

@ -1,34 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/retrievers]
modules:
[
"auto_merging_retriever",
"in_memory/bm25_retriever",
"in_memory/embedding_retriever",
"filter_retriever",
"sentence_window_retriever",
]
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.ReadmeCoreRenderer
excerpt: Sweeps through a Document Store and returns a set of candidate Documents that are relevant to the query.
category_slug: haystack-api
title: Retrievers
slug: retrievers-api
order: 130
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: retrievers_api.md

View File

@ -1,38 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/routers]
modules:
[
"conditional_router",
"document_length_router",
"document_type_router",
"file_type_router",
"llm_messages_router",
"metadata_router",
"text_language_router",
"transformers_text_router",
"zero_shot_text_router",
]
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.ReadmeCoreRenderer
excerpt: Routers is a group of components that route queries or Documents to other components that can handle them best.
category_slug: haystack-api
title: Routers
slug: routers-api
order: 140
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: routers_api.md

View File

@ -1,27 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/samplers]
modules: ["top_p"]
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.ReadmeCoreRenderer
excerpt: Filters documents based on their similarity scores using top-p sampling.
category_slug: haystack-api
title: Samplers
slug: samplers-api
order: 150
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: samplers_api.md

View File

@ -1,27 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/tools]
modules: ["tool_invoker"]
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.ReadmeCoreRenderer
excerpt: Components related to Tool Calling.
category_slug: haystack-api
title: Tool Components
slug: tool-components-api
order: 152
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: tool_components_api.md

View File

@ -1,28 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/tools]
modules:
["tool", "from_function", "component_tool", "pipeline_tool", "toolset"]
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.ReadmeCoreRenderer
excerpt: Unified abstractions to represent tools across the framework.
category_slug: haystack-api
title: Tools
slug: tools-api
order: 151
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: tools_api.md

View File

@ -1,28 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/utils]
ignore_when_discovered: ["__init__", "hf"]
processors:
- type: filter
expression:
documented_only: true
do_not_filter_modules: false
skip_empty_modules: true
- type: filter
expression: "name not in ['TokenSecret', 'EnvVarSecret','_get_default_device', '_split_device_string', 'convert']"
- type: smart
- type: crossref
renderer:
type: haystack_pydoc_tools.renderers.ReadmeCoreRenderer
excerpt: Utility functions and classes used across the library.
category_slug: haystack-api
title: Utils
slug: utils-api
order: 153
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: utils_api.md

View File

@ -1,27 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/validators]
modules: ["json_schema"]
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.ReadmeCoreRenderer
excerpt: Validators validate LLM outputs
category_slug: haystack-api
title: Validators
slug: validators-api
order: 155
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: validators_api.md

View File

@ -1,27 +0,0 @@
loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/websearch]
modules: ["serper_dev", "searchapi"]
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.ReadmeCoreRenderer
excerpt: Web search engine for Haystack.
category_slug: haystack-api
title: Websearch
slug: websearch-api
order: 170
markdown:
descriptive_class_title: false
classdef_code_block: false
descriptive_module_title: true
add_method_class_prefix: true
add_member_class_prefix: false
filename: websearch_api.md

View File

@ -182,7 +182,6 @@ dependencies = ["haystack-pydoc-tools"]
[tool.hatch.envs.readme.scripts]
sync = "./.github/utils/pydoc-markdown.sh {args}"
delete-outdated = "python ./.github/utils/delete_outdated_docs.py {args}"
[project.urls]
"CI: GitHub" = "https://github.com/deepset-ai/haystack/actions"