Skip to content

Commit

Permalink
Async qdrant client (#319)
Browse files Browse the repository at this point in the history
* new: manually implemented async qdrant client

* fix: remove await before sync call

* fix: make upload collection, records and migrate synchronous

* fix: add init method to async client base

* refactoring: remove redundant import

* new: add super().__init__ in qdrant remote, update import in http

* new: mvp async qdrant client generator

* new: fix mypy, update generator script, refactoring

* fix: fix test script

* new: update generator launch script, update async files

* new: refactor async client generator

* refactoring: remove redundant operations, add comments, refactor

* new: add isort, black and autoflake to dev dependencies

* fix: add more checks, fix type hints

* fix: do not check types in async client generator for python3.8

* new: do not type check async_qdrant_fastembed

* fix: fix pyright run

* new: update async client tests

* fix: update versions in CI

* new: update pre-commit python version, update autogenerated files

* new: update generated files, add tests for async generator, update generator script

* fix: exclude generator test from 3.8

* fix: fix python version condition

* fix: add python target version for black

* fix: generate async client only on python 3.9
  • Loading branch information
joein authored Oct 13, 2023
1 parent c9a7a5e commit 278a68d
Show file tree
Hide file tree
Showing 37 changed files with 5,635 additions and 20 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,20 @@ jobs:
python -m pip install poetry
poetry config virtualenvs.create false
poetry install --no-interaction --no-ansi --all-extras
- name: Run async client generation tests
run: |
if [[ ${{ matrix.python-version }} == "3.9.x" ]]; then
./tests/async-client-consistency-check.sh
fi
shell: bash
- name: Run integration tests
run: |
./tests/integration-tests.sh
shell: bash
- name: Backward compatibility integration tests
run: |
export RUNNER_OS=${{ runner.os }}
QDRANT_VERSION='v1.4.1' ./tests/integration-tests.sh
QDRANT_VERSION='v1.5.1' ./tests/integration-tests.sh
shell: bash
- name: Check conversion coverage
run: |
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/type-checkers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ jobs:
- name: mypy
run: |
poetry run mypy . --disallow-incomplete-defs --disallow-untyped-defs
if [[ ${{ matrix.python-version }} != "3.8" ]] || [[ ! -d "tools/async_client_generator" ]]; then
# async_qdrant_fastembed.py is autogenerated and erases type ignore statements from the source code
poetry run mypy . --exclude "async_qdrant_fastembed.py" --disallow-incomplete-defs --disallow-untyped-defs
fi
- name: pyright
run: |
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
#default_language_version:
# python: python3.8
default_language_version:
python: python3.9

exclude: 'qdrant_client/(grpc|http|models)/'

Expand Down
133 changes: 131 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ qdrant-sphinx-theme = { git = "https://github.com/qdrant/qdrant_sphinx_theme.git
coverage = "^6.3.3"
pytest-asyncio = "^0.21.0"
pytest-timeout = "^2.1.0"
autoflake = "^2.2.1"
isort = "^5.12.0"
black = "^23.9.1"

[tool.poetry.group.types.dependencies]
pyright = "^1.1.293"
Expand Down
Loading

0 comments on commit 278a68d

Please sign in to comment.