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
2 changes: 1 addition & 1 deletion .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
paths:
- python/**
- rust/lance-context/**
- crates/**
- .github/workflows/python-test.yml

concurrency:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/rust-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- main
pull_request:
paths:
- rust/**
- crates/**
- .github/workflows/rust-test.yml
- Cargo.toml
- Cargo.lock
Expand Down Expand Up @@ -51,8 +51,8 @@ jobs:
sudo apt update
sudo apt install -y protobuf-compiler
- name: Build tests
run: cargo test --manifest-path rust/lance-context/Cargo.toml --no-run
run: cargo test -p lance-context-core --no-run
- name: Run unit tests
run: cargo test --manifest-path rust/lance-context/Cargo.toml --lib
run: cargo test -p lance-context-core --lib
- name: Run doc tests
run: cargo test --manifest-path rust/lance-context/Cargo.toml --doc
run: cargo test -p lance-context-core --doc
12 changes: 6 additions & 6 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ on:
- main
pull_request:
paths:
- rust/**
- crates/**
- Cargo.toml
- Cargo.lock
- .github/workflows/style.yml
- rust/lance-context/Cargo.toml
- rust/lance-context/Cargo.lock

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -28,7 +28,7 @@ jobs:
with:
components: rustfmt
- name: Check formatting
run: cargo fmt --manifest-path rust/lance-context/Cargo.toml -- --check
run: cargo fmt --all -- --check

clippy:
runs-on: ubuntu-24.04
Expand All @@ -37,13 +37,13 @@ jobs:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
workspaces: rust/lance-context
workspaces: .
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y protobuf-compiler
- name: Clippy
run: cargo clippy --manifest-path rust/lance-context/Cargo.toml --all-targets -- -D warnings
run: cargo clippy --workspace --all-targets -- -D warnings

typos:
name: Spell Check
Expand Down
131 changes: 120 additions & 11 deletions rust/lance-context/Cargo.lock → Cargo.lock

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

14 changes: 14 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[workspace]
members = [
"crates/lance-context-core",
"crates/lance-context",
"python",
]
resolver = "2"

[workspace.package]
edition = "2021"
license = "Apache-2.0"

[workspace.metadata]
# reserved for future use
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ Key motivations inspired by the broader Lance roadmap<sup>[1](https://github.com
## Project layout

```
rust/lance-context # Core Rust crate (ContextStore, schema, serialization)
python/ # Python bindings, wheel build, and pytest suite
python/tests/ # High-level integration tests
crates/lance-context-core # Pure Rust context engine (no Python deps)
crates/lance-context # Re-export crate consumed by downstream clients/bindings
python/ # PyO3 bindings, wheel build, and pytest suite
python/tests/ # High-level integration tests
```

## Getting started
Expand Down Expand Up @@ -99,7 +100,7 @@ println!("Current version {}", store.version());
## Testing

- `make test` – Python pytest suite (including persistence integration tests).
- `cargo test --manifest-path rust/lance-context/Cargo.toml` – Rust unit tests.
- `cargo test --manifest-path crates/lance-context-core/Cargo.toml` – Rust unit tests.
- `python/.venv/bin/ruff check python/` and `python/.venv/bin/pyright` – linting/type checks.

## Roadmap
Expand All @@ -121,7 +122,7 @@ Contributions are welcome—feel free to comment on the issues above or open you
make venv # creates python/.venv using uv
make install # installs the package in editable mode with test extras
make test # runs pytest (python/tests/)
cargo test --manifest-path rust/lance-context/Cargo.toml
cargo test --manifest-path crates/lance-context-core/Cargo.toml
```
4. Run linting/type checks: `python/.venv/bin/ruff check python/`, `python/.venv/bin/pyright`, and `~/.cargo/bin/cargo fmt -- --check`.
5. Open a Pull Request with a clear summary of the change.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "lance-context"
name = "lance-context-core"
version = "0.1.0"
edition = "2021"
license = "Apache-2.0"
authors = ["Lance Devs <dev@lancedb.com>"]
repository = "https://github.com/lancedb/lance-context"
readme = "README.md"
readme = "../../README.md"
description = "Multimodal, versioned context storage for agentic workflows"
keywords = ["context", "multimodal", "lance", "agents", "storage"]
categories = ["database", "data-structures", "science"]
Expand Down
4 changes: 4 additions & 0 deletions crates/lance-context-core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# lance-context-core

Pure Rust engine for the lance-context project. This crate is free of Python
dependencies and is re-exported by the `lance-context` wrapper crate.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions crates/lance-context/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "lance-context"
version = "0.1.0"
edition = "2021"
license = "Apache-2.0"
authors = ["Lance Devs <dev@lancedb.com>"]
repository = "https://github.com/lancedb/lance-context"
description = "Public re-export crate for lance-context bindings"
readme = "../../README.md"

[dependencies]
lance-context-core = { path = "../lance-context-core" }
1 change: 1 addition & 0 deletions crates/lance-context/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub use lance_context_core::*;
2 changes: 1 addition & 1 deletion python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ crate-type = ["cdylib"]

[dependencies]
chrono = { version = "0.4", default-features = false, features = ["clock"] }
lance-context = { path = "../rust/lance-context" }
lance-context = { path = "../crates/lance-context" }
pyo3 = { version = "0.25", features = ["extension-module", "abi3-py39", "py-clone"] }
tokio = { version = "1", features = ["rt-multi-thread"] }
Loading
Loading