diff --git a/.dockerignore b/.dockerignore index 886ea88163..241b57abfb 100644 --- a/.dockerignore +++ b/.dockerignore @@ -6,7 +6,6 @@ lib/segment/target lib/api/target lib/collection/target lib/storage/target -openapi/tests/ *.tar .git -.github/ \ No newline at end of file +.github/ diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index 265a487b35..fbf0df9faf 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -33,9 +33,9 @@ docker run -p 6333:6333 \ qdrant/qdrant ``` -* `/qdrant/storage` - is a place where Qdrant persists all your data. -Make sure to mount it as a volume, otherwise docker will drop it with the container. -* `/qdrant/config/production.yaml` - is the file with engine configuration. You can override any value from the [reference config](https://github.com/qdrant/qdrant/blob/master/config/config.yaml) +* `/qdrant/storage` - is a place where Qdrant persists all your data. +Make sure to mount it as a volume, otherwise docker will drop it with the container. +* `/qdrant/config/production.yaml` - is the file with engine configuration. You can override any value from the [reference config](https://github.com/qdrant/qdrant/blob/master/config/config.yaml) Now Qdrant should be accessible at [localhost:6333](http://localhost:6333/). @@ -44,13 +44,13 @@ Now Qdrant should be accessible at [localhost:6333](http://localhost:6333/). #### Linux/Debian To run Qdrant on local development environment you need to install below: - Install Rust, follow: [install rust](https://www.rust-lang.org/tools/install) -- Install `rustfmt` toolchain for Rust +- Install `rustfmt` toolchain for Rust ```shell rustup component add rustfmt ``` - Install dependencies: ```shell - sudo apt-get update -y + sudo apt-get update -y sudo apt-get upgrade -y sudo apt-get install -y curl unzip gcc-multilib \ clang cmake jq \ @@ -61,7 +61,7 @@ To run Qdrant on local development environment you need to install below: ```shell PROTOC_VERSION=22.2 - # curl `proto` source file + # curl `proto` source file curl -LO https://github.com/protocolbuffers/protobuf/releases//download/v$PROTOC_VERSION/protoc-$PROTOC_VERSION-linux-x86_64.zip unzip protoc-$PROTOC_VERSION-linux-x86_64.zip -d $HOME/.local @@ -70,7 +70,7 @@ To run Qdrant on local development environment you need to install below: # remove source file if not needed rm protoc-$PROTOC_VERSION-linux-x86_64.zip - + # check installed `protoc` version protoc --version ``` @@ -81,7 +81,7 @@ To run Qdrant on local development environment you need to install below: ./target/release/qdrant ``` - Use the web UI - + Web UI repo is [in a separate repo](https://github.com/qdrant/qdrant-web-ui), but there's a utility script to sync it to the `static` folder: ```shell ./tools/sync-web-ui.sh @@ -103,7 +103,7 @@ In this case you will see the execution timings and, if you launched this bench Example output: ``` -scoring-vector/basic-score-point +scoring-vector/basic-score-point time: [111.81 us 112.07 us 112.31 us] change: [+19.567% +20.454% +21.404%] (p = 0.00 < 0.05) Performance has regressed. @@ -112,7 +112,7 @@ Found 9 outliers among 100 measurements (9.00%) 3 (3.00%) low mild 2 (2.00%) high mild 1 (1.00%) high severe -scoring-vector/basic-score-point-10x +scoring-vector/basic-score-point-10x time: [111.86 us 112.44 us 113.04 us] change: [-1.6120% -0.5554% +0.5103%] (p = 0.32 > 0.05) No change in performance detected. @@ -207,7 +207,7 @@ Here is a quick step-by-step guide: 2. change specs in `/openapi/*ytt.yaml` 3. add new schema definitions to `src/schema_generator.rs` 4. run `/tools/generate_openapi_models.sh` to generate specs -5. update integration tests `openapi/tests/openapi_integration` and run them with `./tests/openapi_integration_test.sh` +5. update integration tests `tests/openapi/openapi_integration` and run them with `./tests/openapi_integration_test.sh` 6. expose file by starting an HTTP server, for instance `python -m http.server`, in `/docs/redoc` 7. validate specs by browsing redoc on `http://localhost:8000/?v=master` 8. validate `openapi-merged.yaml` using [swagger editor](https://editor.swagger.io/) diff --git a/openapi/tests/.gitignore b/tests/openapi/.gitignore similarity index 100% rename from openapi/tests/.gitignore rename to tests/openapi/.gitignore diff --git a/openapi/tests/Dockerfile b/tests/openapi/Dockerfile similarity index 100% rename from openapi/tests/Dockerfile rename to tests/openapi/Dockerfile diff --git a/openapi/tests/openapi_integration/__init__.py b/tests/openapi/openapi_integration/__init__.py similarity index 100% rename from openapi/tests/openapi_integration/__init__.py rename to tests/openapi/openapi_integration/__init__.py diff --git a/openapi/tests/openapi_integration/conftest.py b/tests/openapi/openapi_integration/conftest.py similarity index 100% rename from openapi/tests/openapi_integration/conftest.py rename to tests/openapi/openapi_integration/conftest.py diff --git a/openapi/tests/openapi_integration/helpers/__init__.py b/tests/openapi/openapi_integration/helpers/__init__.py similarity index 100% rename from openapi/tests/openapi_integration/helpers/__init__.py rename to tests/openapi/openapi_integration/helpers/__init__.py diff --git a/openapi/tests/openapi_integration/helpers/collection_setup.py b/tests/openapi/openapi_integration/helpers/collection_setup.py similarity index 100% rename from openapi/tests/openapi_integration/helpers/collection_setup.py rename to tests/openapi/openapi_integration/helpers/collection_setup.py diff --git a/openapi/tests/openapi_integration/helpers/helpers.py b/tests/openapi/openapi_integration/helpers/helpers.py similarity index 100% rename from openapi/tests/openapi_integration/helpers/helpers.py rename to tests/openapi/openapi_integration/helpers/helpers.py diff --git a/openapi/tests/openapi_integration/helpers/settings.py b/tests/openapi/openapi_integration/helpers/settings.py similarity index 100% rename from openapi/tests/openapi_integration/helpers/settings.py rename to tests/openapi/openapi_integration/helpers/settings.py diff --git a/openapi/tests/openapi_integration/test_alias.py b/tests/openapi/openapi_integration/test_alias.py similarity index 100% rename from openapi/tests/openapi_integration/test_alias.py rename to tests/openapi/openapi_integration/test_alias.py diff --git a/openapi/tests/openapi_integration/test_basic_retrieve_api.py b/tests/openapi/openapi_integration/test_basic_retrieve_api.py similarity index 100% rename from openapi/tests/openapi_integration/test_basic_retrieve_api.py rename to tests/openapi/openapi_integration/test_basic_retrieve_api.py diff --git a/openapi/tests/openapi_integration/test_basic_retrieve_multivec_api.py b/tests/openapi/openapi_integration/test_basic_retrieve_multivec_api.py similarity index 100% rename from openapi/tests/openapi_integration/test_basic_retrieve_multivec_api.py rename to tests/openapi/openapi_integration/test_basic_retrieve_multivec_api.py diff --git a/openapi/tests/openapi_integration/test_batch_update.py b/tests/openapi/openapi_integration/test_batch_update.py similarity index 100% rename from openapi/tests/openapi_integration/test_batch_update.py rename to tests/openapi/openapi_integration/test_batch_update.py diff --git a/openapi/tests/openapi_integration/test_batch_update_multivec.py b/tests/openapi/openapi_integration/test_batch_update_multivec.py similarity index 100% rename from openapi/tests/openapi_integration/test_batch_update_multivec.py rename to tests/openapi/openapi_integration/test_batch_update_multivec.py diff --git a/openapi/tests/openapi_integration/test_collection_exists.py b/tests/openapi/openapi_integration/test_collection_exists.py similarity index 100% rename from openapi/tests/openapi_integration/test_collection_exists.py rename to tests/openapi/openapi_integration/test_collection_exists.py diff --git a/openapi/tests/openapi_integration/test_collection_update.py b/tests/openapi/openapi_integration/test_collection_update.py similarity index 100% rename from openapi/tests/openapi_integration/test_collection_update.py rename to tests/openapi/openapi_integration/test_collection_update.py diff --git a/openapi/tests/openapi_integration/test_collection_update_multivec.py b/tests/openapi/openapi_integration/test_collection_update_multivec.py similarity index 100% rename from openapi/tests/openapi_integration/test_collection_update_multivec.py rename to tests/openapi/openapi_integration/test_collection_update_multivec.py diff --git a/openapi/tests/openapi_integration/test_count.py b/tests/openapi/openapi_integration/test_count.py similarity index 100% rename from openapi/tests/openapi_integration/test_count.py rename to tests/openapi/openapi_integration/test_count.py diff --git a/openapi/tests/openapi_integration/test_db_lock.py b/tests/openapi/openapi_integration/test_db_lock.py similarity index 100% rename from openapi/tests/openapi_integration/test_db_lock.py rename to tests/openapi/openapi_integration/test_db_lock.py diff --git a/openapi/tests/openapi_integration/test_delete_points.py b/tests/openapi/openapi_integration/test_delete_points.py similarity index 100% rename from openapi/tests/openapi_integration/test_delete_points.py rename to tests/openapi/openapi_integration/test_delete_points.py diff --git a/openapi/tests/openapi_integration/test_discovery.py b/tests/openapi/openapi_integration/test_discovery.py similarity index 100% rename from openapi/tests/openapi_integration/test_discovery.py rename to tests/openapi/openapi_integration/test_discovery.py diff --git a/openapi/tests/openapi_integration/test_euclid_dist.py b/tests/openapi/openapi_integration/test_euclid_dist.py similarity index 100% rename from openapi/tests/openapi_integration/test_euclid_dist.py rename to tests/openapi/openapi_integration/test_euclid_dist.py diff --git a/openapi/tests/openapi_integration/test_filter.py b/tests/openapi/openapi_integration/test_filter.py similarity index 100% rename from openapi/tests/openapi_integration/test_filter.py rename to tests/openapi/openapi_integration/test_filter.py diff --git a/openapi/tests/openapi_integration/test_filter_min_should.py b/tests/openapi/openapi_integration/test_filter_min_should.py similarity index 100% rename from openapi/tests/openapi_integration/test_filter_min_should.py rename to tests/openapi/openapi_integration/test_filter_min_should.py diff --git a/openapi/tests/openapi_integration/test_filter_values_count.py b/tests/openapi/openapi_integration/test_filter_values_count.py similarity index 100% rename from openapi/tests/openapi_integration/test_filter_values_count.py rename to tests/openapi/openapi_integration/test_filter_values_count.py diff --git a/openapi/tests/openapi_integration/test_fts.py b/tests/openapi/openapi_integration/test_fts.py similarity index 100% rename from openapi/tests/openapi_integration/test_fts.py rename to tests/openapi/openapi_integration/test_fts.py diff --git a/openapi/tests/openapi_integration/test_geo_filter.py b/tests/openapi/openapi_integration/test_geo_filter.py similarity index 100% rename from openapi/tests/openapi_integration/test_geo_filter.py rename to tests/openapi/openapi_integration/test_geo_filter.py diff --git a/openapi/tests/openapi_integration/test_geo_payload_index.py b/tests/openapi/openapi_integration/test_geo_payload_index.py similarity index 100% rename from openapi/tests/openapi_integration/test_geo_payload_index.py rename to tests/openapi/openapi_integration/test_geo_payload_index.py diff --git a/openapi/tests/openapi_integration/test_group.py b/tests/openapi/openapi_integration/test_group.py similarity index 100% rename from openapi/tests/openapi_integration/test_group.py rename to tests/openapi/openapi_integration/test_group.py diff --git a/openapi/tests/openapi_integration/test_init_from_collection.py b/tests/openapi/openapi_integration/test_init_from_collection.py similarity index 100% rename from openapi/tests/openapi_integration/test_init_from_collection.py rename to tests/openapi/openapi_integration/test_init_from_collection.py diff --git a/openapi/tests/openapi_integration/test_k8s_health.py b/tests/openapi/openapi_integration/test_k8s_health.py similarity index 100% rename from openapi/tests/openapi_integration/test_k8s_health.py rename to tests/openapi/openapi_integration/test_k8s_health.py diff --git a/openapi/tests/openapi_integration/test_limits.py b/tests/openapi/openapi_integration/test_limits.py similarity index 100% rename from openapi/tests/openapi_integration/test_limits.py rename to tests/openapi/openapi_integration/test_limits.py diff --git a/openapi/tests/openapi_integration/test_manhattan_dist.py b/tests/openapi/openapi_integration/test_manhattan_dist.py similarity index 100% rename from openapi/tests/openapi_integration/test_manhattan_dist.py rename to tests/openapi/openapi_integration/test_manhattan_dist.py diff --git a/openapi/tests/openapi_integration/test_multicollection_reco.py b/tests/openapi/openapi_integration/test_multicollection_reco.py similarity index 100% rename from openapi/tests/openapi_integration/test_multicollection_reco.py rename to tests/openapi/openapi_integration/test_multicollection_reco.py diff --git a/openapi/tests/openapi_integration/test_nested_payload_indexing.py b/tests/openapi/openapi_integration/test_nested_payload_indexing.py similarity index 100% rename from openapi/tests/openapi_integration/test_nested_payload_indexing.py rename to tests/openapi/openapi_integration/test_nested_payload_indexing.py diff --git a/openapi/tests/openapi_integration/test_nested_payload_query.py b/tests/openapi/openapi_integration/test_nested_payload_query.py similarity index 100% rename from openapi/tests/openapi_integration/test_nested_payload_query.py rename to tests/openapi/openapi_integration/test_nested_payload_query.py diff --git a/openapi/tests/openapi_integration/test_nesting_nested_payload_query.py b/tests/openapi/openapi_integration/test_nesting_nested_payload_query.py similarity index 100% rename from openapi/tests/openapi_integration/test_nesting_nested_payload_query.py rename to tests/openapi/openapi_integration/test_nesting_nested_payload_query.py diff --git a/openapi/tests/openapi_integration/test_optional_vectors.py b/tests/openapi/openapi_integration/test_optional_vectors.py similarity index 100% rename from openapi/tests/openapi_integration/test_optional_vectors.py rename to tests/openapi/openapi_integration/test_optional_vectors.py diff --git a/openapi/tests/openapi_integration/test_order_by.py b/tests/openapi/openapi_integration/test_order_by.py similarity index 100% rename from openapi/tests/openapi_integration/test_order_by.py rename to tests/openapi/openapi_integration/test_order_by.py diff --git a/openapi/tests/openapi_integration/test_payload_indexing.py b/tests/openapi/openapi_integration/test_payload_indexing.py similarity index 100% rename from openapi/tests/openapi_integration/test_payload_indexing.py rename to tests/openapi/openapi_integration/test_payload_indexing.py diff --git a/openapi/tests/openapi_integration/test_payload_operations.py b/tests/openapi/openapi_integration/test_payload_operations.py similarity index 100% rename from openapi/tests/openapi_integration/test_payload_operations.py rename to tests/openapi/openapi_integration/test_payload_operations.py diff --git a/openapi/tests/openapi_integration/test_payload_selector.py b/tests/openapi/openapi_integration/test_payload_selector.py similarity index 100% rename from openapi/tests/openapi_integration/test_payload_selector.py rename to tests/openapi/openapi_integration/test_payload_selector.py diff --git a/openapi/tests/openapi_integration/test_recommend.py b/tests/openapi/openapi_integration/test_recommend.py similarity index 100% rename from openapi/tests/openapi_integration/test_recommend.py rename to tests/openapi/openapi_integration/test_recommend.py diff --git a/openapi/tests/openapi_integration/test_root_api.py b/tests/openapi/openapi_integration/test_root_api.py similarity index 100% rename from openapi/tests/openapi_integration/test_root_api.py rename to tests/openapi/openapi_integration/test_root_api.py diff --git a/openapi/tests/openapi_integration/test_score_threshold.py b/tests/openapi/openapi_integration/test_score_threshold.py similarity index 100% rename from openapi/tests/openapi_integration/test_score_threshold.py rename to tests/openapi/openapi_integration/test_score_threshold.py diff --git a/openapi/tests/openapi_integration/test_service.py b/tests/openapi/openapi_integration/test_service.py similarity index 100% rename from openapi/tests/openapi_integration/test_service.py rename to tests/openapi/openapi_integration/test_service.py diff --git a/openapi/tests/openapi_integration/test_shard_snapshot.py b/tests/openapi/openapi_integration/test_shard_snapshot.py similarity index 100% rename from openapi/tests/openapi_integration/test_shard_snapshot.py rename to tests/openapi/openapi_integration/test_shard_snapshot.py diff --git a/openapi/tests/openapi_integration/test_snapshot.py b/tests/openapi/openapi_integration/test_snapshot.py similarity index 100% rename from openapi/tests/openapi_integration/test_snapshot.py rename to tests/openapi/openapi_integration/test_snapshot.py diff --git a/openapi/tests/openapi_integration/test_sparse_dense_batch_update.py b/tests/openapi/openapi_integration/test_sparse_dense_batch_update.py similarity index 100% rename from openapi/tests/openapi_integration/test_sparse_dense_batch_update.py rename to tests/openapi/openapi_integration/test_sparse_dense_batch_update.py diff --git a/openapi/tests/openapi_integration/test_sparse_vector_config_update.py b/tests/openapi/openapi_integration/test_sparse_vector_config_update.py similarity index 100% rename from openapi/tests/openapi_integration/test_sparse_vector_config_update.py rename to tests/openapi/openapi_integration/test_sparse_vector_config_update.py diff --git a/openapi/tests/openapi_integration/test_sparse_vector_large.py b/tests/openapi/openapi_integration/test_sparse_vector_large.py similarity index 100% rename from openapi/tests/openapi_integration/test_sparse_vector_large.py rename to tests/openapi/openapi_integration/test_sparse_vector_large.py diff --git a/openapi/tests/openapi_integration/test_sparse_vector_persistence.py b/tests/openapi/openapi_integration/test_sparse_vector_persistence.py similarity index 100% rename from openapi/tests/openapi_integration/test_sparse_vector_persistence.py rename to tests/openapi/openapi_integration/test_sparse_vector_persistence.py diff --git a/openapi/tests/openapi_integration/test_sparse_vector_validations.py b/tests/openapi/openapi_integration/test_sparse_vector_validations.py similarity index 100% rename from openapi/tests/openapi_integration/test_sparse_vector_validations.py rename to tests/openapi/openapi_integration/test_sparse_vector_validations.py diff --git a/openapi/tests/openapi_integration/test_timeout.py b/tests/openapi/openapi_integration/test_timeout.py similarity index 100% rename from openapi/tests/openapi_integration/test_timeout.py rename to tests/openapi/openapi_integration/test_timeout.py diff --git a/openapi/tests/openapi_integration/test_uuid_ops.py b/tests/openapi/openapi_integration/test_uuid_ops.py similarity index 100% rename from openapi/tests/openapi_integration/test_uuid_ops.py rename to tests/openapi/openapi_integration/test_uuid_ops.py diff --git a/openapi/tests/openapi_integration/test_validate_schema.py b/tests/openapi/openapi_integration/test_validate_schema.py similarity index 100% rename from openapi/tests/openapi_integration/test_validate_schema.py rename to tests/openapi/openapi_integration/test_validate_schema.py diff --git a/openapi/tests/openapi_integration/test_validation.py b/tests/openapi/openapi_integration/test_validation.py similarity index 100% rename from openapi/tests/openapi_integration/test_validation.py rename to tests/openapi/openapi_integration/test_validation.py diff --git a/openapi/tests/openapi_integration/test_vector_config.py b/tests/openapi/openapi_integration/test_vector_config.py similarity index 100% rename from openapi/tests/openapi_integration/test_vector_config.py rename to tests/openapi/openapi_integration/test_vector_config.py diff --git a/openapi/tests/requirements-freeze.txt b/tests/openapi/requirements-freeze.txt similarity index 100% rename from openapi/tests/requirements-freeze.txt rename to tests/openapi/requirements-freeze.txt diff --git a/openapi/tests/requirements.txt b/tests/openapi/requirements.txt similarity index 100% rename from openapi/tests/requirements.txt rename to tests/openapi/requirements.txt diff --git a/openapi/tests/run_docker.sh b/tests/openapi/run_docker.sh similarity index 100% rename from openapi/tests/run_docker.sh rename to tests/openapi/run_docker.sh diff --git a/tests/openapi_integration_test.sh b/tests/openapi_integration_test.sh index b73bff1cf1..2f9a5c198e 100755 --- a/tests/openapi_integration_test.sh +++ b/tests/openapi_integration_test.sh @@ -5,14 +5,14 @@ set -ex # Ensure current path is project root cd "$(dirname "$0")/../" -cp docs/redoc/master/openapi.json openapi/tests/openapi.json +cp docs/redoc/master/openapi.json tests/openapi/openapi.json -docker buildx build --load -q ./openapi/tests --tag=qdrant_openapi_test +docker buildx build --load -q ./tests/openapi/ --tag=qdrant_openapi_test DOCKER_ARGS=$([ -t 0 ] && echo "-it" || echo "") docker run $DOCKER_ARGS \ --rm \ --network=host \ -e OPENAPI_FILE='openapi.json' \ - -v "${PWD}"/openapi/tests:/code \ + -v "${PWD}"/tests/openapi:/code \ qdrant_openapi_test sh -c /code/run_docker.sh