diff --git a/.gitignore b/.gitignore index 8e0a8f237e..2ac2a33829 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,5 @@ tests/storage-compat/compatibility.tar tests/storage-compat/full-snapshot.snapshot.gz tests/storage-compat/storage.tar.bz2 venv +.venv .env diff --git a/lib/edge/python/README.md b/lib/edge/python/README.md index 1889e9b62c..abf5cada9b 100644 --- a/lib/edge/python/README.md +++ b/lib/edge/python/README.md @@ -19,8 +19,5 @@ maturin develop --no-default-features Run example ```bash -cd examples -mkdir shard - -python qdrant-edge.py +python examples/qdrant-edge.py ``` diff --git a/lib/edge/python/examples/.gitignore b/lib/edge/python/examples/.gitignore new file mode 100644 index 0000000000..3af0ccb687 --- /dev/null +++ b/lib/edge/python/examples/.gitignore @@ -0,0 +1 @@ +/data diff --git a/lib/edge/python/examples/qdrant-edge.py b/lib/edge/python/examples/qdrant-edge.py old mode 100644 new mode 100755 index 45bb3dc07a..1aa61080be --- a/lib/edge/python/examples/qdrant-edge.py +++ b/lib/edge/python/examples/qdrant-edge.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import os import shutil import uuid @@ -6,7 +8,7 @@ from qdrant_edge import * print("---- Load shard ----") -DATA_DIRECTORY = "./data" +DATA_DIRECTORY = os.path.join(os.path.dirname(__file__), "data") # Clear and recreate data directory if os.path.exists(DATA_DIRECTORY): diff --git a/shell.nix b/shell.nix index 5b5e1c6a1e..e474b67075 100644 --- a/shell.nix +++ b/shell.nix @@ -48,6 +48,7 @@ mkShell { pkgs.glsl_analyzer # language server for editing *.comp files pkgs.gnuplot # optional runtime dep for criterion pkgs.jq # used in ./tests and ./tools + pkgs.maturin # mentioned in lib/edge/python/README.md pkgs.nixfmt-rfc-style # to format this file pkgs.npins # used in tools/nix/update.py pkgs.poetry # used to update poetry.lock