crates/lance-graph/hosts the Rust Cypher engine; keep new modules undersrc/and co-locate helpers insidequery/or feature-specific submodules.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_executionmeasures 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.
The update script installs protobuf-compiler, libssl-dev, cmake, and
pkg-config via apt and clones AdaWorldAPI/ndarray to /ndarray (the path crates/*/Cargo.toml
resolve ../../../ndarray to from inside the workspace). No other external
services or databases are required — all storage uses Lance datasets and
in-memory Arrow.
Standard build/test/lint commands are documented above and in CLAUDE.md.
Key non-obvious notes:
- Workspace members vs excluded crates:
Cargo.tomllists 17 workspace members and 16 excluded crates.cargo test(no args) only runs workspace member tests. To test excluded crates usecargo test --manifest-path crates/<name>/Cargo.toml. - CI-gated checks (what must pass before merge):
cargo fmt -- --check(workspace members)cargo fmt --manifest-path crates/lance-graph/Cargo.toml -- --checkcargo clippy --manifest-path crates/lance-graph-contract/Cargo.toml --lib --tests -- -D warnings(mandatory, zero tolerance)cargo clippy --manifest-path crates/lance-graph/Cargo.toml --lib --tests -- -D warnings(advisory,continue-on-error: true)cargo test --manifest-path crates/lance-graph/Cargo.toml(unit + doc)cargo test --manifest-path crates/lance-graph-contract/Cargo.toml --lib
- Excluded crates have extensive
cargo fmtdrift (especiallycognitive-shader-driver,thinking-engine,holograph,bgz17). This is known and not checked by CI. Each crate was formatted by its original author independently; applyingcargo fmtto one of these is a deliberate decision, not a CI requirement. - bgz-tensor has 5 pre-existing test failures (size assertions that are platform-sensitive). These are not in the CI gate.
- ndarray path: All
path = "../../../ndarray"entries resolve to/ndarraywhen the workspace is at/workspace. The update script clones it there on first run and doesgit pullon subsequent runs.