Skip to content

Commit 4cd1b86

Browse files
committed
Merge branch 'main' into github_repo_forker_tool_integration
2 parents 47a1c1f + c4d622a commit 4cd1b86

File tree

73 files changed

+4928
-1301
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+4928
-1301
lines changed

.github/labeler.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,6 @@ integration:google-vertex:
6969
- any-glob-to-any-file: "integrations/google_vertex/**/*"
7070
- any-glob-to-any-file: ".github/workflows/google_vertex.yml"
7171

72-
integration:instructor-embedders:
73-
- changed-files:
74-
- any-glob-to-any-file: "integrations/instructor_embedders/**/*"
75-
- any-glob-to-any-file: ".github/workflows/instructor_embedders.yml"
76-
7772
integration:jina:
7873
- changed-files:
7974
- any-glob-to-any-file: "integrations/jina/**/*"
@@ -169,6 +164,11 @@ integration:unstructured-fileconverter:
169164
- any-glob-to-any-file: "integrations/unstructured/**/*"
170165
- any-glob-to-any-file: ".github/workflows/unstructured.yml"
171166

167+
integration:watsonx:
168+
- changed-files:
169+
- any-glob-to-any-file: "integrations/watsonx/**/*"
170+
- any-glob-to-any-file: ".github/workflows/watsonx.yml"
171+
172172
integration:weaviate:
173173
- changed-files:
174174
- any-glob-to-any-file: "integrations/weaviate/**/*"

.github/workflows/CI_license_compliance.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
env:
1414
CORE_DATADOG_API_KEY: ${{ secrets.CORE_DATADOG_API_KEY }}
1515
PYTHON_VERSION: "3.10"
16-
EXCLUDE_PACKAGES: "(?i)^(deepeval|fastembed|ollama|ragas|tqdm|psycopg|typing_extensions).*"
16+
EXCLUDE_PACKAGES: "(?i)^(deepeval|fastembed|ollama|ragas|tqdm|psycopg|typing_extensions|adbc_driver_snowflake).*"
1717

1818
# Exclusions must be explicitly motivated
1919
#
@@ -23,6 +23,7 @@ env:
2323
# - ragas is Apache 2.0 but the license is not available on PyPI
2424
# - typing_extensions>=4.13.0 has a Python Software Foundation License 2.0 but pip-license-checker does not recognize it
2525
# (https://github.com/pilosus/pip-license-checker/issues/143)
26+
# - adbc_driver_snowflake is Apache 2.0 but the license is not correctly specified on PyPI
2627

2728
# - tqdm is MLP but there are no better alternatives
2829
# - psycopg is LGPL-3.0 but FOSSA is fine with it

.github/workflows/llama_stack.yml

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
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 / llama_stack
4+
5+
on:
6+
schedule:
7+
- cron: "0 0 * * *"
8+
pull_request:
9+
paths:
10+
- "integrations/llama_stack/**"
11+
- "!integrations/llama_stack/*.md"
12+
- ".github/workflows/llama_stack.yml"
13+
14+
defaults:
15+
run:
16+
working-directory: integrations/llama_stack
17+
18+
concurrency:
19+
group: llama_stack-${{ github.head_ref }}
20+
cancel-in-progress: true
21+
22+
env:
23+
PYTHONUNBUFFERED: "1"
24+
FORCE_COLOR: "1"
25+
26+
jobs:
27+
run:
28+
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
29+
runs-on: ${{ matrix.os }}
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
os: [ubuntu-latest] # to test on other Operating Systems, we need to install Ollama differently
34+
python-version: ["3.10", "3.13"]
35+
36+
steps:
37+
- uses: actions/checkout@v4
38+
39+
- name: Install and run Ollama Server as inference provider (needed for Llama Stack Server)
40+
uses: nick-fields/retry@v3
41+
with:
42+
timeout_minutes: 2
43+
max_attempts: 3
44+
command: |
45+
curl -fsSL https://ollama.com/install.sh | sh
46+
ollama serve &
47+
48+
# Check if the service is up and running with a timeout of 60 seconds
49+
timeout=60
50+
while [ $timeout -gt 0 ] && ! curl -sSf http://localhost:11434/ > /dev/null; do
51+
echo "Waiting for Ollama service to start..."
52+
sleep 5
53+
((timeout-=5))
54+
done
55+
56+
if [ $timeout -eq 0 ]; then
57+
echo "Timed out waiting for Ollama service to start."
58+
exit 1
59+
fi
60+
61+
echo "Ollama service started successfully."
62+
63+
- name: Pull models
64+
uses: nick-fields/retry@v3
65+
with:
66+
timeout_minutes: 2
67+
max_attempts: 5
68+
command: |
69+
ollama pull llama3.2:3b
70+
ollama list | grep -q "llama3.2:3b" || { echo "Model llama3.2:3b not pulled."; exit 1; }
71+
72+
echo "Models pulled successfully."
73+
74+
- name: Set up Python ${{ matrix.python-version }}
75+
uses: actions/setup-python@v5
76+
with:
77+
python-version: ${{ matrix.python-version }}
78+
79+
- name: Test Llama Stack Server
80+
run: |
81+
pip install uv
82+
INFERENCE_MODEL=llama3.2:3b uv run --with llama-stack llama stack build --template ollama --image-type venv --run &
83+
84+
echo "Llama Stack Server started successfully."
85+
86+
- name: Install Hatch
87+
run: pip install --upgrade hatch
88+
89+
- name: Lint
90+
if: matrix.python-version == '3.10' && runner.os == 'Linux'
91+
run: hatch run fmt-check && hatch run test:types
92+
93+
- name: Generate docs
94+
if: matrix.python-version == '3.10' && runner.os == 'Linux'
95+
run: hatch run docs
96+
97+
- name: Run tests
98+
run: hatch run test:cov-retry
99+
100+
- name: Run unit tests with lowest direct dependencies
101+
run: |
102+
hatch run uv pip compile pyproject.toml --resolution lowest-direct --output-file requirements_lowest_direct.txt
103+
hatch run uv pip install -r requirements_lowest_direct.txt
104+
hatch run test:unit
105+
106+
- name: Nightly - run unit tests with Haystack main branch
107+
if: github.event_name == 'schedule'
108+
run: |
109+
hatch env prune
110+
hatch run uv pip install git+https://github.com/deepset-ai/haystack.git@main
111+
hatch run test:unit
112+
113+
- name: Send event to Datadog for nightly failures
114+
if: failure() && github.event_name == 'schedule'
115+
uses: ./.github/actions/send_failure
116+
with:
117+
title: |
118+
Core integrations nightly tests failure: ${{ github.workflow }}
119+
api-key: ${{ secrets.CORE_DATADOG_API_KEY }}

.github/workflows/instructor_embedders.yml renamed to .github/workflows/watsonx.yml

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,29 @@
1-
name: Test / instructor-embedders
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 / watsonx
24

35
on:
46
schedule:
57
- cron: "0 0 * * *"
68
pull_request:
79
paths:
8-
- "integrations/instructor_embedders/**"
9-
- "!integrations/instructor_embedders/*.md"
10-
- ".github/workflows/instructor_embedders.yml"
10+
- "integrations/watsonx/**"
11+
- "!integrations/watsonx/*.md"
12+
- ".github/workflows/watsonx.yml"
1113

1214
defaults:
1315
run:
14-
working-directory: integrations/instructor_embedders
16+
working-directory: integrations/watsonx
17+
18+
concurrency:
19+
group: watsonx-${{ github.head_ref }}
20+
cancel-in-progress: true
21+
22+
env:
23+
PYTHONUNBUFFERED: "1"
24+
FORCE_COLOR: "1"
25+
WATSONX_API_KEY: ${{ secrets.WATSONX_API_KEY }}
26+
WATSONX_PROJECT_ID: ${{ secrets.WATSONX_PROJECT_ID }}
1527

1628
jobs:
1729
run:
@@ -21,18 +33,15 @@ jobs:
2133
fail-fast: false
2234
matrix:
2335
os: [ubuntu-latest, windows-latest, macos-latest]
24-
python-version: ["3.9", "3.13"]
25-
26-
# sentencepiece cannot be installed on Windows with Python 3.13
27-
# https://github.com/google/sentencepiece/issues/1111
28-
exclude:
29-
- os: windows-latest
30-
python-version: "3.13"
36+
python-version: ["3.10", "3.13"]
3137

32-
3338
steps:
34-
- name: Checkout
35-
uses: actions/checkout@v4
39+
- name: Support longpaths
40+
if: matrix.os == 'windows-latest'
41+
working-directory: .
42+
run: git config --system core.longpaths true
43+
44+
- uses: actions/checkout@v4
3645

3746
- name: Set up Python ${{ matrix.python-version }}
3847
uses: actions/setup-python@v5
@@ -42,22 +51,27 @@ jobs:
4251
- name: Install Hatch
4352
run: pip install --upgrade hatch
4453

45-
# TODO: Once this integration is properly typed, use hatch run test:types
46-
# https://github.com/deepset-ai/haystack-core-integrations/issues/1771
4754
- name: Lint
48-
if: matrix.python-version == '3.9' && runner.os == 'Linux'
49-
run: hatch run fmt-check && hatch run lint:typing
55+
if: matrix.python-version == '3.10' && runner.os == 'Linux'
56+
run: hatch run fmt-check && hatch run test:types
5057

5158
- name: Generate docs
52-
if: runner.os == 'Linux'
59+
if: matrix.python-version == '3.10' && runner.os == 'Linux'
5360
run: hatch run docs
5461

5562
- name: Run tests
5663
run: hatch run test:cov-retry
5764

65+
- name: Run unit tests with lowest direct dependencies
66+
run: |
67+
hatch run uv pip compile pyproject.toml --resolution lowest-direct --output-file requirements_lowest_direct.txt
68+
hatch run uv pip install -r requirements_lowest_direct.txt
69+
hatch run test:unit
70+
5871
- name: Nightly - run unit tests with Haystack main branch
5972
if: github.event_name == 'schedule'
6073
run: |
74+
hatch env prune
6175
hatch run uv pip install git+https://github.com/deepset-ai/haystack.git@main
6276
hatch run test:unit
6377

0 commit comments

Comments
 (0)