Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
4d13c4c
feat: elastic store based on version 8
AnneYang720 Mar 17, 2023
3fefb07
Merge remote-tracking branch 'origin/feat-rewrite-v2' into feat-elast…
AnneYang720 Mar 23, 2023
6ba2f32
fix: update
AnneYang720 Mar 23, 2023
b525de0
Merge remote-tracking branch 'origin/feat-rewrite-v2' into feat-elast…
AnneYang720 Mar 30, 2023
9470e62
refactor: elastic v7 inherits v8
AnneYang720 Mar 31, 2023
ae3bedf
Merge remote-tracking branch 'origin/feat-rewrite-v2' into feat-elast…
AnneYang720 Mar 31, 2023
da53805
feat: add elasticdoc v8
AnneYang720 Mar 31, 2023
c0a3c5d
fix: update poetry
AnneYang720 Mar 31, 2023
82a7681
refactor: adjust folder structure
AnneYang720 Mar 31, 2023
f757a27
test: elastic v8 tests
AnneYang720 Mar 31, 2023
8b14182
fix: elasticversion in init, ci and toml
AnneYang720 Mar 31, 2023
b66d550
fix: update poetry extras
AnneYang720 Mar 31, 2023
4aba766
fix: raise error when init ElasticV7DocIndex
AnneYang720 Mar 31, 2023
af2d5fa
Merge remote-tracking branch 'origin/feat-rewrite-v2' into feat-elast…
AnneYang720 Apr 6, 2023
ece8b3f
Merge branch 'feat-rewrite-v2' into feat-elastic-v8
AnneYang720 Apr 7, 2023
5f17684
fix: minor fix
AnneYang720 Apr 11, 2023
bb09ab4
Merge branch 'feat-rewrite-v2' into feat-elastic-v8
AnneYang720 Apr 11, 2023
ae6c15b
refactor: move index tests
AnneYang720 Apr 12, 2023
3dc7694
refactor: code refactor
AnneYang720 Apr 12, 2023
d1f961e
Merge branch 'feat-rewrite-v2' into feat-elastic-v8
AnneYang720 Apr 12, 2023
0cc9e64
feat: add ip_range
AnneYang720 Apr 12, 2023
246be92
Merge remote-tracking branch 'origin/feat-rewrite-v2' into feat-elast…
AnneYang720 Apr 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 33 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,38 @@ jobs:
- name: Test
id: test
run: |
poetry run pytest -m 'index' tests
poetry run pytest -m 'index and not elasticv8' tests
timeout-minutes: 30


docarray-elastic-v8:
needs: [lint-ruff, check-black, import-test]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.7]
steps:
- uses: actions/[email protected]
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Prepare environment
run: |
python -m pip install --upgrade pip
python -m pip install poetry
poetry install --all-extras
poetry run pip install protobuf==3.19.0
poetry run pip install tensorflow==2.11.0
poetry run pip install elasticsearch==8.6.2
sudo apt-get update
sudo apt-get install --no-install-recommends ffmpeg

- name: Test
id: test
run: |
poetry run pytest -m 'index and elasticv8' tests
timeout-minutes: 30

docarray-test-tensorflow:
Expand Down Expand Up @@ -284,7 +315,7 @@ jobs:

# just for blocking the merge until all parallel core-test are successful
success-all-test:
needs: [docarray-test, docarray-test-proto3, docarray-doc-index, docarray-test-tensorflow, docarray-test-benchmarks, import-test, check-black, check-mypy, lint-ruff]
needs: [docarray-test, docarray-test-proto3, docarray-doc-index, docarray-elastic-v8, docarray-test-tensorflow, docarray-test-benchmarks, import-test, check-black, check-mypy, lint-ruff]
if: always()
runs-on: ubuntu-latest
steps:
Expand Down
9 changes: 7 additions & 2 deletions docarray/index/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
)

if TYPE_CHECKING:
from docarray.index.backends.elastic import ElasticV7DocIndex # noqa: F401
from docarray.index.backends.elastic import ElasticDocIndex # noqa: F401
from docarray.index.backends.elasticv7 import ElasticV7DocIndex # noqa: F401
from docarray.index.backends.hnswlib import HnswDocumentIndex # noqa: F401

__all__ = []
Expand All @@ -18,9 +19,13 @@ def __getattr__(name: str):
if name == 'HnswDocumentIndex':
import_library('hnswlib', raise_error=True)
import docarray.index.backends.hnswlib as lib
elif name == 'ElasticV7DocIndex':
elif name == 'ElasticDocIndex':
import_library('elasticsearch', raise_error=True)
import docarray.index.backends.elastic as lib
elif name == 'ElasticV7DocIndex':
import_library('elasticsearch', raise_error=True)
import docarray.index.backends.elasticv7 as lib

else:
raise ImportError(
f'cannot import name \'{name}\' from \'{_get_path_from_docarray_root_level(__file__)}\''
Expand Down
Loading