logosdb 0.2.0__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.
- logosdb-0.2.0/.github/workflows/ci.yml +72 -0
- logosdb-0.2.0/.github/workflows/publish.yml +112 -0
- logosdb-0.2.0/.github/workflows/python.yml +77 -0
- logosdb-0.2.0/.gitignore +15 -0
- logosdb-0.2.0/CHANGELOG +70 -0
- logosdb-0.2.0/CMakeLists.txt +69 -0
- logosdb-0.2.0/LICENSE +21 -0
- logosdb-0.2.0/PKG-INFO +303 -0
- logosdb-0.2.0/README.md +255 -0
- logosdb-0.2.0/RELEASING.md +119 -0
- logosdb-0.2.0/examples/python/basic_usage.py +76 -0
- logosdb-0.2.0/examples/python/sentence_transformers_demo.py +72 -0
- logosdb-0.2.0/include/logosdb/logosdb.h +241 -0
- logosdb-0.2.0/pyproject.toml +81 -0
- logosdb-0.2.0/python/logosdb/__init__.py +17 -0
- logosdb-0.2.0/python/logosdb/_core.pyi +65 -0
- logosdb-0.2.0/python/logosdb/py.typed +0 -0
- logosdb-0.2.0/python/src/bindings.cpp +174 -0
- logosdb-0.2.0/src/hnsw_index.cpp +146 -0
- logosdb-0.2.0/src/hnsw_index.h +64 -0
- logosdb-0.2.0/src/logosdb.cpp +364 -0
- logosdb-0.2.0/src/metadata.cpp +181 -0
- logosdb-0.2.0/src/metadata.h +65 -0
- logosdb-0.2.0/src/storage.cpp +200 -0
- logosdb-0.2.0/src/storage.h +70 -0
- logosdb-0.2.0/tests/python/test_smoke.py +196 -0
- logosdb-0.2.0/tests/test_basic.cpp +698 -0
- logosdb-0.2.0/third_party/hnswlib/.github/workflows/build.yml +92 -0
- logosdb-0.2.0/third_party/hnswlib/.gitignore +13 -0
- logosdb-0.2.0/third_party/hnswlib/ALGO_PARAMS.md +31 -0
- logosdb-0.2.0/third_party/hnswlib/CMakeLists.txt +105 -0
- logosdb-0.2.0/third_party/hnswlib/LICENSE +201 -0
- logosdb-0.2.0/third_party/hnswlib/MANIFEST.in +2 -0
- logosdb-0.2.0/third_party/hnswlib/Makefile +15 -0
- logosdb-0.2.0/third_party/hnswlib/README.md +361 -0
- logosdb-0.2.0/third_party/hnswlib/TESTING_RECALL.md +91 -0
- logosdb-0.2.0/third_party/hnswlib/examples/cpp/EXAMPLES.md +189 -0
- logosdb-0.2.0/third_party/hnswlib/examples/cpp/example_epsilon_search.cpp +66 -0
- logosdb-0.2.0/third_party/hnswlib/examples/cpp/example_filter.cpp +57 -0
- logosdb-0.2.0/third_party/hnswlib/examples/cpp/example_mt_filter.cpp +124 -0
- logosdb-0.2.0/third_party/hnswlib/examples/cpp/example_mt_replace_deleted.cpp +114 -0
- logosdb-0.2.0/third_party/hnswlib/examples/cpp/example_mt_search.cpp +107 -0
- logosdb-0.2.0/third_party/hnswlib/examples/cpp/example_multivector_search.cpp +83 -0
- logosdb-0.2.0/third_party/hnswlib/examples/cpp/example_replace_deleted.cpp +54 -0
- logosdb-0.2.0/third_party/hnswlib/examples/cpp/example_search.cpp +58 -0
- logosdb-0.2.0/third_party/hnswlib/examples/python/EXAMPLES.md +207 -0
- logosdb-0.2.0/third_party/hnswlib/examples/python/example.py +71 -0
- logosdb-0.2.0/third_party/hnswlib/examples/python/example_filter.py +46 -0
- logosdb-0.2.0/third_party/hnswlib/examples/python/example_replace_deleted.py +55 -0
- logosdb-0.2.0/third_party/hnswlib/examples/python/example_search.py +41 -0
- logosdb-0.2.0/third_party/hnswlib/examples/python/example_serialization.py +72 -0
- logosdb-0.2.0/third_party/hnswlib/examples/python/pyw_hnswlib.py +65 -0
- logosdb-0.2.0/third_party/hnswlib/hnswlib/bruteforce.h +163 -0
- logosdb-0.2.0/third_party/hnswlib/hnswlib/hnswalg.h +1411 -0
- logosdb-0.2.0/third_party/hnswlib/hnswlib/hnswlib.h +228 -0
- logosdb-0.2.0/third_party/hnswlib/hnswlib/space_ip.h +400 -0
- logosdb-0.2.0/third_party/hnswlib/hnswlib/space_l2.h +324 -0
- logosdb-0.2.0/third_party/hnswlib/hnswlib/stop_condition.h +276 -0
- logosdb-0.2.0/third_party/hnswlib/hnswlib/visited_list_pool.h +78 -0
- logosdb-0.2.0/third_party/hnswlib/pyproject.toml +9 -0
- logosdb-0.2.0/third_party/hnswlib/python_bindings/LazyIndex.py +44 -0
- logosdb-0.2.0/third_party/hnswlib/python_bindings/__init__.py +0 -0
- logosdb-0.2.0/third_party/hnswlib/python_bindings/bindings.cpp +1036 -0
- logosdb-0.2.0/third_party/hnswlib/python_bindings/setup.py +1 -0
- logosdb-0.2.0/third_party/hnswlib/python_bindings/tests/bindings_test_bf_index.py +49 -0
- logosdb-0.2.0/third_party/hnswlib/setup.py +142 -0
- logosdb-0.2.0/third_party/hnswlib/tests/cpp/download_bigann.py +27 -0
- logosdb-0.2.0/third_party/hnswlib/tests/cpp/epsilon_search_test.cpp +114 -0
- logosdb-0.2.0/third_party/hnswlib/tests/cpp/main.cpp +8 -0
- logosdb-0.2.0/third_party/hnswlib/tests/cpp/multiThreadLoad_test.cpp +140 -0
- logosdb-0.2.0/third_party/hnswlib/tests/cpp/multiThread_replace_test.cpp +121 -0
- logosdb-0.2.0/third_party/hnswlib/tests/cpp/multivector_search_test.cpp +126 -0
- logosdb-0.2.0/third_party/hnswlib/tests/cpp/searchKnnCloserFirst_test.cpp +82 -0
- logosdb-0.2.0/third_party/hnswlib/tests/cpp/searchKnnWithFilter_test.cpp +179 -0
- logosdb-0.2.0/third_party/hnswlib/tests/cpp/sift_1b.cpp +365 -0
- logosdb-0.2.0/third_party/hnswlib/tests/cpp/sift_test.cpp +326 -0
- logosdb-0.2.0/third_party/hnswlib/tests/cpp/update_gen_data.py +37 -0
- logosdb-0.2.0/third_party/hnswlib/tests/cpp/updates_test.cpp +278 -0
- logosdb-0.2.0/third_party/hnswlib/tests/python/bindings_test.py +68 -0
- logosdb-0.2.0/third_party/hnswlib/tests/python/bindings_test_filter.py +57 -0
- logosdb-0.2.0/third_party/hnswlib/tests/python/bindings_test_getdata.py +55 -0
- logosdb-0.2.0/third_party/hnswlib/tests/python/bindings_test_labels.py +135 -0
- logosdb-0.2.0/third_party/hnswlib/tests/python/bindings_test_metadata.py +49 -0
- logosdb-0.2.0/third_party/hnswlib/tests/python/bindings_test_pickle.py +151 -0
- logosdb-0.2.0/third_party/hnswlib/tests/python/bindings_test_recall.py +100 -0
- logosdb-0.2.0/third_party/hnswlib/tests/python/bindings_test_replace.py +245 -0
- logosdb-0.2.0/third_party/hnswlib/tests/python/bindings_test_resize.py +77 -0
- logosdb-0.2.0/third_party/hnswlib/tests/python/bindings_test_spaces.py +39 -0
- logosdb-0.2.0/third_party/hnswlib/tests/python/bindings_test_stress_mt_replace.py +68 -0
- logosdb-0.2.0/third_party/hnswlib/tests/python/draw_git_test_plots.py +48 -0
- logosdb-0.2.0/third_party/hnswlib/tests/python/git_tester.py +55 -0
- logosdb-0.2.0/third_party/hnswlib/tests/python/speedtest.py +65 -0
- logosdb-0.2.0/tools/logosdb-bench.cpp +152 -0
- logosdb-0.2.0/tools/logosdb-cli.cpp +118 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
build-and-test:
|
|
15
|
+
name: ${{ matrix.os }} / ${{ matrix.build_type }}
|
|
16
|
+
runs-on: ${{ matrix.os }}
|
|
17
|
+
strategy:
|
|
18
|
+
fail-fast: false
|
|
19
|
+
matrix:
|
|
20
|
+
os: [ubuntu-latest, macos-latest]
|
|
21
|
+
build_type: [Debug, Release]
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
- name: Checkout (with submodules)
|
|
25
|
+
uses: actions/checkout@v4
|
|
26
|
+
with:
|
|
27
|
+
submodules: recursive
|
|
28
|
+
|
|
29
|
+
- name: Install build tools (Linux)
|
|
30
|
+
if: runner.os == 'Linux'
|
|
31
|
+
run: |
|
|
32
|
+
sudo apt-get update
|
|
33
|
+
sudo apt-get install -y --no-install-recommends cmake ninja-build build-essential
|
|
34
|
+
|
|
35
|
+
- name: Install build tools (macOS)
|
|
36
|
+
if: runner.os == 'macOS'
|
|
37
|
+
run: |
|
|
38
|
+
brew update
|
|
39
|
+
brew install cmake ninja
|
|
40
|
+
|
|
41
|
+
- name: Report toolchain versions
|
|
42
|
+
run: |
|
|
43
|
+
cmake --version
|
|
44
|
+
ninja --version || true
|
|
45
|
+
c++ --version || true
|
|
46
|
+
|
|
47
|
+
- name: Cache CMake build directory
|
|
48
|
+
uses: actions/cache@v4
|
|
49
|
+
with:
|
|
50
|
+
path: build
|
|
51
|
+
key: ${{ matrix.os }}-${{ matrix.build_type }}-cmake-${{ hashFiles('CMakeLists.txt', 'src/**', 'include/**', 'tools/**', 'tests/**', 'third_party/**') }}
|
|
52
|
+
restore-keys: |
|
|
53
|
+
${{ matrix.os }}-${{ matrix.build_type }}-cmake-
|
|
54
|
+
|
|
55
|
+
- name: Configure
|
|
56
|
+
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
|
|
57
|
+
|
|
58
|
+
- name: Build
|
|
59
|
+
run: cmake --build build --config ${{ matrix.build_type }} --parallel
|
|
60
|
+
|
|
61
|
+
- name: List built targets
|
|
62
|
+
run: ls -la build
|
|
63
|
+
|
|
64
|
+
- name: Run tests
|
|
65
|
+
working-directory: build
|
|
66
|
+
run: ctest --output-on-failure --build-config ${{ matrix.build_type }}
|
|
67
|
+
|
|
68
|
+
- name: Smoke-test CLI
|
|
69
|
+
working-directory: build
|
|
70
|
+
run: |
|
|
71
|
+
rm -rf /tmp/ci-smoke-db
|
|
72
|
+
./logosdb-cli info /tmp/ci-smoke-db --dim 16
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
# Release flow: push an annotated tag matching v*.*.*
|
|
5
|
+
# git tag v0.2.0 && git push origin v0.2.0
|
|
6
|
+
push:
|
|
7
|
+
tags: ["v*"]
|
|
8
|
+
# Manual trigger lets you exercise the full wheel matrix without cutting a
|
|
9
|
+
# tag. The default target is `dry_run` (build only, no upload) so accidental
|
|
10
|
+
# runs can never hit production; choose `pypi` to actually publish.
|
|
11
|
+
workflow_dispatch:
|
|
12
|
+
inputs:
|
|
13
|
+
target:
|
|
14
|
+
description: "Where to upload"
|
|
15
|
+
required: true
|
|
16
|
+
default: "dry_run"
|
|
17
|
+
type: choice
|
|
18
|
+
options:
|
|
19
|
+
- dry_run
|
|
20
|
+
- pypi
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
# ── Build ────────────────────────────────────────────────────────
|
|
24
|
+
build_wheels:
|
|
25
|
+
name: Wheels ${{ matrix.os }}
|
|
26
|
+
runs-on: ${{ matrix.os }}
|
|
27
|
+
strategy:
|
|
28
|
+
fail-fast: false
|
|
29
|
+
matrix:
|
|
30
|
+
# ubuntu-latest → manylinux x86_64 (native; do not set dual arch in
|
|
31
|
+
# pyproject — that runs x86_64 Docker on ARM and
|
|
32
|
+
# fails with "exec format error")
|
|
33
|
+
# ubuntu-24.04-arm → manylinux aarch64 (native)
|
|
34
|
+
# macos-13 → macOS x86_64 (Intel runner)
|
|
35
|
+
# macos-14 → macOS arm64 (Apple Silicon runner)
|
|
36
|
+
os: [ubuntu-latest, ubuntu-24.04-arm, macos-14]
|
|
37
|
+
steps:
|
|
38
|
+
- name: Checkout
|
|
39
|
+
uses: actions/checkout@v4
|
|
40
|
+
with:
|
|
41
|
+
submodules: recursive
|
|
42
|
+
|
|
43
|
+
- name: Build wheels
|
|
44
|
+
uses: pypa/cibuildwheel@v2.21
|
|
45
|
+
|
|
46
|
+
- name: Upload wheel artifacts
|
|
47
|
+
uses: actions/upload-artifact@v4
|
|
48
|
+
with:
|
|
49
|
+
name: wheels-${{ matrix.os }}
|
|
50
|
+
path: ./wheelhouse/*.whl
|
|
51
|
+
if-no-files-found: error
|
|
52
|
+
|
|
53
|
+
build_sdist:
|
|
54
|
+
name: Source distribution
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
steps:
|
|
57
|
+
- name: Checkout
|
|
58
|
+
uses: actions/checkout@v4
|
|
59
|
+
with:
|
|
60
|
+
submodules: recursive
|
|
61
|
+
|
|
62
|
+
- name: Set up Python
|
|
63
|
+
uses: actions/setup-python@v5
|
|
64
|
+
with:
|
|
65
|
+
python-version: "3.12"
|
|
66
|
+
|
|
67
|
+
- name: Build sdist
|
|
68
|
+
run: pipx run build --sdist
|
|
69
|
+
|
|
70
|
+
- name: Verify sdist contents
|
|
71
|
+
run: |
|
|
72
|
+
echo "── sdist contents ──"
|
|
73
|
+
ls -la dist/
|
|
74
|
+
tar tzf dist/*.tar.gz | head -60
|
|
75
|
+
echo "── checking third_party/hnswlib is included ──"
|
|
76
|
+
tar tzf dist/*.tar.gz | grep hnswlib | head -5
|
|
77
|
+
|
|
78
|
+
- name: Upload sdist artifact
|
|
79
|
+
uses: actions/upload-artifact@v4
|
|
80
|
+
with:
|
|
81
|
+
name: sdist
|
|
82
|
+
path: dist/*.tar.gz
|
|
83
|
+
if-no-files-found: error
|
|
84
|
+
|
|
85
|
+
# ── Publish: PyPI ────────────────────────────────────────────────
|
|
86
|
+
# Runs only when a version tag was pushed, OR when dispatched manually
|
|
87
|
+
# with target=pypi. The `environment: pypi` can be configured in the
|
|
88
|
+
# repo settings to require a reviewer before this job runs.
|
|
89
|
+
publish_pypi:
|
|
90
|
+
name: Upload to PyPI
|
|
91
|
+
needs: [build_wheels, build_sdist]
|
|
92
|
+
runs-on: ubuntu-latest
|
|
93
|
+
if: >-
|
|
94
|
+
startsWith(github.ref, 'refs/tags/v') ||
|
|
95
|
+
(github.event_name == 'workflow_dispatch' && inputs.target == 'pypi')
|
|
96
|
+
environment:
|
|
97
|
+
name: pypi
|
|
98
|
+
url: https://pypi.org/project/logosdb/
|
|
99
|
+
permissions:
|
|
100
|
+
id-token: write # Trusted Publishing (OIDC)
|
|
101
|
+
steps:
|
|
102
|
+
- name: Download all artifacts into dist/
|
|
103
|
+
uses: actions/download-artifact@v4
|
|
104
|
+
with:
|
|
105
|
+
path: dist
|
|
106
|
+
merge-multiple: true
|
|
107
|
+
|
|
108
|
+
- name: List artifacts
|
|
109
|
+
run: ls -la dist/
|
|
110
|
+
|
|
111
|
+
- name: Publish to PyPI
|
|
112
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
name: Python
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- "pyproject.toml"
|
|
8
|
+
- "CMakeLists.txt"
|
|
9
|
+
- "python/**"
|
|
10
|
+
- "src/**"
|
|
11
|
+
- "include/**"
|
|
12
|
+
- "third_party/**"
|
|
13
|
+
- "tests/python/**"
|
|
14
|
+
- ".github/workflows/python.yml"
|
|
15
|
+
pull_request:
|
|
16
|
+
branches: [main]
|
|
17
|
+
paths:
|
|
18
|
+
- "pyproject.toml"
|
|
19
|
+
- "CMakeLists.txt"
|
|
20
|
+
- "python/**"
|
|
21
|
+
- "src/**"
|
|
22
|
+
- "include/**"
|
|
23
|
+
- "third_party/**"
|
|
24
|
+
- "tests/python/**"
|
|
25
|
+
- ".github/workflows/python.yml"
|
|
26
|
+
|
|
27
|
+
concurrency:
|
|
28
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
29
|
+
cancel-in-progress: true
|
|
30
|
+
|
|
31
|
+
jobs:
|
|
32
|
+
wheel-and-test:
|
|
33
|
+
name: ${{ matrix.os }} / py${{ matrix.python-version }}
|
|
34
|
+
runs-on: ${{ matrix.os }}
|
|
35
|
+
strategy:
|
|
36
|
+
fail-fast: false
|
|
37
|
+
matrix:
|
|
38
|
+
os: [ubuntu-latest, macos-latest]
|
|
39
|
+
python-version: ["3.10", "3.12"]
|
|
40
|
+
|
|
41
|
+
steps:
|
|
42
|
+
- name: Checkout (with submodules)
|
|
43
|
+
uses: actions/checkout@v4
|
|
44
|
+
with:
|
|
45
|
+
submodules: recursive
|
|
46
|
+
|
|
47
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
48
|
+
uses: actions/setup-python@v5
|
|
49
|
+
with:
|
|
50
|
+
python-version: ${{ matrix.python-version }}
|
|
51
|
+
|
|
52
|
+
- name: Install build tools (Linux)
|
|
53
|
+
if: runner.os == 'Linux'
|
|
54
|
+
run: |
|
|
55
|
+
sudo apt-get update
|
|
56
|
+
sudo apt-get install -y --no-install-recommends cmake ninja-build build-essential
|
|
57
|
+
|
|
58
|
+
- name: Install build tools (macOS)
|
|
59
|
+
if: runner.os == 'macOS'
|
|
60
|
+
run: |
|
|
61
|
+
brew update
|
|
62
|
+
brew install cmake ninja
|
|
63
|
+
|
|
64
|
+
- name: Upgrade pip
|
|
65
|
+
run: python -m pip install --upgrade pip
|
|
66
|
+
|
|
67
|
+
- name: Build and install wheel
|
|
68
|
+
run: python -m pip install -v .
|
|
69
|
+
|
|
70
|
+
- name: Install pytest
|
|
71
|
+
run: python -m pip install pytest
|
|
72
|
+
|
|
73
|
+
- name: Run Python tests
|
|
74
|
+
run: python -m pytest tests/python/ -v
|
|
75
|
+
|
|
76
|
+
- name: Run example script
|
|
77
|
+
run: python examples/python/basic_usage.py
|
logosdb-0.2.0/.gitignore
ADDED
logosdb-0.2.0/CHANGELOG
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
logosdb change log
|
|
2
|
+
==================
|
|
3
|
+
|
|
4
|
+
0.2.0 (2026-04-17)
|
|
5
|
+
-------------------
|
|
6
|
+
|
|
7
|
+
Highlights: first PyPI release with Python bindings, public delete/update
|
|
8
|
+
API, and CI across Linux and macOS.
|
|
9
|
+
|
|
10
|
+
Delete / update API (closes #3)
|
|
11
|
+
|
|
12
|
+
* Added logosdb_delete(id) and logosdb_update(id, ...) to the public C API,
|
|
13
|
+
with matching DB::del() and DB::update() on the C++ wrapper. Deletions
|
|
14
|
+
are persisted as tombstone records in the JSONL metadata log and replayed
|
|
15
|
+
onto the HNSW index on reopen (including when the index file is missing
|
|
16
|
+
and has to be rebuilt from vectors.bin).
|
|
17
|
+
* Added logosdb_count_live() / DB::count_live() returning total rows minus
|
|
18
|
+
deleted rows. logosdb_count() continues to report the total (including
|
|
19
|
+
tombstoned rows) for storage-level introspection.
|
|
20
|
+
* Metadata JSONL format now also carries tombstone records of the form
|
|
21
|
+
{"op":"del","id":N}. Older data files remain readable.
|
|
22
|
+
* New C++ tests cover delete/update/re-put, persistence across reopen, and
|
|
23
|
+
tombstone replay after an index rebuild.
|
|
24
|
+
|
|
25
|
+
Python bindings and PyPI release (closes #4)
|
|
26
|
+
|
|
27
|
+
* Added Python bindings (pybind11 + scikit-build-core). pip install logosdb
|
|
28
|
+
installs a native extension that exposes logosdb.DB with put, search,
|
|
29
|
+
delete, update, count, count_live, dim, raw_vectors (zero-copy numpy
|
|
30
|
+
view) and logosdb.SearchHit. Smoke tests under tests/python/ and a
|
|
31
|
+
numpy/sentence-transformers example under examples/python/.
|
|
32
|
+
* CMakeLists.txt gained LOGOSDB_BUILD_TOOLS, LOGOSDB_BUILD_TESTS, and
|
|
33
|
+
LOGOSDB_BUILD_PYTHON options so the Python wheel build skips CLI /
|
|
34
|
+
benchmark / C++ test targets. The static core library now builds with
|
|
35
|
+
position-independent code so it can be linked into the Python extension.
|
|
36
|
+
* Added PyPI release plumbing: cibuildwheel configuration in
|
|
37
|
+
pyproject.toml and a .github/workflows/publish.yml workflow that, on
|
|
38
|
+
every v* tag, builds wheels for {Linux, macOS} x {x86_64, arm64} x
|
|
39
|
+
CPython {3.9..3.13}, builds the sdist, and uploads everything to PyPI
|
|
40
|
+
via Trusted Publishing (OIDC, no API tokens). A RELEASING.md runbook
|
|
41
|
+
documents the one-time Trusted Publisher setup and the release flow.
|
|
42
|
+
|
|
43
|
+
CI and infrastructure (closes #1)
|
|
44
|
+
|
|
45
|
+
* New .github/workflows/ci.yml builds and tests on ubuntu-latest and
|
|
46
|
+
macos-latest in both Debug and Release via CMake + Ninja, runs ctest,
|
|
47
|
+
and smoke-tests the CLI. Build directory is cached across runs.
|
|
48
|
+
* New .github/workflows/python.yml builds the Python wheel and runs the
|
|
49
|
+
pytest smoke suite on Linux and macOS for CPython 3.10 and 3.12.
|
|
50
|
+
* Fixed a latent transitive-include bug in tools/logosdb-bench.cpp that
|
|
51
|
+
broke the build on Ubuntu's libstdc++ (std::partial_sort requires an
|
|
52
|
+
explicit <algorithm> include).
|
|
53
|
+
|
|
54
|
+
0.1.0 (2025-06-25)
|
|
55
|
+
-------------------
|
|
56
|
+
|
|
57
|
+
Initial release.
|
|
58
|
+
|
|
59
|
+
* HNSW-based approximate nearest-neighbor search (hnswlib).
|
|
60
|
+
* Binary mmap-backed vector storage with fixed-stride rows.
|
|
61
|
+
* Append-only JSONL metadata store (text + ISO 8601 timestamp per row).
|
|
62
|
+
* RocksDB/LevelDB-style C API with opaque handles and errptr convention.
|
|
63
|
+
* C++ convenience wrapper (logosdb::DB) with RAII and exceptions.
|
|
64
|
+
* logosdb-cli command-line tool (put, search, info).
|
|
65
|
+
* logosdb-bench benchmark tool (HNSW vs brute-force).
|
|
66
|
+
* Crash recovery: HNSW index backfill from vector store on open.
|
|
67
|
+
* Thread-safe writes; lock-free concurrent reads.
|
|
68
|
+
* Integer overflow and bounds-checked storage arithmetic.
|
|
69
|
+
* 76 unit tests covering core operations, persistence, edge cases,
|
|
70
|
+
dimension mismatch rejection, and accessor bounds.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.15)
|
|
2
|
+
project(logosdb VERSION 0.2.0 LANGUAGES CXX)
|
|
3
|
+
|
|
4
|
+
set(CMAKE_CXX_STANDARD 17)
|
|
5
|
+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
6
|
+
|
|
7
|
+
option(LOGOSDB_BUILD_TOOLS "Build CLI and benchmark tools" ON)
|
|
8
|
+
option(LOGOSDB_BUILD_TESTS "Build unit tests" ON)
|
|
9
|
+
option(LOGOSDB_BUILD_PYTHON "Build Python bindings (pybind11)" OFF)
|
|
10
|
+
|
|
11
|
+
# hnswlib is header-only
|
|
12
|
+
add_library(hnswlib INTERFACE)
|
|
13
|
+
target_include_directories(hnswlib INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/third_party)
|
|
14
|
+
|
|
15
|
+
# Core library
|
|
16
|
+
add_library(logosdb
|
|
17
|
+
src/logosdb.cpp
|
|
18
|
+
src/storage.cpp
|
|
19
|
+
src/metadata.cpp
|
|
20
|
+
src/hnsw_index.cpp
|
|
21
|
+
)
|
|
22
|
+
target_include_directories(logosdb PUBLIC
|
|
23
|
+
${CMAKE_CURRENT_SOURCE_DIR}/include
|
|
24
|
+
${CMAKE_CURRENT_SOURCE_DIR}/src
|
|
25
|
+
)
|
|
26
|
+
target_link_libraries(logosdb PRIVATE hnswlib)
|
|
27
|
+
|
|
28
|
+
# Position-independent code is required when the static library is linked
|
|
29
|
+
# into a shared object (the Python extension is a .so).
|
|
30
|
+
set_target_properties(logosdb PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
|
31
|
+
|
|
32
|
+
if(APPLE)
|
|
33
|
+
# No extra link flags needed for mmap on macOS
|
|
34
|
+
elseif(UNIX)
|
|
35
|
+
target_link_libraries(logosdb PRIVATE pthread)
|
|
36
|
+
endif()
|
|
37
|
+
|
|
38
|
+
if(LOGOSDB_BUILD_TOOLS)
|
|
39
|
+
add_executable(logosdb-cli tools/logosdb-cli.cpp)
|
|
40
|
+
target_link_libraries(logosdb-cli PRIVATE logosdb)
|
|
41
|
+
|
|
42
|
+
add_executable(logosdb-bench tools/logosdb-bench.cpp)
|
|
43
|
+
target_link_libraries(logosdb-bench PRIVATE logosdb)
|
|
44
|
+
endif()
|
|
45
|
+
|
|
46
|
+
if(LOGOSDB_BUILD_TESTS)
|
|
47
|
+
add_executable(logosdb-test tests/test_basic.cpp)
|
|
48
|
+
target_link_libraries(logosdb-test PRIVATE logosdb)
|
|
49
|
+
|
|
50
|
+
enable_testing()
|
|
51
|
+
add_test(NAME logosdb_basic COMMAND logosdb-test)
|
|
52
|
+
endif()
|
|
53
|
+
|
|
54
|
+
if(LOGOSDB_BUILD_PYTHON)
|
|
55
|
+
# Discover Python and pybind11. When built by scikit-build-core,
|
|
56
|
+
# pybind11 is provided via the build isolation environment.
|
|
57
|
+
set(PYBIND11_FINDPYTHON ON)
|
|
58
|
+
find_package(pybind11 CONFIG REQUIRED)
|
|
59
|
+
|
|
60
|
+
pybind11_add_module(_core MODULE python/src/bindings.cpp)
|
|
61
|
+
target_link_libraries(_core PRIVATE logosdb)
|
|
62
|
+
target_compile_definitions(_core PRIVATE
|
|
63
|
+
LOGOSDB_PY_VERSION="${PROJECT_VERSION}"
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
# Install the extension module inside the `logosdb` package directory
|
|
67
|
+
# so it is importable as `logosdb._core`.
|
|
68
|
+
install(TARGETS _core LIBRARY DESTINATION logosdb)
|
|
69
|
+
endif()
|
logosdb-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Jose Ignacio
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|