Skip to content

Commit cff0a57

Browse files
committed
fix: resolve CI blockers — deltalake 0.30, cargo fmt, workspace exclude
- Bump deltalake 0.29 → 0.30 (datafusion ^51.0 compatible) - Fix cargo fmt: sort mod/use declarations in blasgraph/mod.rs - Use workspace exclude for lance-graph-python (links=python conflict) - Auto-format spo/store.rs, spo/merkle.rs, spo_ground_truth.rs https://claude.ai/code/session_01Mcj8GxEtzmVba6RmuT7AjD
1 parent 447b775 commit cff0a57

11 files changed

Lines changed: 210 additions & 309 deletions

File tree

Cargo.lock

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

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ members = [
44
"crates/lance-graph-catalog",
55
"crates/lance-graph-benches",
66
]
7+
exclude = [
8+
"crates/lance-graph-python",
9+
]
710
resolver = "2"

crates/lance-graph/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ nom = "7.1"
3838
serde = { version = "1", features = ["derive"] }
3939
serde_json = "1"
4040
snafu = "0.8"
41-
deltalake = { version = "0.29", features = ["datafusion", "s3", "azure", "gcs"], optional = true }
41+
deltalake = { version = "0.30", features = ["datafusion", "s3", "azure", "gcs"], optional = true }
4242
url = { version = "2", optional = true }
4343

4444
[features]

crates/lance-graph/src/graph/blasgraph/mod.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@
1919
//! | BOOLEAN | AND | OR | Reachability |
2020
//! | XOR_FIELD | XOR | XOR | GF(2) algebra |
2121
22-
pub mod types;
23-
pub mod semiring;
22+
pub mod descriptor;
2423
pub mod matrix;
25-
pub mod vector;
2624
pub mod ops;
25+
pub mod semiring;
2726
pub mod sparse;
28-
pub mod descriptor;
27+
pub mod types;
28+
pub mod vector;
2929

30-
pub use types::*;
31-
pub use matrix::GrBMatrix;
32-
pub use vector::GrBVector;
33-
pub use semiring::{Semiring, HdrSemiring};
34-
pub use sparse::{SparseFormat, CsrStorage, CooStorage};
3530
pub use descriptor::{Descriptor, GrBDesc};
31+
pub use matrix::GrBMatrix;
3632
pub use ops::*;
33+
pub use semiring::{HdrSemiring, Semiring};
34+
pub use sparse::{CooStorage, CsrStorage, SparseFormat};
35+
pub use types::*;
36+
pub use vector::GrBVector;
3737

3838
/// GraphBLAS status codes.
3939
#[derive(Debug, Clone, Copy, PartialEq, Eq)]

crates/lance-graph/src/graph/blasgraph/semiring.rs

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,12 @@ impl Semiring for HdrSemiring {
8585
match self {
8686
HdrSemiring::XorBundle | HdrSemiring::BindFirst | HdrSemiring::XorField => {
8787
match (a, b) {
88-
(HdrScalar::Vector(va), HdrScalar::Vector(vb)) => {
89-
HdrScalar::Vector(va.xor(vb))
90-
}
88+
(HdrScalar::Vector(va), HdrScalar::Vector(vb)) => HdrScalar::Vector(va.xor(vb)),
9189
_ => HdrScalar::Empty,
9290
}
9391
}
9492
HdrSemiring::Resonance => match (a, b) {
95-
(HdrScalar::Vector(va), HdrScalar::Vector(vb)) => {
96-
HdrScalar::Vector(va.xor(vb))
97-
}
93+
(HdrScalar::Vector(va), HdrScalar::Vector(vb)) => HdrScalar::Vector(va.xor(vb)),
9894
_ => HdrScalar::Empty,
9995
},
10096
HdrSemiring::HammingMin => match (a, b) {
@@ -111,9 +107,7 @@ impl Semiring for HdrSemiring {
111107
_ => HdrScalar::Empty,
112108
},
113109
HdrSemiring::Boolean => match (a, b) {
114-
(HdrScalar::Vector(va), HdrScalar::Vector(vb)) => {
115-
HdrScalar::Vector(va.and(vb))
116-
}
110+
(HdrScalar::Vector(va), HdrScalar::Vector(vb)) => HdrScalar::Vector(va.and(vb)),
117111
(HdrScalar::Bool(ba), HdrScalar::Bool(bb)) => HdrScalar::Bool(*ba && *bb),
118112
_ => HdrScalar::Empty,
119113
},
@@ -141,15 +135,11 @@ impl Semiring for HdrSemiring {
141135
a.clone()
142136
}
143137
HdrSemiring::HammingMin => match (a, b) {
144-
(HdrScalar::Float(fa), HdrScalar::Float(fb)) => {
145-
HdrScalar::Float(fa.min(*fb))
146-
}
138+
(HdrScalar::Float(fa), HdrScalar::Float(fb)) => HdrScalar::Float(fa.min(*fb)),
147139
_ => a.clone(),
148140
},
149141
HdrSemiring::SimilarityMax => match (a, b) {
150-
(HdrScalar::Float(fa), HdrScalar::Float(fb)) => {
151-
HdrScalar::Float(fa.max(*fb))
152-
}
142+
(HdrScalar::Float(fa), HdrScalar::Float(fb)) => HdrScalar::Float(fa.max(*fb)),
153143
_ => a.clone(),
154144
},
155145
HdrSemiring::Resonance => match (a, b) {
@@ -165,16 +155,12 @@ impl Semiring for HdrSemiring {
165155
_ => a.clone(),
166156
},
167157
HdrSemiring::Boolean => match (a, b) {
168-
(HdrScalar::Vector(va), HdrScalar::Vector(vb)) => {
169-
HdrScalar::Vector(va.or(vb))
170-
}
158+
(HdrScalar::Vector(va), HdrScalar::Vector(vb)) => HdrScalar::Vector(va.or(vb)),
171159
(HdrScalar::Bool(ba), HdrScalar::Bool(bb)) => HdrScalar::Bool(*ba || *bb),
172160
_ => a.clone(),
173161
},
174162
HdrSemiring::XorField => match (a, b) {
175-
(HdrScalar::Vector(va), HdrScalar::Vector(vb)) => {
176-
HdrScalar::Vector(va.xor(vb))
177-
}
163+
(HdrScalar::Vector(va), HdrScalar::Vector(vb)) => HdrScalar::Vector(va.xor(vb)),
178164
_ => a.clone(),
179165
},
180166
}

crates/lance-graph/src/graph/blasgraph/sparse.rs

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@ impl SparseVec {
4242

4343
/// Insert or replace an entry. Maintains sorted order.
4444
pub fn set(&mut self, index: usize, value: BitVec) {
45-
assert!(index < self.dim, "index {} out of bounds (dim={})", index, self.dim);
45+
assert!(
46+
index < self.dim,
47+
"index {} out of bounds (dim={})",
48+
index,
49+
self.dim
50+
);
4651
match self.entries.binary_search_by_key(&index, |e| e.index) {
4752
Ok(pos) => self.entries[pos].value = value,
4853
Err(pos) => self.entries.insert(pos, SparseEntry { index, value }),
@@ -100,8 +105,18 @@ impl CooStorage {
100105

101106
/// Add a triplet `(row, col, value)`.
102107
pub fn push(&mut self, row: usize, col: usize, value: BitVec) {
103-
assert!(row < self.nrows, "row {} out of bounds (nrows={})", row, self.nrows);
104-
assert!(col < self.ncols, "col {} out of bounds (ncols={})", col, self.ncols);
108+
assert!(
109+
row < self.nrows,
110+
"row {} out of bounds (nrows={})",
111+
row,
112+
self.nrows
113+
);
114+
assert!(
115+
col < self.ncols,
116+
"col {} out of bounds (ncols={})",
117+
col,
118+
self.ncols
119+
);
105120
self.rows.push(row);
106121
self.cols.push(col);
107122
self.vals.push(value);

crates/lance-graph/src/graph/blasgraph/types.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,7 @@ impl fmt::Debug for BitVec {
2929
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3030
let pop = self.popcount();
3131
let density = self.density();
32-
write!(
33-
f,
34-
"BitVec {{ popcount: {}, density: {:.4} }}",
35-
pop, density
36-
)
32+
write!(f, "BitVec {{ popcount: {}, density: {:.4} }}", pop, density)
3733
}
3834
}
3935

crates/lance-graph/src/graph/spo/merkle.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
//! it does not re-hash the fingerprint data to detect bit-flip corruption.
1212
//! This is documented and tested (test 6 expects this gap).
1313
14-
use crate::graph::fingerprint::{Fingerprint, ZERO_FP};
1514
#[cfg(test)]
1615
use crate::graph::fingerprint::FINGERPRINT_WORDS;
16+
use crate::graph::fingerprint::{Fingerprint, ZERO_FP};
1717

1818
/// A Merkle root stamped on a BindSpace node at write time.
1919
///
@@ -125,9 +125,7 @@ impl BindSpace {
125125

126126
/// Get ClamPath and MerkleRoot for a node.
127127
pub fn clam_merkle(&self, addr: usize) -> Option<(&ClamPath, &MerkleRoot)> {
128-
self.nodes
129-
.get(addr)
130-
.map(|n| (&n.clam_path, &n.merkle_root))
128+
self.nodes.get(addr).map(|n| (&n.clam_path, &n.merkle_root))
131129
}
132130

133131
/// Verify lineage integrity for a node.

crates/lance-graph/src/graph/spo/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,10 @@ mod spo_redisgraph_parity {
140140

141141
// Jan-[KNOWS]->Ada has truth (0.9, 0.8), expectation = 0.82 → passes STRONG (0.75)
142142
let strong_hits = store.query_forward_gated(&jan, &knows, 200, TruthGate::STRONG);
143-
assert!(!strong_hits.is_empty(), "STRONG gate should pass 0.82 expectation");
143+
assert!(
144+
!strong_hits.is_empty(),
145+
"STRONG gate should pass 0.82 expectation"
146+
);
144147

145148
// Max-[HELPS]->Jan has truth (0.6, 0.3), expectation = 0.53 → fails STRONG
146149
let max = label_fp("Max");

crates/lance-graph/src/graph/spo/store.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,7 @@ impl SpoStore {
8585
}
8686

8787
/// Raw bitmap query with truth gate filtering.
88-
fn query_bitmap_gated(
89-
&self,
90-
query: &Bitmap,
91-
radius: u32,
92-
gate: TruthGate,
93-
) -> Vec<SpoHit> {
88+
fn query_bitmap_gated(&self, query: &Bitmap, radius: u32, gate: TruthGate) -> Vec<SpoHit> {
9489
let mut hits: Vec<SpoHit> = self
9590
.records
9691
.iter()

0 commit comments

Comments
 (0)