Skip to content

Commit

Permalink
Merge branch 'deepset-ai:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Corentin authored Mar 6, 2024
2 parents afc8e79 + d7ad329 commit 9800f2b
Show file tree
Hide file tree
Showing 294 changed files with 17,104 additions and 4,057 deletions.
37 changes: 36 additions & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ integration:elasticsearch:
- any-glob-to-any-file: "integrations/elasticsearch/**/*"
- any-glob-to-any-file: ".github/workflows/elasticsearch.yml"

integration:fastembed:
- changed-files:
- any-glob-to-any-file: "integrations/fastembed/**/*"
- any-glob-to-any-file: ".github/workflows/fastembed.yml"

integration:google-ai:
- changed-files:
- any-glob-to-any-file: "integrations/google_ai/**/*"
Expand Down Expand Up @@ -59,6 +64,21 @@ integration:llama_cpp:
- any-glob-to-any-file: "integrations/llama_cpp/**/*"
- any-glob-to-any-file: ".github/workflows/llama_cpp.yml"

integration:mistral:
- changed-files:
- any-glob-to-any-file: "integrations/mistral/**/*"
- any-glob-to-any-file: ".github/workflows/mistral.yml"

integration:mongodb-atlas:
- changed-files:
- any-glob-to-any-file: "integrations/mongodb_atlas/**/*"
- any-glob-to-any-file: ".github/workflows/mongodb_atlas.yml"

integration:nvidia:
- changed-files:
- any-glob-to-any-file: "integrations/nvidia/**/*"
- any-glob-to-any-file: ".github/workflows/nvidia.yml"

integration:ollama:
- changed-files:
- any-glob-to-any-file: "integrations/ollama/**/*"
Expand All @@ -69,10 +89,15 @@ integration:opensearch:
- any-glob-to-any-file: "integrations/opensearch/**/*"
- any-glob-to-any-file: ".github/workflows/opensearch.yml"

integration:optimum:
- changed-files:
- any-glob-to-any-file: "integrations/optimum/**/*"
- any-glob-to-any-file: ".github/workflows/optimum.yml"

integration:pgvector:
- changed-files:
- any-glob-to-any-file: "integrations/pgvector/**/*"
- any-glob-to-any-file: ".github/workflows/pgvector.yml"
- any-glob-to-any-file: ".github/workflows/pgvector.yml"

integration:pinecone:
- changed-files:
Expand All @@ -84,6 +109,11 @@ integration:qdrant:
- any-glob-to-any-file: "integrations/qdrant/**/*"
- any-glob-to-any-file: ".github/workflows/qdrant.yml"

integration:ragas:
- changed-files:
- any-glob-to-any-file: "integrations/ragas/**/*"
- any-glob-to-any-file: ".github/workflows/ragas.yml"

integration:unstructured-fileconverter:
- changed-files:
- any-glob-to-any-file: "integrations/unstructured/**/*"
Expand All @@ -99,6 +129,11 @@ integration:weaviate:
- any-glob-to-any-file: "integrations/weaviate/**/*"
- any-glob-to-any-file: ".github/workflows/weaviate.yml"

integration:deepeval:
- changed-files:
- any-glob-to-any-file: "integrations/deepeval/**/*"
- any-glob-to-any-file: ".github/workflows/deepeval.yml"

# Topics
topic:CI:
- changed-files:
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/CI_readme_sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Core / Sync docs with Readme

on:
push:
branches:
- main

jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout this repo
uses: actions/checkout@v4
with:
# This will tell tj-actions/changed-files to compare the current pushed commit with the latest in main
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U haystack-pydoc-tools hatch
# We look into the changeset in order to understand
# which integrations were modified by the last commit.
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v42
with:
files: integrations/**
# Output unique changed directories instead of filenames
dir_names: true
# We only care about the name of the integration, i.e. integrations/FOO
dir_names_max_depth: 2

- name: Generate docs
if: steps.changed-files.outputs.all_changed_files != ''
env:
# This is necessary to fetch the documentation categories
# from Readme.io as we need them to associate the slug
# in config files with their id.
README_API_KEY: ${{ secrets.README_API_KEY }}
ALL_CHANGED_DIRS: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
for d in $ALL_CHANGED_DIRS; do
cd $d
hatch run docs
hatch env prune # clean up the environment after docs generation
cd -
done
mkdir tmp
find . -name "_readme_*.md" -exec cp "{}" tmp \;
ls tmp
- name: Sync API docs
if: steps.changed-files.outputs.all_changed_files != ''
uses: readmeio/rdme@v8
with:
rdme: docs ./tmp --key=${{ secrets.README_API_KEY }} --version=2.0
4 changes: 4 additions & 0 deletions .github/workflows/amazon_sagemaker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,9 @@ jobs:
if: matrix.python-version == '3.9' && runner.os == 'Linux'
run: hatch run lint:all

- name: Generate docs
if: matrix.python-version == '3.9' && runner.os == 'Linux'
run: hatch run docs

- name: Run tests
run: hatch run cov
4 changes: 2 additions & 2 deletions .github/workflows/astra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ jobs:

- name: Run tests
env:
ASTRA_DB_APPLICATION_TOKEN: ${{ secrets.ASTRA_DB_APPLICATION_TOKEN }}
ASTRA_DB_ID: ${{ secrets.ASTRA_DB_ID }}
ASTRA_DB_API_ENDPOINT: ${{ secrets.ASTRA_API_ENDPOINT }}
ASTRA_DB_APPLICATION_TOKEN: ${{ secrets.ASTRA_TOKEN }}
run: hatch run cov
2 changes: 1 addition & 1 deletion .github/workflows/chroma.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.9', '3.10']
python-version: ['3.8', '3.9', '3.10']

steps:
- name: Support longpaths
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/deepeval.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# This workflow comes from https://github.com/ofek/hatch-mypyc
# https://github.com/ofek/hatch-mypyc/blob/5a198c0ba8660494d02716cfc9d79ce4adfb1442/.github/workflows/test.yml
name: Test / deepeval

on:
schedule:
- cron: "0 0 * * *"
pull_request:
paths:
- "integrations/deepeval/**"
- ".github/workflows/deepeval.yml"

defaults:
run:
working-directory: integrations/deepeval

concurrency:
group: deepeval-${{ github.head_ref }}
cancel-in-progress: true

env:
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"

jobs:
run:
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.9", "3.10"]

steps:
- name: Support longpaths
if: matrix.os == 'windows-latest'
working-directory: .
run: git config --system core.longpaths true

- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Hatch
run: pip install --upgrade hatch

- name: Lint
if: matrix.python-version == '3.9' && runner.os == 'Linux'
run: hatch run lint:all

- name: Generate docs
if: matrix.python-version == '3.9' && runner.os == 'Linux'
run: hatch run docs

- name: Run tests
run: hatch run cov
45 changes: 45 additions & 0 deletions .github/workflows/fastembed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Test / fastembed

on:
schedule:
- cron: "0 0 * * *"
pull_request:
paths:
- "integrations/fastembed/**"
- ".github/workflows/fastembed.yml"

defaults:
run:
working-directory: integrations/fastembed

jobs:
run:
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.9","3.10","3.11"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Hatch
run: pip install --upgrade hatch

- name: Lint
if: matrix.python-version == '3.9'
run: hatch run lint:all

- name: Generate docs
if: matrix.python-version == '3.9' && runner.os == 'Linux'
run: hatch run docs

- name: Run tests
run: hatch run cov
4 changes: 4 additions & 0 deletions .github/workflows/gradient.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,9 @@ jobs:
if: matrix.python-version == '3.9' && runner.os == 'Linux'
run: hatch run lint:all

- name: Generate docs
if: matrix.python-version == '3.9' && runner.os == 'Linux'
run: hatch run docs

- name: Run tests
run: hatch run cov
32 changes: 18 additions & 14 deletions .github/workflows/instructor_embedders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
- cron: "0 0 * * *"
pull_request:
paths:
- 'integrations/instructor_embedders/**'
- '.github/workflows/instructor_embedders.yml'
- "integrations/instructor_embedders/**"
- ".github/workflows/instructor_embedders.yml"

defaults:
run:
Expand All @@ -16,19 +16,23 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install Hatch
run: pip install --upgrade hatch
- name: Install Hatch
run: pip install --upgrade hatch

- name: Lint
run: hatch run lint:all
- name: Lint
run: hatch run lint:all

- name: Run tests
run: hatch run cov
- name: Generate docs
if: runner.os == 'Linux'
run: hatch run docs

- name: Run tests
run: hatch run cov
42 changes: 23 additions & 19 deletions .github/workflows/jina.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
- cron: "0 0 * * *"
pull_request:
paths:
- 'integrations/jina/**'
- '.github/workflows/jina.yml'
- "integrations/jina/**"
- ".github/workflows/jina.yml"

defaults:
run:
Expand All @@ -30,27 +30,31 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.9', '3.10']
python-version: ["3.9", "3.10"]

steps:
- name: Support longpaths
if: matrix.os == 'windows-latest'
working-directory: .
run: git config --system core.longpaths true
- name: Support longpaths
if: matrix.os == 'windows-latest'
working-directory: .
run: git config --system core.longpaths true

- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Hatch
run: pip install --upgrade hatch
- name: Install Hatch
run: pip install --upgrade hatch

- name: Lint
if: matrix.python-version == '3.9' && runner.os == 'Linux'
run: hatch run lint:all
- name: Lint
if: matrix.python-version == '3.9' && runner.os == 'Linux'
run: hatch run lint:all

- name: Run tests
run: hatch run cov
- name: Generate docs
if: matrix.python-version == '3.9' && runner.os == 'Linux'
run: hatch run docs

- name: Run tests
run: hatch run cov
Loading

0 comments on commit 9800f2b

Please sign in to comment.