Skip to content

Commit 991b9fa

Browse files
ghassenzaaradavidsbatistabogdankostic
authored
feat: add new falkordb integration (#3158)
Co-authored-by: David S. Batista <dsbatista@gmail.com> Co-authored-by: bogdankostic <bogdankostic@web.de>
1 parent 77468a2 commit 991b9fa

19 files changed

Lines changed: 2344 additions & 0 deletions

File tree

.github/labeler.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ integration:faiss:
8989
- any-glob-to-any-file: "integrations/faiss/**/*"
9090
- any-glob-to-any-file: ".github/workflows/faiss.yml"
9191

92+
93+
integration:falkordb:
94+
- changed-files:
95+
- any-glob-to-any-file: "integrations/falkordb/**/*"
96+
- any-glob-to-any-file: ".github/workflows/falkordb.yml"
97+
9298
integration:fastembed:
9399
- changed-files:
94100
- any-glob-to-any-file: "integrations/fastembed/**/*"

.github/workflows/CI_coverage_comment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ on:
2020
- "Test / e2b"
2121
- "Test / elasticsearch"
2222
- "Test / faiss"
23+
- "Test / falkordb"
2324
- "Test / fastembed"
2425
- "Test / firecrawl"
2526
- "Test / github"

.github/workflows/falkordb.yml

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
# This workflow comes from https://github.com/ofek/hatch-mypyc
2+
# https://github.com/ofek/hatch-mypyc/blob/5a198c0ba8660494d02716cfc9d79ce4adfb1442/.github/workflows/test.yml
3+
name: Test / falkordb
4+
5+
on:
6+
schedule:
7+
- cron: "0 0 * * *"
8+
pull_request:
9+
paths:
10+
- "integrations/falkordb/**"
11+
- "!integrations/falkordb/*.md"
12+
- ".github/workflows/falkordb.yml"
13+
push:
14+
branches:
15+
- main
16+
paths:
17+
- "integrations/falkordb/**"
18+
- "!integrations/falkordb/*.md"
19+
- ".github/workflows/falkordb.yml"
20+
21+
defaults:
22+
run:
23+
working-directory: integrations/falkordb
24+
25+
concurrency:
26+
group: falkordb-${{ github.head_ref || github.sha }}
27+
cancel-in-progress: true
28+
29+
env:
30+
PYTHONUNBUFFERED: "1"
31+
FORCE_COLOR: "1"
32+
TEST_MATRIX_OS: '["ubuntu-latest"]'
33+
TEST_MATRIX_PYTHON: '["3.10", "3.14"]'
34+
35+
jobs:
36+
compute-test-matrix:
37+
runs-on: ubuntu-slim
38+
defaults:
39+
run:
40+
working-directory: .
41+
outputs:
42+
os: ${{ steps.set.outputs.os }}
43+
python-version: ${{ steps.set.outputs.python-version }}
44+
steps:
45+
- id: set
46+
run: |
47+
echo 'os=${{ github.event_name == 'push' && '["ubuntu-latest"]' || env.TEST_MATRIX_OS }}' >> "$GITHUB_OUTPUT"
48+
echo 'python-version=${{ github.event_name == 'push' && '["3.10"]' || env.TEST_MATRIX_PYTHON }}' >> "$GITHUB_OUTPUT"
49+
50+
run:
51+
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
52+
needs: compute-test-matrix
53+
permissions:
54+
contents: write
55+
pull-requests: write
56+
runs-on: ${{ matrix.os }}
57+
strategy:
58+
fail-fast: false
59+
matrix:
60+
os: ${{ fromJSON(needs.compute-test-matrix.outputs.os) }}
61+
python-version: ${{ fromJSON(needs.compute-test-matrix.outputs.python-version) }}
62+
services:
63+
falkordb:
64+
image: falkordb/falkordb:latest
65+
ports:
66+
- 6379:6379
67+
options: >-
68+
--health-cmd "redis-cli ping"
69+
--health-interval 10s
70+
--health-timeout 5s
71+
--health-retries 5
72+
73+
steps:
74+
- name: Support longpaths
75+
if: matrix.os == 'windows-latest'
76+
working-directory: .
77+
run: git config --system core.longpaths true
78+
79+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
80+
81+
- name: Set up Python ${{ matrix.python-version }}
82+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
83+
with:
84+
python-version: ${{ matrix.python-version }}
85+
86+
- name: Install Hatch
87+
run: pip install --upgrade hatch
88+
- name: Lint
89+
if: matrix.python-version == '3.10' && runner.os == 'Linux'
90+
run: hatch run fmt-check && hatch run test:types
91+
92+
- name: Run unit tests
93+
run: hatch run test:unit-cov-retry
94+
95+
# On PR: posts coverage comment (directly on same-repo PRs; via artifact for fork PRs). On push to main: stores coverage baseline on data branch.
96+
- name: Store unit tests coverage
97+
id: coverage_comment
98+
if: matrix.python-version == '3.10' && runner.os == 'Linux' && github.event_name != 'schedule'
99+
uses: py-cov-action/python-coverage-comment-action@7188638f871f721a365d644f505d1ff3df20d683 # v3.40
100+
with:
101+
GITHUB_TOKEN: ${{ github.token }}
102+
COVERAGE_PATH: integrations/falkordb
103+
SUBPROJECT_ID: falkordb
104+
MINIMUM_GREEN: 90
105+
MINIMUM_ORANGE: 60
106+
107+
- name: Upload coverage comment to be posted
108+
if: matrix.python-version == '3.10' && runner.os == 'Linux' && github.event_name == 'pull_request' && steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true'
109+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
110+
with:
111+
name: coverage-comment-falkordb
112+
path: python-coverage-comment-action-falkordb.txt
113+
114+
- name: Run integration tests
115+
# Integration tests require a live FalkorDB instance via Docker.
116+
# Docker services are only available on Linux runners.
117+
if: runner.os == 'Linux'
118+
env:
119+
FALKORDB_HOST: localhost
120+
FALKORDB_PORT: 6379
121+
run: hatch run test:integration-cov-append-retry
122+
123+
- name: Store combined coverage
124+
if: github.event_name == 'push'
125+
uses: py-cov-action/python-coverage-comment-action@7188638f871f721a365d644f505d1ff3df20d683 # v3.40
126+
with:
127+
GITHUB_TOKEN: ${{ github.token }}
128+
COVERAGE_PATH: integrations/falkordb
129+
SUBPROJECT_ID: falkordb-combined
130+
MINIMUM_GREEN: 90
131+
MINIMUM_ORANGE: 60
132+
133+
- name: Run unit tests with lowest direct dependencies
134+
if: github.event_name != 'push'
135+
run: |
136+
hatch run uv pip compile pyproject.toml --resolution lowest-direct --output-file requirements_lowest_direct.txt
137+
hatch -e test env run -- uv pip install -r requirements_lowest_direct.txt
138+
hatch run test:unit
139+
140+
- name: Nightly - run unit tests with Haystack main branch
141+
if: github.event_name == 'schedule'
142+
run: |
143+
hatch env prune
144+
hatch -e test env run -- uv pip install git+https://github.com/deepset-ai/haystack.git@main
145+
hatch run test:unit
146+
147+
148+
notify-slack-on-failure:
149+
needs: run
150+
if: failure() && github.event_name == 'schedule'
151+
runs-on: ubuntu-slim
152+
steps:
153+
- uses: deepset-ai/notify-slack-action@3cda73b77a148f16f703274198e7771340cf862b # v1
154+
with:
155+
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Please check out our [Contribution Guidelines](CONTRIBUTING.md) for all the deta
4343
| [e2b-haystack](integrations/e2b/) | Tool | [![PyPI - Version](https://img.shields.io/pypi/v/e2b-haystack.svg)](https://pypi.org/project/e2b-haystack) | [![Test / e2b](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/e2b.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/e2b.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-e2b/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-e2b/htmlcov/index.html) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-e2b-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-e2b-combined/htmlcov/index.html) |
4444
| [elasticsearch-haystack](integrations/elasticsearch/) | Document Store | [![PyPI - Version](https://img.shields.io/pypi/v/elasticsearch-haystack.svg)](https://pypi.org/project/elasticsearch-haystack) | [![Test / elasticsearch](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/elasticsearch.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/elasticsearch.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-elasticsearch/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-elasticsearch/htmlcov/index.html) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-elasticsearch-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-elasticsearch-combined/htmlcov/index.html) |
4545
| [faiss-haystack](integrations/faiss/) | Document Store | [![PyPI - Version](https://img.shields.io/pypi/v/faiss-haystack.svg)](https://pypi.org/project/faiss-haystack) | [![Test / faiss](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/faiss.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/faiss.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-faiss/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-faiss/htmlcov/index.html) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-faiss-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-faiss-combined/htmlcov/index.html) |
46+
| [falkordb-haystack](integrations/falkordb/) | Document Store | [![PyPI - Version](https://img.shields.io/pypi/v/falkordb-haystack.svg)](https://pypi.org/project/falkordb-haystack) | [![Test / falkordb](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/falkordb.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/falkordb.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-falkordb/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-falkordb/htmlcov/index.html) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-falkordb-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-falkordb-combined/htmlcov/index.html) |
4647
| [fastembed-haystack](integrations/fastembed/) | Embedder, Ranker | [![PyPI - Version](https://img.shields.io/pypi/v/fastembed-haystack.svg)](https://pypi.org/project/fastembed-haystack/) | [![Test / fastembed](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/fastembed.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/fastembed.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-fastembed/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-fastembed/htmlcov/index.html) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-fastembed-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-fastembed-combined/htmlcov/index.html) |
4748
| [firecrawl-haystack](integrations/firecrawl/) | Fetcher, Web Search | [![PyPI - Version](https://img.shields.io/pypi/v/firecrawl-haystack.svg)](https://pypi.org/project/firecrawl-haystack/) | [![Test / firecrawl](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/firecrawl.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/firecrawl.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-firecrawl/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-firecrawl/htmlcov/index.html) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-firecrawl-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-firecrawl-combined/htmlcov/index.html) |
4849
| [github-haystack](integrations/github/) | Connector | [![PyPI - Version](https://img.shields.io/pypi/v/github-haystack.svg)](https://pypi.org/project/github-haystack) | [![Test / github](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/github.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/github.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-github/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-github/htmlcov/index.html) | |

0 commit comments

Comments
 (0)