The following document describes the process of contributing and developing extensions to fastRAG.
Preliminary requirements:
- fastRAG installed in a development environment (via
pip install -e) - Python 3.8+
- Pytorch
- Any 3rd party store engine package
To install extra packages required for library development:
pip install -e .[dev]We use pre-commit to automatically format the code in a consistent way. Installing the dev packages will install pre-commit. To manually install it:
pip install pre-commit
pre-commit install # in project's dirIt uses the black and isort utilities. No need to download them, they are handled by pre-commit. Have a look at pre-commit-config to see what it does.
To explicitly run the hooks:
pre-commit run --all-filesThat's it!
- Fork the repository to your own github space
- Add your component as an extension or new addition following Haystack components hierarchy and according to the structure of the library (e.g., a new reader to
fastrag/readers/). - Provide a pipeline or script to validate the flow of the new component (a
yamlfile or modifications inscripts/generate_pipeline.py). - Open a pull request and describe your contribution.