
* Remove invalid-envvar-default and logging-too-many-args * Remove import-self, access-member-before-definition and deprecated-argument * Remove used-before-assignment by restructuring type import * Remove unneeded-not * Silence unnecessary-lambda (it's necessary) * Remove pointless-string-statement * Update Documentation & Code Style * Silenced unsupported-membership-test (probably a real bug, can't fix though) * Remove trailing-newlines * Remove super-init-not-called and slience invalid-sequence-index (it's valid) * Remove invalid-envvar-default in ui * Remove some more warnings from pyproject.toml than actually solrted in code, CI will fail * Linting all modules together is more readable * Update Documentation & Code Style * Typo in pylint disable comment * Simplify long boolean statement * Simplify init call in FAISS * Fix inconsistent-return-statements * Fix useless-super-delegation * Fix useless-else-on-loop * Fix another inconsistent-return-statements * Move back pylint disable comment moved by black * Fix consider-using-set-comprehension * Fix another consider-using-set-comprehension * Silence non-parent-init-called * Update pylint exclusion list * Update Documentation & Code Style * Resolve unnecessary-else-after-break * Fix superfluous-parens * Fix no-else-break * Remove is_correctly_retrieved along with its pylint issue * Update exclusions list * Silence constructor issue in squad_data.py (method is already broken) * Fix too-many-return-statements * Fix use-dict-literal * Fix consider-using-from-import and useless-object-inheritance * Update exclusion list * Fix simplifiable-if-statements * Fix one consider-using-dict-items * Fix another consider-using-dict-items * Fix a third consider-using-dict-items * Fix last consider-using-dict-items * Fix three use-a-generator * Silence import errors on numba, tensorboardX and apex, but add comments & logs * Fix couple of mypy issues * Fix another typing issue * Silence mypy, was conflicting with more meaningful pylint issue * Fix no-else-continue * Silence unsubscriptable-object and fix an import error with importlib.metadata * Update Documentation & Code Style * Fix all no-else-raise * Update Documentation & Code Style * Fix inverted parameters in simplified if switch * Change [test] to [all] in some jobs (for typing and linting) * Add comment in haystack/schema.py on pydantic's dataclasses * Move comment from get_documents_by_id into _convert_weaviate_result_to_document in weaviate.py * Add comment on pylint silencing * Fix bug introduced rest_api/controller/search.py * Update Documentation & Code Style * Add ADR about Pydantic dataclasses * Update pydantic-dataclasses.md * Add link to Pydantic docs on Dataclasses Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
📒 Looking for the docs?
You find them here here:
https://haystack.deepset.ai/overview/intro
💻 How to update docs?
Overview and Usage
We move the Overview and Usage docs to the haystack-website repository. You will find the docs in the folder docs
. Please make sure to only edit the newest version of the docs. We will release the docs together with the Haystack version.
We are open for contributions to our documentation. Please make sure to check our Contribution Guidelines. You will find a step by step introduction to our docs here.
Tutorials
The Tutorials live in the folder tutorials
. They are created as colab notebooks which can be used by users to explore new haystack features. To include tutorials into the docs website, markdowns files need to be generated from the notebook. This can be done by running the script /docs/_src/tutorials/tutorials/convert_ipynb.py
. Just run python convert_ipynb.py
and the script will update all existing notebooks. Furthermore, plaese make sure to update the headers.py
file with headers for the new tutorials. These headers are important for the docs website workflow. After the markdown files are generated successfully, you can raise a PR. We will review it and as soons as the markdown file is merged to master, it can be added to our website. Please follow the steps described here under Tutorial & Reference Docs
.
API Reference
We use Pydoc-Markdown to create markdown files from the docstrings in our code.
Update docstrings
Execute the following commands in /haystack/docs/_src/api/api
:
pip install 'pydoc-markdown==3.11.0'
./generate_docstrings.sh
If you want to generate a new markdown file for a new haystack module, please create a .yml
which is inline with the following configuration and a a new line to generate_docstrings.sh
for the module. After you ran the generate_docstrings.sh again, there should be a new markdown file for the module. To include it into the docs website, push it to master and follow the steps described here under Tutorial & Reference Docs
.
Configuration
Pydoc will read the configuration from a .yml
file which is located in the current working directory. Our files contains three main sections:
- loader: A list of plugins that load API objects from python source files.
- type: Loader for python source files
- search_path: Location of source files
- modules: Module which are used for generating the markdown file
- ignore_when_discovered: Define which files should be ignored
- processor: A list of plugins that process API objects to modify their docstrings (e.g. to adapt them from a documentation format to Markdown or to remove items that should not be rendered into the documentation).
- type: filter: Filter for specific modules
- documented_only: Only documented API objects
- do_not_filter_modules: Do not filter module objects
- skip_empty_modules: Skip modules without content
- renderer: A plugin that produces the output files.
- type: Define the renderer which you want to use. We are using the Markdown renderer as it can be configured in very detail.
- descriptive_class_title: Remove the word "Object" from class titles.
- descriptive_module_title: Adding the word “Module” before the module name
- add_method_class_prefix: Add the class name as a prefix to method names
- add_member_class_prefix: Add the class name as a prefix to member names
- filename: file name of the generated file