crates/lance-graph/hosts the Rust Cypher engine; keep new modules undersrc/and co-locate helpers insidequery/or feature-specific submodules.crates/lance-graph-catalog/provides catalog and namespace utilities, including Unity Catalog and Delta Lake integration; feature-gated viaunity-catalog.crates/lance-graph-benches/contains performance benchmarks in a dedicated unpublished crate; add new benchmarks here rather than in the main crate.crates/lance-graph-python/src/contains the PyO3 bridge;python/python/lance_graph/holds the pure-Python facade and packaging metadata.python/python/tests/stores functional tests; mirror new features with targeted cases here and in the corresponding Rust module.examples/demonstrates Cypher usage; update or add examples when introducing new public APIs.
cargo check/cargo test --all(run insidecrates/lance-graph) validate Rust code paths.cargo bench --bench graph_execution -p lance-graph-benchesmeasures performance-critical changes; include shortened runs with--warm-up-time 1.uv venv --python 3.11 .venvanduv pip install -e '.[tests]'bootstrap the Python workspace.maturin developrebuilds the extension after Rust edits;pytest python/python/tests/ -vexercises Python bindings.make lint(inpython/) runsruff, formatting checks, andpyright.
- Format Rust with
cargo fmt --all; keep modules and functions snake_case, types PascalCase, and reusesnafuerror patterns. - Run
cargo clippy --all-targets --all-featuresto catch lint regressions. - Use 4-space indentation in Python; maintain snake_case modules, CamelCase classes, and type-annotated public APIs.
- Apply
ruff format python/before committing;ruff checkandpyrightenforce import hygiene and typing.
- Add Rust unit tests alongside implementations via
#[cfg(test)]; prefer focused scenarios over broad integration. - Python tests belong in
python/python/tests/; name filestest_*.pyand use markers (gpu,cuda,integration,slow) consistently. - When touching performance-sensitive code, capture representative
cargo benchor large-table pytest timing notes in the PR.
- Follow the existing history style (
feat(graph):,docs:,refactor(query):), using imperative, ≤72-character subjects. - Reference issues or discussions when relevant and include brief context in the body.
- PRs should describe scope, list test commands run, mention benchmark deltas when applicable, and highlight impacts on bindings or examples.