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

CI: use haystack-pydoc-tools package instead of local code #6818

Merged
merged 1 commit into from
Jan 23, 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
1 change: 0 additions & 1 deletion .github/utils/pydoc-markdown.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash

set -e # Fails on any error in the following loop
export PYTHONPATH=$PWD/docs/pydoc # Make the renderers available to pydoc
cd docs/pydoc
rm -rf temp && mkdir temp
cd temp
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/readme_sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/pydoc/requirements.txt
pip install -U haystack-pydoc-tools

- name: Generate API docs
env:
Expand All @@ -41,4 +41,4 @@ jobs:
env:
README_API_KEY: ${{ secrets.README_API_KEY }}
with:
rdme: docs ./docs/pydoc/temp --key="$README_API_KEY" --version=2.0
rdme: docs ./docs/pydoc/temp --key="$README_API_KEY" --version=2.0
Empty file removed docs/pydoc/__init__.py
Empty file.
4 changes: 2 additions & 2 deletions docs/pydoc/config/builder.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
loaders:
- type: loaders.CustomPythonLoader
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/builders]
modules: ["answer_builder", "prompt_builder", "dynamic_prompt_builder", "dynamic_chat_prompt_builder"]
ignore_when_discovered: ["__init__"]
Expand All @@ -12,7 +12,7 @@ processors:
- type: smart
- type: crossref
renderer:
type: renderers.ReadmePreviewRenderer
type: haystack_pydoc_tools.renderers.ReadmePreviewRenderer
excerpt: Extract the output of a Generator to an Answer format, and build prompts.
category_slug: haystack-classes
title: Builder API
Expand Down
4 changes: 2 additions & 2 deletions docs/pydoc/config/caching.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
loaders:
- type: loaders.CustomPythonLoader
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/caching]
modules: ["cache_checker"]
ignore_when_discovered: ["__init__"]
Expand All @@ -12,7 +12,7 @@ processors:
- type: smart
- type: crossref
renderer:
type: renderers.ReadmePreviewRenderer
type: haystack_pydoc_tools.renderers.ReadmePreviewRenderer
excerpt: Checks if any document coming from the given URL is already present in the store.
category_slug: haystack-classes
title: CacheChecker API
Expand Down
4 changes: 2 additions & 2 deletions docs/pydoc/config/classifier.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
loaders:
- type: loaders.CustomPythonLoader
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/classifiers]
modules: ["document_language_classifier"]
ignore_when_discovered: ["__init__"]
Expand All @@ -12,7 +12,7 @@ processors:
- type: smart
- type: crossref
renderer:
type: renderers.ReadmePreviewRenderer
type: haystack_pydoc_tools.renderers.ReadmePreviewRenderer
excerpt: Detects the language of the Documents and routes them appropriately.
category_slug: haystack-classes
title: Classifier API
Expand Down
4 changes: 2 additions & 2 deletions docs/pydoc/config/converter.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
loaders:
- type: loaders.CustomPythonLoader
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/converters]
modules: ["azure", "html", "markdown", "pypdf", "tika", "txt"]
ignore_when_discovered: ["__init__"]
Expand All @@ -12,7 +12,7 @@ processors:
- type: smart
- type: crossref
renderer:
type: renderers.ReadmePreviewRenderer
type: haystack_pydoc_tools.renderers.ReadmePreviewRenderer
excerpt: Extracts text from files in different formats and converts it into a unified Document format.
category_slug: haystack-classes
title: Converter API
Expand Down
4 changes: 2 additions & 2 deletions docs/pydoc/config/dataclass.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
loaders:
- type: loaders.CustomPythonLoader
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/dataclasses]
modules: ["answer", "byte_stream", "chat_message", "document", "streaming_chunk"]
ignore_when_discovered: ["__init__"]
Expand All @@ -12,7 +12,7 @@ processors:
- type: smart
- type: crossref
renderer:
type: renderers.ReadmePreviewRenderer
type: haystack_pydoc_tools.renderers.ReadmePreviewRenderer
excerpt: Core classes that carry data through the system.
category_slug: haystack-classes
title: Data Classes API
Expand Down
4 changes: 2 additions & 2 deletions docs/pydoc/config/document_store.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
loaders:
- type: loaders.CustomPythonLoader
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/document_stores/in_memory]
modules: ["document_store"]
ignore_when_discovered: ["__init__"]
Expand All @@ -12,7 +12,7 @@ processors:
- type: smart
- type: crossref
renderer:
type: renderers.ReadmePreviewRenderer
type: haystack_pydoc_tools.renderers.ReadmePreviewRenderer
excerpt: Stores your texts and meta data and provides them to the Retriever at query time.
category_slug: haystack-classes
title: DocumentStore API
Expand Down
4 changes: 2 additions & 2 deletions docs/pydoc/config/embedder.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
loaders:
- type: loaders.CustomPythonLoader
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/embedders]
modules:
[
Expand All @@ -22,7 +22,7 @@ processors:
- type: smart
- type: crossref
renderer:
type: renderers.ReadmePreviewRenderer
type: haystack_pydoc_tools.renderers.ReadmePreviewRenderer
excerpt: Transforms queries into vectors to look for similar or relevant Documents.
category_slug: haystack-classes
title: Embedder API
Expand Down
4 changes: 2 additions & 2 deletions docs/pydoc/config/extractor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
loaders:
- type: loaders.CustomPythonLoader
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/extractors]
modules: ["named_entity_extractor"]
ignore_when_discovered: ["__init__"]
Expand All @@ -12,7 +12,7 @@ processors:
- type: smart
- type: crossref
renderer:
type: renderers.ReadmePreviewRenderer
type: haystack_pydoc_tools.renderers.ReadmePreviewRenderer
excerpt: Extracts predefined entities out of a piece of text.
category_slug: haystack-classes
title: Extractor API
Expand Down
4 changes: 2 additions & 2 deletions docs/pydoc/config/fetcher.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
loaders:
- type: loaders.CustomPythonLoader
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/fetchers]
modules: ["link_content"]
ignore_when_discovered: ["__init__"]
Expand All @@ -12,7 +12,7 @@ processors:
- type: smart
- type: crossref
renderer:
type: renderers.ReadmePreviewRenderer
type: haystack_pydoc_tools.renderers.ReadmePreviewRenderer
excerpt: Fetches content from a list of URLs and returns a list of extracted content streams.
category_slug: haystack-classes
title: LinkContentFetcher API
Expand Down
4 changes: 2 additions & 2 deletions docs/pydoc/config/generator.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
loaders:
- type: loaders.CustomPythonLoader
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/generators]
modules:
[
Expand All @@ -22,7 +22,7 @@ processors:
- type: smart
- type: crossref
renderer:
type: renderers.ReadmePreviewRenderer
type: haystack_pydoc_tools.renderers.ReadmePreviewRenderer
excerpt: Enables text generation using LLMs.
category_slug: haystack-classes
title: Generator API
Expand Down
4 changes: 2 additions & 2 deletions docs/pydoc/config/joiner.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
loaders:
- type: loaders.CustomPythonLoader
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/joiners]
modules: ["document_joiner"]
ignore_when_discovered: ["__init__"]
Expand All @@ -12,7 +12,7 @@ processors:
- type: smart
- type: crossref
renderer:
type: renderers.ReadmePreviewRenderer
type: haystack_pydoc_tools.renderers.ReadmePreviewRenderer
excerpt: Routes data to the right component based on its file type or metadata.
category_slug: haystack-classes
title: Joiner API
Expand Down
4 changes: 2 additions & 2 deletions docs/pydoc/config/others.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
loaders:
- type: loaders.CustomPythonLoader
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/others]
modules: ["multiplexer"]
ignore_when_discovered: ["__init__"]
Expand All @@ -12,7 +12,7 @@ processors:
- type: smart
- type: crossref
renderer:
type: renderers.ReadmePreviewRenderer
type: haystack_pydoc_tools.renderers.ReadmePreviewRenderer
excerpt: Other utility components for Haystack Pipelines.
category_slug: haystack-classes
title: Other Components API
Expand Down
4 changes: 2 additions & 2 deletions docs/pydoc/config/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
loaders:
- type: loaders.CustomPythonLoader
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack]
modules: ["pipeline"]
ignore_when_discovered: ["__init__"]
Expand All @@ -12,7 +12,7 @@ processors:
- type: smart
- type: crossref
renderer:
type: renderers.ReadmePreviewRenderer
type: haystack_pydoc_tools.renderers.ReadmePreviewRenderer
excerpt: Arranges components and integrations in flow.
category_slug: haystack-classes
title: Pipelines API
Expand Down
4 changes: 2 additions & 2 deletions docs/pydoc/config/preprocessor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
loaders:
- type: loaders.CustomPythonLoader
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/preprocessors]
modules: ["document_cleaner", "document_splitter"]
ignore_when_discovered: ["__init__"]
Expand All @@ -12,7 +12,7 @@ processors:
- type: smart
- type: crossref
renderer:
type: renderers.ReadmePreviewRenderer
type: haystack_pydoc_tools.renderers.ReadmePreviewRenderer
excerpt: Normalizes white spaces, gets rid of headers and footers, cleans empty lines in your Documents, or splits them into smaller pieces.
category_slug: haystack-classes
title: PreProcessor API
Expand Down
4 changes: 2 additions & 2 deletions docs/pydoc/config/ranker.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
loaders:
- type: loaders.CustomPythonLoader
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/rankers]
modules: ["meta_field", "transformers_similarity"]
ignore_when_discovered: ["__init__"]
Expand All @@ -12,7 +12,7 @@ processors:
- type: smart
- type: crossref
renderer:
type: renderers.ReadmePreviewRenderer
type: haystack_pydoc_tools.renderers.ReadmePreviewRenderer
excerpt: Reorders a set of Documents based on their relevance to the query.
category_slug: haystack-classes
title: Ranker API
Expand Down
4 changes: 2 additions & 2 deletions docs/pydoc/config/reader.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
loaders:
- type: loaders.CustomPythonLoader
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/readers]
modules: ["extractive"]
ignore_when_discovered: ["__init__"]
Expand All @@ -12,7 +12,7 @@ processors:
- type: smart
- type: crossref
renderer:
type: renderers.ReadmePreviewRenderer
type: haystack_pydoc_tools.renderers.ReadmePreviewRenderer
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-classes
title: Reader API
Expand Down
4 changes: 2 additions & 2 deletions docs/pydoc/config/retriever.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
loaders:
- type: loaders.CustomPythonLoader
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/retrievers/in_memory]
modules: ["bm25_retriever", "embedding_retriever"]
ignore_when_discovered: ["__init__"]
Expand All @@ -12,7 +12,7 @@ processors:
- type: smart
- type: crossref
renderer:
type: renderers.ReadmePreviewRenderer
type: haystack_pydoc_tools.renderers.ReadmePreviewRenderer
excerpt: Sweeps through a Document Store and returns a set of candidate Documents that are relevant to the query.
category_slug: haystack-classes
title: Retriever API
Expand Down
4 changes: 2 additions & 2 deletions docs/pydoc/config/router.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
loaders:
- type: loaders.CustomPythonLoader
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/routers]
modules: ["conditional_router", "file_type_router", "metadata_router", "text_language_router"]
ignore_when_discovered: ["__init__"]
Expand All @@ -12,7 +12,7 @@ processors:
- type: smart
- type: crossref
renderer:
type: renderers.ReadmePreviewRenderer
type: haystack_pydoc_tools.renderers.ReadmePreviewRenderer
excerpt: Routes data to the right component based on its file type or metadata.
category_slug: haystack-classes
title: Router API
Expand Down
4 changes: 2 additions & 2 deletions docs/pydoc/config/sampler.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
loaders:
- type: loaders.CustomPythonLoader
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/samplers]
modules: ["top_p"]
ignore_when_discovered: ["__init__"]
Expand All @@ -12,7 +12,7 @@ processors:
- type: smart
- type: crossref
renderer:
type: renderers.ReadmePreviewRenderer
type: haystack_pydoc_tools.renderers.ReadmePreviewRenderer
excerpt: Filters documents based on their similarity scores using top-p sampling.
category_slug: haystack-classes
title: TopPSampler API
Expand Down
4 changes: 2 additions & 2 deletions docs/pydoc/config/websearch.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
loaders:
- type: loaders.CustomPythonLoader
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/websearch]
modules: ["serper_dev"]
ignore_when_discovered: ["__init__"]
Expand All @@ -12,7 +12,7 @@ processors:
- type: smart
- type: crossref
renderer:
type: renderers.ReadmePreviewRenderer
type: haystack_pydoc_tools.renderers.ReadmePreviewRenderer
excerpt: Web search engine for Haystack.
category_slug: haystack-classes
title: Websearch API
Expand Down
4 changes: 2 additions & 2 deletions docs/pydoc/config/whisper.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
loaders:
- type: loaders.CustomPythonLoader
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/audio]
modules: ["whisper_local", "whisper_remote"]
ignore_when_discovered: ["__init__"]
Expand All @@ -12,7 +12,7 @@ processors:
- type: smart
- type: crossref
renderer:
type: renderers.ReadmePreviewRenderer
type: haystack_pydoc_tools.renderers.ReadmePreviewRenderer
excerpt: Transcribes audio files.
category_slug: haystack-classes
title: WhisperTranscriber API
Expand Down
4 changes: 2 additions & 2 deletions docs/pydoc/config/writer.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
loaders:
- type: loaders.CustomPythonLoader
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../../../haystack/components/writers]
modules: ["document_writer"]
ignore_when_discovered: ["__init__"]
Expand All @@ -12,7 +12,7 @@ processors:
- type: smart
- type: crossref
renderer:
type: renderers.ReadmePreviewRenderer
type: haystack_pydoc_tools.renderers.ReadmePreviewRenderer
excerpt: Writes Documents to a DocumentStore.
category_slug: haystack-classes
title: DocumentWriter API
Expand Down
Loading