Skip to content

Commit 3d45e1f

Browse files
authored
feat(microsoft_sharepoint): Add Microsoft SharePoint retriever integration (#3429)
1 parent 2e89914 commit 3d45e1f

14 files changed

Lines changed: 1365 additions & 0 deletions

File tree

.github/labeler.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,11 @@ integration:meta-llama:
238238
- any-glob-to-any-file: "integrations/meta_llama/**/*"
239239
- any-glob-to-any-file: ".github/workflows/meta_llama.yml"
240240

241+
integration:microsoft-sharepoint:
242+
- changed-files:
243+
- any-glob-to-any-file: "integrations/microsoft_sharepoint/**/*"
244+
- any-glob-to-any-file: ".github/workflows/microsoft_sharepoint.yml"
245+
241246
integration:mistral:
242247
- changed-files:
243248
- any-glob-to-any-file: "integrations/mistral/**/*"

.github/workflows/CI_coverage_comment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ on:
4646
- "Test / mcp"
4747
- "Test / mem0"
4848
- "Test / meta_llama"
49+
- "Test / microsoft_sharepoint"
4950
- "Test / mistral"
5051
- "Test / mongodb_atlas"
5152
- "Test / nvidia"
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
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 / microsoft_sharepoint
4+
5+
on:
6+
schedule:
7+
- cron: "0 0 * * *"
8+
pull_request:
9+
paths:
10+
- "integrations/microsoft_sharepoint/**"
11+
- "!integrations/microsoft_sharepoint/*.md"
12+
- ".github/workflows/microsoft_sharepoint.yml"
13+
push:
14+
branches:
15+
- main
16+
paths:
17+
- "integrations/microsoft_sharepoint/**"
18+
- "!integrations/microsoft_sharepoint/*.md"
19+
- ".github/workflows/microsoft_sharepoint.yml"
20+
21+
defaults:
22+
run:
23+
working-directory: integrations/microsoft_sharepoint
24+
25+
concurrency:
26+
group: microsoft-sharepoint-${{ 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", "windows-latest", "macos-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+
63+
steps:
64+
- name: Support longpaths
65+
if: matrix.os == 'windows-latest'
66+
working-directory: .
67+
run: git config --system core.longpaths true
68+
69+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
70+
71+
- name: Set up Python ${{ matrix.python-version }}
72+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
73+
with:
74+
python-version: ${{ matrix.python-version }}
75+
76+
- name: Install Hatch
77+
run: |
78+
python -m pip install --upgrade pip
79+
pip install hatch --uploaded-prior-to=P1D
80+
- name: Lint
81+
if: matrix.python-version == '3.10' && runner.os == 'Linux'
82+
run: hatch run fmt-check && hatch run test:types
83+
84+
- name: Run unit tests
85+
run: hatch run test:unit-cov-retry
86+
87+
# 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.
88+
- name: Store unit tests coverage
89+
id: coverage_comment
90+
if: matrix.python-version == '3.10' && runner.os == 'Linux' && github.event_name != 'schedule'
91+
uses: py-cov-action/python-coverage-comment-action@63f52f4fbbffada6e8dee8ec432de7e01df9ba79 # v3.41
92+
with:
93+
GITHUB_TOKEN: ${{ github.token }}
94+
COVERAGE_PATH: integrations/microsoft_sharepoint
95+
SUBPROJECT_ID: microsoft_sharepoint
96+
MINIMUM_GREEN: 90
97+
MINIMUM_ORANGE: 60
98+
99+
- name: Upload coverage comment to be posted
100+
if: matrix.python-version == '3.10' && runner.os == 'Linux' && github.event_name == 'pull_request' && steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true'
101+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
102+
with:
103+
name: coverage-comment-microsoft_sharepoint
104+
path: python-coverage-comment-action-microsoft_sharepoint.txt
105+
106+
- name: Run integration tests
107+
run: hatch run test:integration-cov-append-retry
108+
109+
- name: Store combined coverage
110+
if: github.event_name == 'push'
111+
uses: py-cov-action/python-coverage-comment-action@63f52f4fbbffada6e8dee8ec432de7e01df9ba79 # v3.41
112+
with:
113+
GITHUB_TOKEN: ${{ github.token }}
114+
COVERAGE_PATH: integrations/microsoft_sharepoint
115+
SUBPROJECT_ID: microsoft_sharepoint-combined
116+
MINIMUM_GREEN: 90
117+
MINIMUM_ORANGE: 60
118+
119+
- name: Run unit tests with lowest direct dependencies
120+
if: github.event_name != 'push'
121+
run: |
122+
hatch run uv pip compile pyproject.toml --resolution lowest-direct --output-file requirements_lowest_direct.txt
123+
hatch -e test env run -- uv pip install -r requirements_lowest_direct.txt
124+
hatch run test:unit
125+
126+
- name: Nightly - run unit tests with Haystack main branch
127+
if: github.event_name == 'schedule'
128+
run: |
129+
hatch env prune
130+
hatch -e test env run -- uv pip install git+https://github.com/deepset-ai/haystack.git@main
131+
hatch run test:unit
132+
133+
notify-slack-on-failure:
134+
needs: run
135+
if: failure() && github.event_name == 'schedule'
136+
runs-on: ubuntu-slim
137+
steps:
138+
- uses: deepset-ai/notify-slack-action@a65def0c8bf91d6520286ab34280151c76a5a008 # v1.1.0
139+
with:
140+
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ Please check out our [Contribution Guidelines](CONTRIBUTING.md) for all the deta
7373
| [mcp-haystack](integrations/mcp/) | Tool | [![PyPI - Version](https://img.shields.io/pypi/v/mcp-haystack.svg?color=orange)](https://pypi.org/project/mcp-haystack) | [![Test / mcp](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/mcp.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/mcp.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-mcp/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-mcp/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-mcp-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-mcp-combined/htmlcov/index.html) |
7474
| [mem0-haystack](integrations/mem0/) | Memory | [![PyPI - Version](https://img.shields.io/pypi/v/mem0-haystack.svg)](https://pypi.org/project/mem0-haystack) | [![Test / mem0](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/mem0.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/mem0.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-mem0/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-mem0/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-mem0-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-mem0-combined/htmlcov/index.html) |
7575
| [meta-llama-haystack](integrations/meta_llama/) | Generator | [![PyPI - Version](https://img.shields.io/pypi/v/meta-llama-haystack.svg?color=orange)](https://pypi.org/project/meta-llama-haystack) | [![Test / meta_llama](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/meta_llama.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/meta_llama.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-meta_llama/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-meta_llama/htmlcov/index.html) | |
76+
| [microsoft-sharepoint-haystack](integrations/microsoft_sharepoint/) | Retriever | [![PyPI - Version](https://img.shields.io/pypi/v/microsoft-sharepoint-haystack.svg)](https://pypi.org/project/microsoft-sharepoint-haystack) | [![Test / microsoft_sharepoint](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/microsoft_sharepoint.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/microsoft_sharepoint.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-microsoft_sharepoint/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-microsoft_sharepoint/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-microsoft_sharepoint-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-microsoft_sharepoint-combined/htmlcov/index.html) |
7677
| [mistral-haystack](integrations/mistral/) | Converter, Embedder, Generator | [![PyPI - Version](https://img.shields.io/pypi/v/mistral-haystack.svg)](https://pypi.org/project/mistral-haystack) | [![Test / mistral](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/mistral.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/mistral.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-mistral/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-mistral/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-mistral-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-mistral-combined/htmlcov/index.html) |
7778
| [mongodb-atlas-haystack](integrations/mongodb_atlas/) | Document Store | [![PyPI - Version](https://img.shields.io/pypi/v/mongodb-atlas-haystack.svg?color=orange)](https://pypi.org/project/mongodb-atlas-haystack) | [![Test / mongodb-atlas](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/mongodb_atlas.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/mongodb_atlas.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-mongodb_atlas/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-mongodb_atlas/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-mongodb_atlas-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-mongodb_atlas-combined/htmlcov/index.html) |
7879
| [nvidia-haystack](integrations/nvidia/) | Embedder, Generator, Ranker | [![PyPI - Version](https://img.shields.io/pypi/v/nvidia-haystack.svg?color=orange)](https://pypi.org/project/nvidia-haystack) | [![Test / nvidia](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/nvidia.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/nvidia.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-nvidia/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-nvidia/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-nvidia-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-nvidia-combined/htmlcov/index.html) |

0 commit comments

Comments
 (0)