completr 0.2.0__tar.gz → 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. {completr-0.2.0 → completr-0.2.1}/Cargo.lock +3 -3
  2. {completr-0.2.0 → completr-0.2.1}/Cargo.toml +1 -1
  3. {completr-0.2.0 → completr-0.2.1}/PKG-INFO +1 -1
  4. {completr-0.2.0 → completr-0.2.1}/crates/completr-py/Cargo.toml +3 -0
  5. {completr-0.2.0 → completr-0.2.1}/crates/completr-py/src/lib.rs +2 -1
  6. completr-0.2.1/crates/completr-py/tests/test_allocators.py +20 -0
  7. {completr-0.2.0 → completr-0.2.1}/LICENSE +0 -0
  8. {completr-0.2.0 → completr-0.2.1}/README.md +0 -0
  9. {completr-0.2.0 → completr-0.2.1}/crates/completr/Cargo.toml +0 -0
  10. {completr-0.2.0 → completr-0.2.1}/crates/completr/README.md +0 -0
  11. {completr-0.2.0 → completr-0.2.1}/crates/completr/src/blocked.rs +0 -0
  12. {completr-0.2.0 → completr-0.2.1}/crates/completr/src/client.rs +0 -0
  13. {completr-0.2.0 → completr-0.2.1}/crates/completr/src/codec.rs +0 -0
  14. {completr-0.2.0 → completr-0.2.1}/crates/completr/src/database.rs +0 -0
  15. {completr-0.2.0 → completr-0.2.1}/crates/completr/src/dict.rs +0 -0
  16. {completr-0.2.0 → completr-0.2.1}/crates/completr/src/document.rs +0 -0
  17. {completr-0.2.0 → completr-0.2.1}/crates/completr/src/elias_fano.rs +0 -0
  18. {completr-0.2.0 → completr-0.2.1}/crates/completr/src/engine.rs +0 -0
  19. {completr-0.2.0 → completr-0.2.1}/crates/completr/src/fuzzy.rs +0 -0
  20. {completr-0.2.0 → completr-0.2.1}/crates/completr/src/highlight.rs +0 -0
  21. {completr-0.2.0 → completr-0.2.1}/crates/completr/src/hybrid.rs +0 -0
  22. {completr-0.2.0 → completr-0.2.1}/crates/completr/src/inbox.rs +0 -0
  23. {completr-0.2.0 → completr-0.2.1}/crates/completr/src/index.rs +0 -0
  24. {completr-0.2.0 → completr-0.2.1}/crates/completr/src/lib.rs +0 -0
  25. {completr-0.2.0 → completr-0.2.1}/crates/completr/src/postings.rs +0 -0
  26. {completr-0.2.0 → completr-0.2.1}/crates/completr/src/search.rs +0 -0
  27. {completr-0.2.0 → completr-0.2.1}/crates/completr/src/segment/merge.rs +0 -0
  28. {completr-0.2.0 → completr-0.2.1}/crates/completr/src/segment/titles.rs +0 -0
  29. {completr-0.2.0 → completr-0.2.1}/crates/completr/src/segment/words.rs +0 -0
  30. {completr-0.2.0 → completr-0.2.1}/crates/completr/src/segment.rs +0 -0
  31. {completr-0.2.0 → completr-0.2.1}/crates/completr/src/staged.rs +0 -0
  32. {completr-0.2.0 → completr-0.2.1}/crates/completr/src/store.rs +0 -0
  33. {completr-0.2.0 → completr-0.2.1}/crates/completr/src/text.rs +0 -0
  34. {completr-0.2.0 → completr-0.2.1}/crates/completr/src/trie.rs +0 -0
  35. {completr-0.2.0 → completr-0.2.1}/crates/completr/src/vectors.rs +0 -0
  36. {completr-0.2.0 → completr-0.2.1}/crates/completr-py/examples/layers.py +0 -0
  37. {completr-0.2.0 → completr-0.2.1}/crates/completr-py/examples/live_updates.py +0 -0
  38. {completr-0.2.0 → completr-0.2.1}/crates/completr-py/examples/quickstart.py +0 -0
  39. {completr-0.2.0 → completr-0.2.1}/crates/completr-py/python/completr/__init__.py +0 -0
  40. {completr-0.2.0 → completr-0.2.1}/crates/completr-py/python/completr/__init__.pyi +0 -0
  41. {completr-0.2.0 → completr-0.2.1}/crates/completr-py/python/completr/_async.py +0 -0
  42. {completr-0.2.0 → completr-0.2.1}/crates/completr-py/python/completr/_async.pyi +0 -0
  43. {completr-0.2.0 → completr-0.2.1}/crates/completr-py/python/completr/_errors.py +0 -0
  44. {completr-0.2.0 → completr-0.2.1}/crates/completr-py/python/completr/_types.py +0 -0
  45. {completr-0.2.0 → completr-0.2.1}/crates/completr-py/python/completr/completr.pyi +0 -0
  46. {completr-0.2.0 → completr-0.2.1}/crates/completr-py/python/completr/py.typed +0 -0
  47. {completr-0.2.0 → completr-0.2.1}/crates/completr-py/tests/test_api.py +0 -0
  48. {completr-0.2.0 → completr-0.2.1}/crates/completr-py/tests/test_client.py +0 -0
  49. {completr-0.2.0 → completr-0.2.1}/crates/completr-py/tests/test_completr.py +0 -0
  50. {completr-0.2.0 → completr-0.2.1}/crates/completr-py/tests/test_database.py +0 -0
  51. {completr-0.2.0 → completr-0.2.1}/crates/completr-py/tests/test_vectors.py +0 -0
  52. {completr-0.2.0 → completr-0.2.1}/pyproject.toml +0 -0
@@ -735,7 +735,7 @@ dependencies = [
735
735
 
736
736
  [[package]]
737
737
  name = "completr"
738
- version = "0.2.0"
738
+ version = "0.2.1"
739
739
  dependencies = [
740
740
  "arc-swap",
741
741
  "async-trait",
@@ -765,7 +765,7 @@ dependencies = [
765
765
 
766
766
  [[package]]
767
767
  name = "completr-cli"
768
- version = "0.2.0"
768
+ version = "0.2.1"
769
769
  dependencies = [
770
770
  "clap",
771
771
  "completr",
@@ -776,7 +776,7 @@ dependencies = [
776
776
 
777
777
  [[package]]
778
778
  name = "completr-py"
779
- version = "0.2.0"
779
+ version = "0.2.1"
780
780
  dependencies = [
781
781
  "completr",
782
782
  "mimalloc",
@@ -3,7 +3,7 @@ resolver = "2"
3
3
  members = ["crates/completr", "crates/completr-py"]
4
4
 
5
5
  [workspace.package]
6
- version = "0.2.0"
6
+ version = "0.2.1"
7
7
  edition = "2021"
8
8
  rust-version = "1.94.1"
9
9
  license = "MIT"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: completr
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Classifier: Development Status :: 4 - Beta
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: Operating System :: MacOS
@@ -18,4 +18,7 @@ pyo3 = { version = "0.29", features = ["extension-module", "abi3-py311"] }
18
18
  pyo3-log = "0.13"
19
19
  tracing = { version = "0.1", default-features = false, features = ["log"] }
20
20
  completr_rs = { package = "completr", path = "../completr", features = ["aws-credentials", "gcp", "azure"] }
21
+
22
+ # Not on macOS, where every mimalloc in a process shares fixed thread slots and pyarrow ships one.
23
+ [target.'cfg(target_os = "linux")'.dependencies]
21
24
  mimalloc = { version = "0.1", default-features = false }
@@ -10,7 +10,8 @@ use pyo3::prelude::*;
10
10
  use pyo3::sync::PyOnceLock;
11
11
  use pyo3::types::{PyBytes, PyDict, PyList, PyString, PyType};
12
12
 
13
- // Returns freed memory to the system, which the platform allocator keeps after a build.
13
+ // Returns freed memory to the system, which glibc keeps after a build.
14
+ #[cfg(target_os = "linux")]
14
15
  #[global_allocator]
15
16
  static ALLOCATOR: mimalloc::MiMalloc = mimalloc::MiMalloc;
16
17
 
@@ -0,0 +1,20 @@
1
+ import pytest
2
+
3
+ import completr
4
+
5
+ pyarrow = pytest.importorskip("pyarrow")
6
+
7
+
8
+ def test_completes_alongside_pyarrow_allocations(tmp_path):
9
+ pool = pyarrow.default_memory_pool()
10
+ table = pyarrow.table({"text": [f"skill {i}" for i in range(10_000)]})
11
+ assert pool.bytes_allocated() > 0
12
+ db = completr.connect(str(tmp_path / "db"))
13
+ with db.namespace("en-US").begin() as txn:
14
+ txn.overwrite("owner", [{"id": f"s{i}", "text": f"Skill {i}", "popularity": 0.5} for i in range(2_000)])
15
+ namespace = completr.connect(str(tmp_path / "db")).engine(sync_every=None).namespace("en-US")
16
+ for _ in range(200):
17
+ hits = namespace.complete("skill 1", ["owner"])
18
+ assert [str(h.id) for h in hits]
19
+ table = table.slice(1)
20
+ assert len(table) > 0
File without changes
File without changes
File without changes