Skip to content

Commit c248af2

Browse files
authored
chore(bindings): move rust crate to crates/lance-graph-python (lance-format#135)
## Summary - move PyO3 Rust crate from python/ to crates/lance-graph-python - wire new manifest into workspace, maturin config, Makefile, docs, examples, and release workflow - rebuild bindings and run Python tests to validate relocation ## Testing - cargo check --workspace - uv run --project . maturin develop - uv run --project . pytest python/tests -vv
1 parent 410fac5 commit c248af2

19 files changed

Lines changed: 140 additions & 7201 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121
if: inputs.release_type != 'current'
122122
run: |
123123
cargo check --manifest-path crates/lance-graph/Cargo.toml
124-
cargo check --manifest-path python/Cargo.toml
124+
cargo check --manifest-path crates/lance-graph-python/Cargo.toml
125125
126126
- name: Create release commit (when version changes)
127127
if: inputs.release_type != 'current'

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Project Structure & Module Organization
44
- `crates/lance-graph/` hosts the Rust Cypher engine; keep new modules under `src/` and co-locate helpers inside `query/` or feature-specific submodules.
5-
- `python/src/` contains the PyO3 bridge; `python/python/lance_graph/` holds the pure-Python facade and packaging metadata.
5+
- `crates/lance-graph-python/src/` contains the PyO3 bridge; `python/python/lance_graph/` holds the pure-Python facade and packaging metadata.
66
- `python/python/tests/` stores functional tests; mirror new features with targeted cases here and in the corresponding Rust module.
77
- `examples/` demonstrates Cypher usage; update or add examples when introducing new public APIs.
88

Cargo.lock

Lines changed: 122 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
members = [
33
"crates/lance-graph",
44
"crates/lance-graph-catalog",
5-
]
6-
exclude = [
7-
"python",
5+
"crates/lance-graph-python",
86
]
97
resolver = "2"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ arrow-schema = "56.2"
1616
arrow-ipc = "56.2"
1717
datafusion = { version = "50.3", default-features = false }
1818
futures = "0.3"
19-
lance-graph = { path = "../crates/lance-graph" }
19+
lance-graph = { path = "../lance-graph" }
2020
serde = { version = "1", features = ["derive"] }
2121
serde_json = "1"
2222
pyo3 = { version = "0.25", features = ["extension-module", "abi3-py39", "py-clone"] }
File renamed without changes.

docs/project_structure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Suggested Migration Steps
5454
3. Split the planner (`Cypher -> LogicalPlan`) into `lance-graph-planner`.
5555
4. Refactor the Simple executor so it lives in the workspace cleanly (either
5656
inside the facade crate or as a `lance-graph-simple` crate).
57-
5. Update `python/Cargo.toml` to depend on the workspace crates.
57+
5. Update `crates/lance-graph-python/Cargo.toml` to depend on the workspace crates.
5858
6. Add ADRs for each step under `docs/` to document tradeoffs.
5959
7. Update GitHub workflows to match the new workspace paths (build, test,
6060
release/publish), otherwise releases will fail.

0 commit comments

Comments
 (0)