corvid-python 0.3.3__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.
- corvid_python-0.3.3/.cargo/config.toml +6 -0
- corvid_python-0.3.3/.github/workflows/ci.yml +103 -0
- corvid_python-0.3.3/.github/workflows/release.yml +158 -0
- corvid_python-0.3.3/.gitignore +24 -0
- corvid_python-0.3.3/Cargo.lock +183 -0
- corvid_python-0.3.3/Cargo.toml +46 -0
- corvid_python-0.3.3/LICENSE +21 -0
- corvid_python-0.3.3/PKG-INFO +179 -0
- corvid_python-0.3.3/README.md +153 -0
- corvid_python-0.3.3/docs/PLAN.md +225 -0
- corvid_python-0.3.3/docs/SURFACE.tsv +327 -0
- corvid_python-0.3.3/examples/geo.py +45 -0
- corvid_python-0.3.3/examples/graph.py +45 -0
- corvid_python-0.3.3/examples/hybrid.py +46 -0
- corvid_python-0.3.3/examples/quickstart.py +38 -0
- corvid_python-0.3.3/examples/text_search.py +56 -0
- corvid_python-0.3.3/examples/vector_index.py +77 -0
- corvid_python-0.3.3/pyproject.toml +38 -0
- corvid_python-0.3.3/python/corvid/__init__.py +50 -0
- corvid_python-0.3.3/python/corvid/__init__.pyi +395 -0
- corvid_python-0.3.3/python/corvid/py.typed +0 -0
- corvid_python-0.3.3/scripts/surface-gate.sh +138 -0
- corvid_python-0.3.3/src/collection.rs +780 -0
- corvid_python-0.3.3/src/db.rs +235 -0
- corvid_python-0.3.3/src/error.rs +370 -0
- corvid_python-0.3.3/src/lib.rs +55 -0
- corvid_python-0.3.3/src/pred.rs +151 -0
- corvid_python-0.3.3/src/query.rs +442 -0
- corvid_python-0.3.3/src/types.rs +76 -0
- corvid_python-0.3.3/src/value.rs +281 -0
- corvid_python-0.3.3/tests/golden/admin.txt +33 -0
- corvid_python-0.3.3/tests/golden/geo.txt +28 -0
- corvid_python-0.3.3/tests/golden/graph.txt +24 -0
- corvid_python-0.3.3/tests/golden/mutations.txt +89 -0
- corvid_python-0.3.3/tests/golden/persist.txt +16 -0
- corvid_python-0.3.3/tests/golden/queries.txt +66 -0
- corvid_python-0.3.3/tests/golden/schema.txt +39 -0
- corvid_python-0.3.3/tests/golden/values.txt +61 -0
- corvid_python-0.3.3/tests/test_context_managers.py +36 -0
- corvid_python-0.3.3/tests/test_error_code.py +45 -0
- corvid_python-0.3.3/tests/test_golden.py +1207 -0
- corvid_python-0.3.3/tests/test_value_mapping.py +227 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Fetch git dependencies through the git CLI: this machine (and some
|
|
2
|
+
# CI images) rewrite https://github.com/* to ssh://git@github.com/* and
|
|
3
|
+
# cargo's built-in libgit2 fetcher cannot use the ssh-agent/keychain
|
|
4
|
+
# the CLI uses. Harmless elsewhere.
|
|
5
|
+
[net]
|
|
6
|
+
git-fetch-with-cli = true
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
concurrency:
|
|
9
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
10
|
+
cancel-in-progress: true
|
|
11
|
+
|
|
12
|
+
defaults:
|
|
13
|
+
run:
|
|
14
|
+
# bash everywhere: wheel globs and paths behave the same on windows.
|
|
15
|
+
shell: bash
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
surface-gate:
|
|
19
|
+
# docs/SURFACE.tsv vs the engine's surface list at the PINNED tag:
|
|
20
|
+
# every engine construct mapped (binding api + proving test) or N/A
|
|
21
|
+
# with a reason; N/A count pinned to the committed baseline.
|
|
22
|
+
name: surface gate (SURFACE.tsv vs pinned engine)
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
timeout-minutes: 5
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v7
|
|
27
|
+
- name: Resolve docs/SURFACE.tsv against the pinned engine surface
|
|
28
|
+
run: ./scripts/surface-gate.sh
|
|
29
|
+
|
|
30
|
+
lint:
|
|
31
|
+
name: fmt + clippy
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
timeout-minutes: 10
|
|
34
|
+
steps:
|
|
35
|
+
- uses: actions/checkout@v7
|
|
36
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
37
|
+
with:
|
|
38
|
+
components: rustfmt, clippy
|
|
39
|
+
- uses: Swatinem/rust-cache@v2
|
|
40
|
+
- run: cargo fmt --all -- --check
|
|
41
|
+
- run: cargo clippy --all-targets -- -D warnings
|
|
42
|
+
|
|
43
|
+
test:
|
|
44
|
+
name: golden suite — ${{ matrix.target }} / py${{ matrix.python }}
|
|
45
|
+
needs: lint
|
|
46
|
+
strategy:
|
|
47
|
+
fail-fast: false
|
|
48
|
+
matrix:
|
|
49
|
+
# The wheel platform matrix: linux-x64/arm64, macos-arm64,
|
|
50
|
+
# windows-x64 (macos-x64 retired with GitHub's macos-13 runners —
|
|
51
|
+
# no x86_64-darwin runner exists, same as corvid-node's matrix)
|
|
52
|
+
# × every supported minor line, latest first (toolchain policy:
|
|
53
|
+
# floor 3.11, CI covers latest + every previous line).
|
|
54
|
+
target: [linux-x64, linux-arm64, macos-arm64, windows-x64]
|
|
55
|
+
python: ["3.14", "3.13", "3.12", "3.11"]
|
|
56
|
+
include:
|
|
57
|
+
- { target: linux-x64, runs-on: ubuntu-latest }
|
|
58
|
+
- { target: linux-arm64, runs-on: ubuntu-24.04-arm }
|
|
59
|
+
- { target: macos-arm64, runs-on: macos-latest }
|
|
60
|
+
- { target: windows-x64, runs-on: windows-latest }
|
|
61
|
+
runs-on: ${{ matrix.runs-on }}
|
|
62
|
+
timeout-minutes: 10
|
|
63
|
+
steps:
|
|
64
|
+
- uses: actions/checkout@v7
|
|
65
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
66
|
+
- uses: Swatinem/rust-cache@v2
|
|
67
|
+
- uses: actions/setup-python@v7
|
|
68
|
+
with:
|
|
69
|
+
python-version: ${{ matrix.python }}
|
|
70
|
+
- run: python -m pip install --upgrade "maturin>=1.5,<2.0" pytest
|
|
71
|
+
- name: Build the extension (debug wheel — speed; release is the package job)
|
|
72
|
+
run: maturin build --out wheels
|
|
73
|
+
- run: python -m pip install wheels/corvid_python-*.whl
|
|
74
|
+
- name: Golden suite (267 fixture lines through the OOP surface)
|
|
75
|
+
run: python -m pytest tests -q
|
|
76
|
+
- name: Examples tour (six runnable programs, deterministic output)
|
|
77
|
+
env:
|
|
78
|
+
# CJK output against the Windows console encoding
|
|
79
|
+
PYTHONIOENCODING: utf-8
|
|
80
|
+
run: |
|
|
81
|
+
for ex in quickstart hybrid vector_index text_search graph geo; do
|
|
82
|
+
echo "== examples/${ex}.py =="
|
|
83
|
+
python "examples/${ex}.py"
|
|
84
|
+
done
|
|
85
|
+
|
|
86
|
+
package:
|
|
87
|
+
name: maturin build smoke
|
|
88
|
+
needs: lint
|
|
89
|
+
runs-on: ubuntu-latest
|
|
90
|
+
timeout-minutes: 10
|
|
91
|
+
steps:
|
|
92
|
+
- uses: actions/checkout@v7
|
|
93
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
94
|
+
- uses: Swatinem/rust-cache@v2
|
|
95
|
+
- uses: actions/setup-python@v7
|
|
96
|
+
with:
|
|
97
|
+
python-version: "3.14"
|
|
98
|
+
- run: python -m pip install --upgrade "maturin>=1.5,<2.0" pytest
|
|
99
|
+
- name: Release wheel build (the publish artifact shape)
|
|
100
|
+
run: maturin build --release --out dist
|
|
101
|
+
- run: python -m pip install dist/corvid_python-*.whl
|
|
102
|
+
- run: python -c "import corvid; assert corvid.ffi_version() == 1"
|
|
103
|
+
- run: python -m pytest tests -q
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
name: Release PyPI
|
|
2
|
+
|
|
3
|
+
# The corvid-python publish flow: a tag push (vX.Y.Z — must equal
|
|
4
|
+
# pyproject.toml's [project] version) builds the SAME wheel matrix ci.yml
|
|
5
|
+
# covers (linux x64/arm64, macos arm64, windows x64 — abi3 cp311, so one
|
|
6
|
+
# wheel per platform covers every Python >= 3.11) plus the sdist on the
|
|
7
|
+
# linux-x64 leg; ONE publish job then collects the artifacts and uploads
|
|
8
|
+
# them with `maturin upload --skip-existing`.
|
|
9
|
+
#
|
|
10
|
+
# Authentication is PyPI TRUSTED PUBLISHING (OIDC): the publish job grants
|
|
11
|
+
# only `id-token: write`; maturin detects the GitHub OIDC environment and
|
|
12
|
+
# exchanges the short-lived token for an upload credential — NO token
|
|
13
|
+
# secret is stored in the repo. One-time registration on pypi.org
|
|
14
|
+
# (account -> Publishing -> "Add a new pending publisher", see
|
|
15
|
+
# scripts/bindings/README.md in the engine repo):
|
|
16
|
+
# PyPI project name: corvid-python
|
|
17
|
+
# Owner: corvid-db
|
|
18
|
+
# Repository: corvid-python
|
|
19
|
+
# Workflow name: release.yml
|
|
20
|
+
# Environment name: (leave blank — omitted here on purpose; the workflow
|
|
21
|
+
# runs without a GitHub environment, and one can be
|
|
22
|
+
# added later by registering it on both sides)
|
|
23
|
+
# (NB: maturin's upload/publish commands print a deprecation warning that
|
|
24
|
+
# points at uv publish — harmless; the upload path, OIDC included, is
|
|
25
|
+
# unchanged.)
|
|
26
|
+
#
|
|
27
|
+
# API-TOKEN FALLBACK instead of trusted publishing (only if preferred):
|
|
28
|
+
# create a token at https://pypi.org/manage/account/token/ and:
|
|
29
|
+
# gh secret set PYPI_API_TOKEN -R corvid-db/corvid-python
|
|
30
|
+
# then give the upload step below:
|
|
31
|
+
# env:
|
|
32
|
+
# MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
|
|
33
|
+
# (and drop id-token: write from the job).
|
|
34
|
+
#
|
|
35
|
+
# Dry-run (no publishing, e.g. after touching this file): dispatch the
|
|
36
|
+
# workflow manually with `dry_run` checked — the whole wheel matrix, the
|
|
37
|
+
# sdist, the artifact merge, and the version verification all run; the
|
|
38
|
+
# upload step is skipped.
|
|
39
|
+
on:
|
|
40
|
+
push:
|
|
41
|
+
tags:
|
|
42
|
+
- "v*"
|
|
43
|
+
workflow_dispatch:
|
|
44
|
+
inputs:
|
|
45
|
+
dry_run:
|
|
46
|
+
description: Build wheels + sdist + verify, but skip the PyPI upload
|
|
47
|
+
type: boolean
|
|
48
|
+
default: false
|
|
49
|
+
|
|
50
|
+
permissions: {}
|
|
51
|
+
|
|
52
|
+
# Never cancel mid-run: a re-pushed tag queues behind the in-flight publish.
|
|
53
|
+
concurrency:
|
|
54
|
+
group: release-${{ github.ref }}
|
|
55
|
+
cancel-in-progress: false
|
|
56
|
+
|
|
57
|
+
jobs:
|
|
58
|
+
build:
|
|
59
|
+
name: build ${{ matrix.target }}${{ matrix.sdist && ' + sdist' || '' }}
|
|
60
|
+
strategy:
|
|
61
|
+
fail-fast: false
|
|
62
|
+
matrix:
|
|
63
|
+
# The wheel platform matrix mirrors ci.yml's test matrix exactly.
|
|
64
|
+
# macos-x64 retired with GitHub's macos-13 runners — no x86_64
|
|
65
|
+
# darwin runner exists (same as corvid-node's matrix).
|
|
66
|
+
include:
|
|
67
|
+
- { target: linux-x64, runs-on: ubuntu-latest, sdist: true }
|
|
68
|
+
- { target: linux-arm64, runs-on: ubuntu-24.04-arm, sdist: false }
|
|
69
|
+
- { target: macos-arm64, runs-on: macos-latest, sdist: false }
|
|
70
|
+
- { target: windows-x64, runs-on: windows-latest, sdist: false }
|
|
71
|
+
runs-on: ${{ matrix.runs-on }}
|
|
72
|
+
timeout-minutes: 30
|
|
73
|
+
steps:
|
|
74
|
+
- uses: actions/checkout@v7
|
|
75
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
76
|
+
- uses: Swatinem/rust-cache@v2
|
|
77
|
+
with:
|
|
78
|
+
key: ${{ matrix.target }}
|
|
79
|
+
- uses: actions/setup-python@v7
|
|
80
|
+
with:
|
|
81
|
+
python-version: "3.14"
|
|
82
|
+
- run: python -m pip install --upgrade "maturin>=1.5,<2.0"
|
|
83
|
+
- name: Build the release wheel (the publish artifact shape)
|
|
84
|
+
run: maturin build --release --out dist
|
|
85
|
+
- name: Build the sdist (one leg only — PyPI wants a single source tarball)
|
|
86
|
+
if: matrix.sdist == true
|
|
87
|
+
run: maturin sdist --out dist
|
|
88
|
+
- name: Upload distributions as workflow artifacts
|
|
89
|
+
uses: actions/upload-artifact@v4
|
|
90
|
+
with:
|
|
91
|
+
name: dist-${{ matrix.target }}
|
|
92
|
+
path: dist/*
|
|
93
|
+
if-no-files-found: error
|
|
94
|
+
|
|
95
|
+
publish:
|
|
96
|
+
name: collect + upload to PyPI (trusted publishing)
|
|
97
|
+
needs: build
|
|
98
|
+
runs-on: ubuntu-latest
|
|
99
|
+
timeout-minutes: 15
|
|
100
|
+
# Must match the pending publisher's environment field on pypi.org
|
|
101
|
+
# (the standard PyPI guide registers the environment as "pypi").
|
|
102
|
+
environment: pypi
|
|
103
|
+
permissions:
|
|
104
|
+
contents: read
|
|
105
|
+
# PyPI trusted publishing (OIDC): the ONLY credential this job needs.
|
|
106
|
+
id-token: write
|
|
107
|
+
steps:
|
|
108
|
+
- uses: actions/checkout@v7
|
|
109
|
+
- uses: actions/setup-python@v7
|
|
110
|
+
with:
|
|
111
|
+
python-version: "3.14"
|
|
112
|
+
- run: python -m pip install --upgrade "maturin>=1.5,<2.0"
|
|
113
|
+
- name: Tag must match the pyproject.toml version
|
|
114
|
+
run: |
|
|
115
|
+
VERSION=$(awk '/^\[project\]/{f=1;next} /^\[/{f=0} f && /^version = /{gsub(/[";]/,"",$3); print $3; exit}' pyproject.toml)
|
|
116
|
+
if [ -z "$VERSION" ]; then
|
|
117
|
+
echo "::error::version not found in pyproject.toml [project]"
|
|
118
|
+
exit 1
|
|
119
|
+
fi
|
|
120
|
+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
|
121
|
+
# no tag context on dispatch; the equality is enforced on tag pushes
|
|
122
|
+
echo "dispatch (dry_run=${{ inputs.dry_run }}): pyproject version ${VERSION}"
|
|
123
|
+
else
|
|
124
|
+
TAG="${GITHUB_REF_NAME#v}"
|
|
125
|
+
echo "tag: ${GITHUB_REF_NAME} (version part: ${TAG}), pyproject version: ${VERSION}"
|
|
126
|
+
if [ "$TAG" != "$VERSION" ]; then
|
|
127
|
+
echo "::error::tag ${GITHUB_REF_NAME} does not match pyproject version ${VERSION}"
|
|
128
|
+
exit 1
|
|
129
|
+
fi
|
|
130
|
+
fi
|
|
131
|
+
- name: Download every matrix distribution
|
|
132
|
+
uses: actions/download-artifact@v4
|
|
133
|
+
with:
|
|
134
|
+
pattern: dist-*
|
|
135
|
+
path: dist
|
|
136
|
+
merge-multiple: true
|
|
137
|
+
- name: Inventory (the exact upload set)
|
|
138
|
+
run: |
|
|
139
|
+
ls -l dist/
|
|
140
|
+
echo "wheels: $(find dist -name '*.whl' | wc -l | tr -d ' '), sdists: $(find dist -name '*.tar.gz' | wc -l | tr -d ' ')"
|
|
141
|
+
- name: "dry-run: upload skipped"
|
|
142
|
+
if: inputs.dry_run == true
|
|
143
|
+
run: >
|
|
144
|
+
echo "dry-run: upload skipped — wheel matrix, sdist, artifact
|
|
145
|
+
merge, and version verification all ran; nothing uploaded."
|
|
146
|
+
# maturin upload with no MATURIN_PYPI_TOKEN/username configured and the
|
|
147
|
+
# OIDC env vars present (id-token: write) authenticates via trusted
|
|
148
|
+
# publishing. --skip-existing keeps re-runs of an already-uploaded file
|
|
149
|
+
# from failing the job (per-file idempotence).
|
|
150
|
+
- name: Upload to PyPI
|
|
151
|
+
if: inputs.dry_run != true
|
|
152
|
+
run: maturin upload --skip-existing dist/*
|
|
153
|
+
- name: Verify the publish (pypi.org JSON API)
|
|
154
|
+
if: inputs.dry_run != true
|
|
155
|
+
run: |
|
|
156
|
+
VERSION=$(awk '/^\[project\]/{f=1;next} /^\[/{f=0} f && /^version = /{gsub(/[";]/,"",$3); print $3; exit}' pyproject.toml)
|
|
157
|
+
curl -sSf "https://pypi.org/pypi/corvid-python/$VERSION/json" \
|
|
158
|
+
| jq -r '"corvid-python " + .info.version + " live: " + .info.release_url'
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Rust
|
|
2
|
+
/target
|
|
3
|
+
Cargo.lock.orig
|
|
4
|
+
|
|
5
|
+
# Python
|
|
6
|
+
__pycache__/
|
|
7
|
+
*.py[cod]
|
|
8
|
+
*.egg-info/
|
|
9
|
+
.venv/
|
|
10
|
+
.venv3*/
|
|
11
|
+
venv/
|
|
12
|
+
build/
|
|
13
|
+
dist/
|
|
14
|
+
|
|
15
|
+
# Packaging (wheels are built per platform by the CI matrix, not git)
|
|
16
|
+
*.so
|
|
17
|
+
*.dylib
|
|
18
|
+
*.dll
|
|
19
|
+
python/corvid/_native.*
|
|
20
|
+
|
|
21
|
+
# test scratch
|
|
22
|
+
tests/work/
|
|
23
|
+
.pytest_cache/
|
|
24
|
+
wheels/
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "corvid-db"
|
|
7
|
+
version = "0.3.2"
|
|
8
|
+
source = "git+https://github.com/corvid-db/corvid.git?tag=v0.3.3#b726ac5a1ebace9f94dc12007a4e06927241cf4c"
|
|
9
|
+
dependencies = [
|
|
10
|
+
"redb",
|
|
11
|
+
"thiserror",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
[[package]]
|
|
15
|
+
name = "corvid-python"
|
|
16
|
+
version = "0.1.0"
|
|
17
|
+
dependencies = [
|
|
18
|
+
"corvid-db",
|
|
19
|
+
"pyo3",
|
|
20
|
+
"redb",
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
[[package]]
|
|
24
|
+
name = "heck"
|
|
25
|
+
version = "0.5.0"
|
|
26
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
27
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
28
|
+
|
|
29
|
+
[[package]]
|
|
30
|
+
name = "libc"
|
|
31
|
+
version = "0.2.189"
|
|
32
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
33
|
+
checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
|
|
34
|
+
|
|
35
|
+
[[package]]
|
|
36
|
+
name = "once_cell"
|
|
37
|
+
version = "1.21.4"
|
|
38
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
39
|
+
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
40
|
+
|
|
41
|
+
[[package]]
|
|
42
|
+
name = "portable-atomic"
|
|
43
|
+
version = "1.15.0"
|
|
44
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
45
|
+
checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
|
|
46
|
+
|
|
47
|
+
[[package]]
|
|
48
|
+
name = "proc-macro2"
|
|
49
|
+
version = "1.0.107"
|
|
50
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
51
|
+
checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
|
|
52
|
+
dependencies = [
|
|
53
|
+
"unicode-ident",
|
|
54
|
+
]
|
|
55
|
+
|
|
56
|
+
[[package]]
|
|
57
|
+
name = "pyo3"
|
|
58
|
+
version = "0.29.2"
|
|
59
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
60
|
+
checksum = "4688ddedf473e32662b9b067670129a8afb8c18e351482c70d62ba4a88171e8b"
|
|
61
|
+
dependencies = [
|
|
62
|
+
"libc",
|
|
63
|
+
"once_cell",
|
|
64
|
+
"portable-atomic",
|
|
65
|
+
"pyo3-build-config",
|
|
66
|
+
"pyo3-ffi",
|
|
67
|
+
"pyo3-macros",
|
|
68
|
+
]
|
|
69
|
+
|
|
70
|
+
[[package]]
|
|
71
|
+
name = "pyo3-build-config"
|
|
72
|
+
version = "0.29.2"
|
|
73
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
74
|
+
checksum = "f41027e41b4bd03f6e60f9f417fe24a6341a6bb744edd62b6f709f2a52ea30e9"
|
|
75
|
+
dependencies = [
|
|
76
|
+
"target-lexicon",
|
|
77
|
+
]
|
|
78
|
+
|
|
79
|
+
[[package]]
|
|
80
|
+
name = "pyo3-ffi"
|
|
81
|
+
version = "0.29.2"
|
|
82
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
83
|
+
checksum = "e591a95526fead067432c3b3a33fc74770b87b1e04e73671090d9c2055a2b327"
|
|
84
|
+
dependencies = [
|
|
85
|
+
"libc",
|
|
86
|
+
"pyo3-build-config",
|
|
87
|
+
]
|
|
88
|
+
|
|
89
|
+
[[package]]
|
|
90
|
+
name = "pyo3-macros"
|
|
91
|
+
version = "0.29.2"
|
|
92
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
93
|
+
checksum = "73225868fc1cd84eef2c3c230ddb91273bf1de46aeb8a4248da76d32a0924a1c"
|
|
94
|
+
dependencies = [
|
|
95
|
+
"proc-macro2",
|
|
96
|
+
"pyo3-macros-backend",
|
|
97
|
+
"quote",
|
|
98
|
+
"syn 2.0.119",
|
|
99
|
+
]
|
|
100
|
+
|
|
101
|
+
[[package]]
|
|
102
|
+
name = "pyo3-macros-backend"
|
|
103
|
+
version = "0.29.2"
|
|
104
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
105
|
+
checksum = "571575aa3749fa6216757dd47d2a3e7ef360f329a40f0666a9fbd14889024952"
|
|
106
|
+
dependencies = [
|
|
107
|
+
"heck",
|
|
108
|
+
"proc-macro2",
|
|
109
|
+
"quote",
|
|
110
|
+
"syn 2.0.119",
|
|
111
|
+
]
|
|
112
|
+
|
|
113
|
+
[[package]]
|
|
114
|
+
name = "quote"
|
|
115
|
+
version = "1.0.47"
|
|
116
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
117
|
+
checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
|
|
118
|
+
dependencies = [
|
|
119
|
+
"proc-macro2",
|
|
120
|
+
]
|
|
121
|
+
|
|
122
|
+
[[package]]
|
|
123
|
+
name = "redb"
|
|
124
|
+
version = "4.2.0"
|
|
125
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
126
|
+
checksum = "de6c3b63e007e90ce536ec2ae4690826136a20ec8dbbbb400daef1bb999d2e36"
|
|
127
|
+
dependencies = [
|
|
128
|
+
"libc",
|
|
129
|
+
]
|
|
130
|
+
|
|
131
|
+
[[package]]
|
|
132
|
+
name = "syn"
|
|
133
|
+
version = "2.0.119"
|
|
134
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
135
|
+
checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
|
|
136
|
+
dependencies = [
|
|
137
|
+
"proc-macro2",
|
|
138
|
+
"quote",
|
|
139
|
+
"unicode-ident",
|
|
140
|
+
]
|
|
141
|
+
|
|
142
|
+
[[package]]
|
|
143
|
+
name = "syn"
|
|
144
|
+
version = "3.0.4"
|
|
145
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
146
|
+
checksum = "e6275cddf4610d1775e6d1fe9469b2e77d0f39fd98fb7450901b821e0c53649f"
|
|
147
|
+
dependencies = [
|
|
148
|
+
"proc-macro2",
|
|
149
|
+
"quote",
|
|
150
|
+
"unicode-ident",
|
|
151
|
+
]
|
|
152
|
+
|
|
153
|
+
[[package]]
|
|
154
|
+
name = "target-lexicon"
|
|
155
|
+
version = "0.13.5"
|
|
156
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
157
|
+
checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
|
|
158
|
+
|
|
159
|
+
[[package]]
|
|
160
|
+
name = "thiserror"
|
|
161
|
+
version = "2.0.20"
|
|
162
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
163
|
+
checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f"
|
|
164
|
+
dependencies = [
|
|
165
|
+
"thiserror-impl",
|
|
166
|
+
]
|
|
167
|
+
|
|
168
|
+
[[package]]
|
|
169
|
+
name = "thiserror-impl"
|
|
170
|
+
version = "2.0.20"
|
|
171
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
172
|
+
checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af"
|
|
173
|
+
dependencies = [
|
|
174
|
+
"proc-macro2",
|
|
175
|
+
"quote",
|
|
176
|
+
"syn 3.0.4",
|
|
177
|
+
]
|
|
178
|
+
|
|
179
|
+
[[package]]
|
|
180
|
+
name = "unicode-ident"
|
|
181
|
+
version = "1.0.24"
|
|
182
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
183
|
+
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "corvid-python"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
edition = "2021"
|
|
5
|
+
rust-version = "1.88"
|
|
6
|
+
license = "MIT"
|
|
7
|
+
description = "Python binding for the corvid embedded database — the engine compiled in via pyo3, exposed as idiomatic OOP"
|
|
8
|
+
repository = "https://github.com/corvid-db/corvid-python"
|
|
9
|
+
keywords = ["database", "embedded", "vector", "search", "python"]
|
|
10
|
+
categories = ["database-implementations"]
|
|
11
|
+
readme = "README.md"
|
|
12
|
+
|
|
13
|
+
# The extension module Python imports as `corvid._native` (see
|
|
14
|
+
# [tool.maturin] in pyproject.toml; the #[pymodule] fn and the lib name
|
|
15
|
+
# must match the last component of the module name).
|
|
16
|
+
[lib]
|
|
17
|
+
name = "_native"
|
|
18
|
+
crate-type = ["cdylib"]
|
|
19
|
+
|
|
20
|
+
[dependencies]
|
|
21
|
+
pyo3 = { version = "0.29", features = ["abi3-py311"] }
|
|
22
|
+
|
|
23
|
+
# The engine, pinned to the exact release tag (docs/PLAN.md §2: the
|
|
24
|
+
# binding pins exact engine tags; the engine PACKAGE is corvid-db —
|
|
25
|
+
# bare `corvid` is an unrelated crates.io crate — its LIB ident is
|
|
26
|
+
# corvid, so `use corvid::…` is unchanged).
|
|
27
|
+
corvid-db = { git = "https://github.com/corvid-db/corvid.git", tag = "v0.3.3" }
|
|
28
|
+
|
|
29
|
+
[dev-dependencies]
|
|
30
|
+
# Test-only: the variant-inventory snapshot test (src/error.rs)
|
|
31
|
+
# constructs one instance of every engine error to pin the code
|
|
32
|
+
# mapping; six of the eighteen variants wrap redb's passthrough error
|
|
33
|
+
# types, and redb's public error enums are their only constructors.
|
|
34
|
+
# Same requirement line the engine's workspace uses — one resolution
|
|
35
|
+
# with the git dep (Cargo.lock unifies both to a single redb).
|
|
36
|
+
redb = "4.1"
|
|
37
|
+
|
|
38
|
+
# `extension-module` is enabled only when building the wheel (pyproject
|
|
39
|
+
# [tool.maturin] features), so `cargo clippy`/`cargo check` still link
|
|
40
|
+
# libpython and see the full API surface.
|
|
41
|
+
[features]
|
|
42
|
+
extension-module = ["pyo3/extension-module"]
|
|
43
|
+
|
|
44
|
+
[profile.release]
|
|
45
|
+
lto = true
|
|
46
|
+
strip = "symbols"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Rocky
|
|
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.
|