Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .bumpversion.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.bumpversion]
current_version = "0.2.0"
current_version = "0.3.0"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)(-(?P<pre_label>alpha|beta|rc)\\.(?P<pre_n>\\d+))?"
serialize = [
"{major}.{minor}.{patch}-{pre_label}.{pre_n}",
Expand Down Expand Up @@ -29,22 +29,22 @@ first_value = "0"

# Rust Cargo.toml files
[[tool.bumpversion.files]]
filename = "crates/lance-graph/Cargo.toml"
filename = "crates/lance-csr/Cargo.toml"
search = 'version = "{current_version}"'
replace = 'version = "{new_version}"'

[[tool.bumpversion.files]]
filename = "crates/lance-graph-catalog/Cargo.toml"
filename = "crates/lance-csr-catalog/Cargo.toml"
search = 'version = "{current_version}"'
replace = 'version = "{new_version}"'

[[tool.bumpversion.files]]
filename = "crates/lance-graph-benches/Cargo.toml"
filename = "crates/lance-csr-benches/Cargo.toml"
search = 'version = "{current_version}"'
replace = 'version = "{new_version}"'

[[tool.bumpversion.files]]
filename = "crates/lance-graph-python/Cargo.toml"
filename = "crates/lance-csr-python/Cargo.toml"
search = 'version = "{current_version}"'
replace = 'version = "{new_version}"'

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
paths:
- docs/**
- zensical.toml
# Pages include this example with --8<--.
- crates/lance-csr/examples/**
- .github/workflows/docs.yml

concurrency:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
with:
shared-key: "lance-csr-python"
# maturin builds the bindings crate, which sits outside the workspace.
workspaces: crates/lance-graph-python
workspaces: crates/lance-csr-python
- name: Install dependencies
run: |
sudo apt update
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/rust-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,8 @@ jobs:
run: cargo test --workspace --no-run
- name: Run tests
run: cargo test --workspace
# The Rust guide includes this example; run it so the documented code works.
- name: Run embedded example
run: cargo run -p lance-csr --example embedded_query
- name: Check benchmarks
run: cargo check -p lance-graph-benches --benches
run: cargo check -p lance-csr-benches --benches
12 changes: 6 additions & 6 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Repository Guidelines

## Project Structure & Module Organization
- `crates/lance-graph/` hosts the Rust Cypher engine; keep new modules under `src/` and co-locate helpers inside `query/` or feature-specific submodules.
- `crates/lance-graph-catalog/` provides the graph source catalog and `DirNamespace` (Unity Catalog and Delta Lake support were removed).
- `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_csr/` holds the pure-Python facade and packaging metadata.
- `crates/lance-csr/` hosts the Rust Cypher engine; keep new modules under `src/` and co-locate helpers inside `query/` or feature-specific submodules.
- `crates/lance-csr-catalog/` provides the graph source catalog and `DirNamespace` (Unity Catalog and Delta Lake support were removed).
- `crates/lance-csr-benches/` contains performance benchmarks in a dedicated unpublished crate; add new benchmarks here rather than in the main crate.
- `crates/lance-csr-python/src/` contains the PyO3 bridge; `python/python/lance_csr/` 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.
- `docs/` is the Zensical documentation site (configured by `zensical.toml`); follow `docs/AGENTS.md`.
- Keep the docs in step with the code. Any substantial code change (a new or changed Python method, parameter, return type, exception or Cypher feature, or a change in behaviour users can observe) updates the affected guide pages in the same pull request, and `docs/api-reference.md` whenever the Python API changes. That page is written by hand from `crates/lance-graph-python/src/`, so check every signature and statement against the code. Then run `uv run --project docs --locked zensical build --strict` and `uvx typos@1.26.0 .` (the spell check CI runs).
- Keep the docs in step with the code. Any substantial code change (a new or changed Python method, parameter, return type, exception or Cypher feature, or a change in behaviour users can observe) updates the affected guide pages in the same pull request, and `docs/api-reference.md` whenever the Python API changes. That page is written by hand from `crates/lance-csr-python/src/`, so check every signature and statement against the code. Then run `uv run --project docs --locked zensical build --strict` and `uvx typos@1.26.0 .` (the spell check CI runs).

## Build, Test, and Development Commands
- `cargo test --workspace` (from the repository root) runs the Rust tests; building needs `protoc`.
- `cargo bench --bench graph_execution -p lance-graph-benches` measures performance-critical changes; include shortened runs with `--warm-up-time 1`.
- `cargo bench --bench graph_execution -p lance-csr-benches` measures performance-critical changes; include shortened runs with `--warm-up-time 1`.
- Never use `pip`. In `python/`, `make install` runs `uv sync --locked --no-install-project` (locked dependencies and the `dev` group) and then a debug build with `uv run --no-sync maturin develop`; re-run it after Rust edits. Change dependencies with `uv add`/`uv remove` and commit `uv.lock`.
- `make test` runs the Python tests; `make lint` runs `ruff`, formatting checks, and `pyright`.

Expand Down
114 changes: 57 additions & 57 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[workspace]
members = [
"crates/lance-graph",
"crates/lance-graph-catalog",
"crates/lance-graph-benches",
"crates/lance-csr",
"crates/lance-csr-catalog",
"crates/lance-csr-benches",
]
# Python package needs to be built by maturin.
exclude = ["crates/lance-graph-python"]
exclude = ["crates/lance-csr-python"]
resolver = "2"
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ DataFusion as extension operators, falling back to a join for any hop the CSR ca

## Repository layout

- `crates/lance-graph` – the Cypher-capable query engine implemented in Rust
- `crates/lance-csr` – the Cypher-capable query engine implemented in Rust
- `python/` – PyO3 bindings and Python packages:
- `lance_csr` – thin wrapper around the Rust query engine

Expand All @@ -91,6 +91,10 @@ uv add lance-csr
Prebuilt wheels cover Linux x86-64 and native Apple Silicon (CPython 3.12+); no Rust toolchain is needed.
See [`python/README.md`](python/README.md) for details and usage.

To use the engine from Rust, add the crate with `cargo add lance-csr` and see
[`crates/lance-csr/README.md`](crates/lance-csr/README.md) and the
[Rust guide](https://lance-csr.pages.dev/rust/).

## Build from source

You need:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "lance-graph-benches"
version = "0.2.0"
name = "lance-csr-benches"
version = "0.3.0"
edition = "2021"
publish = false
description = "Benchmarks for lance-graph (not published)"
description = "Benchmarks for lance-csr (not published)"

[dependencies]
lance-graph = { path = "../lance-graph", version = "0.2.0" }
lance-csr = { path = "../lance-csr", version = "0.3.0" }
lance = "13.0.0"
arrow-array = "58"
arrow-schema = "58"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Lance Graph Benchmarks

Performance benchmarks for the `lance-graph` crate.
Performance benchmarks for the `lance-csr` crate.

## Running Benchmarks

From the repository root:

```bash
# Run all benchmarks
cargo bench -p lance-graph-benches
cargo bench -p lance-csr-benches

# Run specific benchmark
cargo bench -p lance-graph-benches --bench graph_execution
cargo bench -p lance-csr-benches --bench graph_execution
```

## Benchmarks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use arrow_schema::{DataType, Field, Schema as ArrowSchema};
use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criterion, Throughput};
use futures::TryStreamExt;
use lance::dataset::{Dataset, WriteMode, WriteParams};
use lance_graph::{CypherQuery, GraphConfig};
use lance_csr::{CypherQuery, GraphConfig};
use tempfile::TempDir;

fn create_people_batch() -> RecordBatch {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "lance-graph-catalog"
version = "0.2.0"
name = "lance-csr-catalog"
version = "0.3.0"
edition = "2021"
license = "Apache-2.0"
authors = ["Lance Devs <dev@lancedb.com>"]
repository = "https://github.com/lancedb/lance-graph"
authors = ["The lance-csr Authors"]
repository = "https://github.com/hyperdimensionalcomputingai/lance-csr"
readme = "README.md"
description = "Catalog and namespace utilities for Lance graph"
keywords = ["lance", "graph", "catalog", "namespace"]
Expand Down
1 change: 1 addition & 0 deletions crates/lance-csr-catalog/LICENSE
1 change: 1 addition & 0 deletions crates/lance-csr-catalog/NOTICE
Loading
Loading