diff --git a/Cargo.lock b/Cargo.lock index df9ba1a1b..e03c40d48 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -72,6 +72,7 @@ dependencies = [ "const-random", "getrandom", "once_cell", + "serde", "version_check", "zerocopy", ] @@ -4413,6 +4414,37 @@ dependencies = [ name = "pometry-storage" version = "0.13.1" +[[package]] +name = "pometry-storage-private" +version = "0.12.1" +dependencies = [ + "ahash", + "bincode", + "bytemuck", + "criterion", + "itertools 0.12.1", + "kdam", + "memmap2 0.9.5", + "once_cell", + "parking_lot", + "polars-arrow", + "polars-parquet", + "polars-utils", + "pretty_assertions", + "proptest", + "rand", + "raphtory-api", + "rayon", + "serde", + "serde_json", + "strum", + "tempfile", + "thiserror 1.0.68", + "tracing", + "tracing-subscriber", + "twox-hash", +] + [[package]] name = "portable-atomic" version = "1.9.0" @@ -4847,7 +4879,7 @@ dependencies = [ "polars-core", "polars-io", "polars-parquet", - "pometry-storage", + "pometry-storage-private", "pretty_assertions", "proptest", "prost", @@ -4909,7 +4941,7 @@ dependencies = [ "criterion", "csv", "flate2", - "pometry-storage", + "pometry-storage-private", "rand", "raphtory", "raphtory-api", @@ -4936,7 +4968,7 @@ dependencies = [ "pest", "pest_derive", "polars-arrow", - "pometry-storage", + "pometry-storage-private", "pretty_assertions", "proptest", "raphtory", @@ -4948,6 +4980,7 @@ dependencies = [ "thiserror 2.0.0", "tokio", "tracing", + "tracing-subscriber", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 0cb4fff4e..1e91dbff3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,9 +40,9 @@ debug = 0 [workspace.dependencies] #[public-storage] -pometry-storage = { version = ">=0.8.1", path = "pometry-storage" } +# pometry-storage = { version = ">=0.8.1", path = "pometry-storage" } #[private-storage] -# pometry-storage = { path = "pometry-storage-private", package = "pometry-storage-private" } +pometry-storage = { path = "pometry-storage-private", package = "pometry-storage-private", features = ["progress"]} async-graphql = { version = ">=7.0.5, <7.0.8", features = [ "dynamic-schema", ] } # 7.0.8+ is borked, see https://github.com/async-graphql/async-graphql/issues/1586 diff --git a/pometry-storage-private b/pometry-storage-private index 0d993ebd3..123e0b3ca 160000 --- a/pometry-storage-private +++ b/pometry-storage-private @@ -1 +1 @@ -Subproject commit 0d993ebd36ba637903c53b61b8e868ff0af63ca0 +Subproject commit 123e0b3ca04f0263149cbde3cff31b51b200fa15 diff --git a/raphtory-api/src/core/entities/mod.rs b/raphtory-api/src/core/entities/mod.rs index 068a8320a..75d3b10fd 100644 --- a/raphtory-api/src/core/entities/mod.rs +++ b/raphtory-api/src/core/entities/mod.rs @@ -1,10 +1,13 @@ use super::input::input_node::parse_u64_strict; use bytemuck::{Pod, Zeroable}; +use edges::edge_ref::EdgeRef; use num_traits::ToPrimitive; +use rayon::prelude::*; use serde::{Deserialize, Serialize}; use std::{ borrow::Cow, fmt::{Display, Formatter}, + sync::Arc, }; pub mod edges; @@ -311,3 +314,182 @@ impl<'a> GidRef<'a> { } } } + +#[derive(Clone, Debug)] +pub enum LayerIds { + None, + All, + One(usize), + Multiple(Multiple), +} + +#[derive(Clone, Debug, Default)] +pub struct Multiple(pub Arc<[usize]>); + +impl Multiple { + #[inline] + pub fn binary_search(&self, pos: &usize) -> Option { + self.0.binary_search(pos).ok() + } + + #[inline] + pub fn into_iter(&self) -> impl Iterator { + let ids = self.0.clone(); + (0..ids.len()).map(move |i| ids[i]) + } + + #[inline] + pub fn iter(&self) -> impl Iterator + '_ { + self.0.iter().copied() + } + + #[inline] + pub fn find(&self, id: usize) -> Option { + self.0.get(id).copied() + } + + #[inline] + pub fn par_iter(&self) -> impl rayon::iter::ParallelIterator { + let bit_vec = self.0.clone(); + (0..bit_vec.len()).into_par_iter().map(move |i| bit_vec[i]) + } + + #[inline] + pub fn len(&self) -> usize { + self.0.len() + } +} + +impl FromIterator for Multiple { + fn from_iter>(iter: I) -> Self { + Multiple(iter.into_iter().collect()) + } +} + +impl From> for Multiple { + fn from(v: Vec) -> Self { + v.into_iter().collect() + } +} + +#[cfg(test)] +mod test { + use crate::core::entities::Multiple; + + #[test] + fn empty_bit_multiple() { + let bm = super::Multiple::default(); + let actual = bm.into_iter().collect::>(); + let expected: Vec = vec![]; + assert_eq!(actual, expected); + } + + #[test] + fn set_one() { + let bm: Multiple = [1].into_iter().collect(); + let actual = bm.into_iter().collect::>(); + assert_eq!(actual, vec![1usize]); + } + + #[test] + fn set_two() { + let bm: Multiple = [1, 67].into_iter().collect(); + + let actual = bm.into_iter().collect::>(); + assert_eq!(actual, vec![1usize, 67]); + } +} + +impl LayerIds { + pub fn find(&self, layer_id: usize) -> Option { + match self { + LayerIds::All => Some(layer_id), + LayerIds::One(id) => { + if *id == layer_id { + Some(layer_id) + } else { + None + } + } + LayerIds::Multiple(ids) => ids.binary_search(&layer_id).map(|_| layer_id), + LayerIds::None => None, + } + } + + pub fn intersect(&self, other: &LayerIds) -> LayerIds { + match (self, other) { + (LayerIds::None, _) => LayerIds::None, + (_, LayerIds::None) => LayerIds::None, + (LayerIds::All, other) => other.clone(), + (this, LayerIds::All) => this.clone(), + (LayerIds::One(id), other) => { + if other.contains(id) { + LayerIds::One(*id) + } else { + LayerIds::None + } + } + (LayerIds::Multiple(ids), other) => { + let ids: Vec = ids.iter().filter(|id| other.contains(id)).collect(); + match ids.len() { + 0 => LayerIds::None, + 1 => LayerIds::One(ids[0]), + _ => LayerIds::Multiple(ids.into()), + } + } + } + } + + pub fn constrain_from_edge(&self, e: EdgeRef) -> Cow { + match e.layer() { + None => Cow::Borrowed(self), + Some(l) => self + .find(l) + .map(|id| Cow::Owned(LayerIds::One(id))) + .unwrap_or(Cow::Owned(LayerIds::None)), + } + } + + pub fn contains(&self, layer_id: &usize) -> bool { + self.find(*layer_id).is_some() + } + + pub fn is_none(&self) -> bool { + matches!(self, LayerIds::None) + } +} + +impl From> for LayerIds { + fn from(mut v: Vec) -> Self { + match v.len() { + 0 => LayerIds::All, + 1 => LayerIds::One(v[0]), + _ => { + v.sort_unstable(); + v.dedup(); + LayerIds::Multiple(v.into()) + } + } + } +} + +impl From<[usize; N]> for LayerIds { + fn from(v: [usize; N]) -> Self { + match v.len() { + 0 => LayerIds::All, + 1 => LayerIds::One(v[0]), + _ => { + let mut v = v.to_vec(); + v.sort_unstable(); + v.dedup(); + LayerIds::Multiple(v.into()) + } + } + } +} + +impl From for LayerIds { + fn from(id: usize) -> Self { + LayerIds::One(id) + } +} diff --git a/raphtory-api/src/core/utils/logging.rs b/raphtory-api/src/core/utils/logging.rs index 5c82fe490..4096bbe92 100644 --- a/raphtory-api/src/core/utils/logging.rs +++ b/raphtory-api/src/core/utils/logging.rs @@ -39,3 +39,11 @@ pub fn global_debug_logger() { pub fn global_trace_logger() { init_global_logger("TRACE".to_string()) } + +pub fn sysout_debug() { + tracing_subscriber::fmt::fmt() + .with_max_level(tracing::Level::DEBUG) + .with_target(false) + .with_span_events(FmtSpan::ENTER | FmtSpan::CLOSE) + .init(); +} diff --git a/raphtory-cypher/Cargo.toml b/raphtory-cypher/Cargo.toml index 88a030dc8..39a50b284 100644 --- a/raphtory-cypher/Cargo.toml +++ b/raphtory-cypher/Cargo.toml @@ -20,6 +20,7 @@ arrow.workspace = true arrow-buffer.workspace = true arrow-schema.workspace = true arrow-array.workspace = true +tracing-subscriber.workspace = true pest.workspace = true pest_derive.workspace = true diff --git a/raphtory-cypher/examples/raphtory_cypher.rs b/raphtory-cypher/examples/raphtory_cypher.rs index 90d1259e8..5d6cfd463 100644 --- a/raphtory-cypher/examples/raphtory_cypher.rs +++ b/raphtory-cypher/examples/raphtory_cypher.rs @@ -14,7 +14,7 @@ mod cypher { use futures::{stream, StreamExt}; use raphtory::{ disk_graph::{graph_impl::ParquetLayerCols, DiskGraphStorage}, - logging::global_info_logger, + logging::{global_debug_logger, global_info_logger, sysout_debug}, }; use raphtory_cypher::{run_cypher, run_cypher_to_streams, run_sql}; use serde::{de::DeserializeOwned, Deserialize}; @@ -126,11 +126,11 @@ mod cypher { // #[tokio::main] pub async fn main() { - global_info_logger(); let args = Args::parse(); match args { Args::Query(args) => { + global_info_logger(); let graph = DiskGraphStorage::load_from_dir(&args.graph_dir).expect("Failed to load graph"); @@ -145,7 +145,6 @@ mod cypher { let now = std::time::Instant::now(); let batches = df.collect().await.unwrap(); - global_info_logger(); info!("Query execution time: {:?}", now.elapsed()); print_batches(&batches).expect("Failed to print batches"); } else { @@ -161,6 +160,7 @@ mod cypher { } Args::Load(args) => { + sysout_debug(); let layers = args.layers; let layer_parquet_cols = (0..layers.len()) .map(|layer_id| { diff --git a/raphtory/src/algorithms/community_detection/louvain.rs b/raphtory/src/algorithms/community_detection/louvain.rs index 808ea81cc..18f1dd21e 100644 --- a/raphtory/src/algorithms/community_detection/louvain.rs +++ b/raphtory/src/algorithms/community_detection/louvain.rs @@ -70,6 +70,7 @@ mod test { test_storage, }; use proptest::prelude::*; + #[cfg(feature = "io")] use tracing::info; #[cfg(feature = "io")] diff --git a/raphtory/src/core/entities/mod.rs b/raphtory/src/core/entities/mod.rs index a675695a3..a7df12e81 100644 --- a/raphtory/src/core/entities/mod.rs +++ b/raphtory/src/core/entities/mod.rs @@ -1,7 +1,3 @@ -use raphtory_api::core::entities::edges::edge_ref::EdgeRef; -use rayon::iter::{IntoParallelIterator, ParallelIterator}; -use std::{borrow::Cow, sync::Arc}; - pub mod edges; pub mod graph; pub mod nodes; @@ -9,220 +5,41 @@ pub mod properties; pub use raphtory_api::core::entities::*; -#[derive(Clone, Debug)] -pub enum LayerIds { - None, - All, - One(usize), - Multiple(Multiple), -} - -#[derive(Clone, Debug, Default)] -pub struct Multiple(pub Arc<[usize]>); - -impl Multiple { - #[inline] - pub fn binary_search(&self, pos: &usize) -> Option { - self.0.binary_search(pos).ok() - } - - #[inline] - pub fn into_iter(&self) -> impl Iterator { - let ids = self.0.clone(); - (0..ids.len()).map(move |i| ids[i]) - } - - #[inline] - pub fn iter(&self) -> impl Iterator + '_ { - self.0.iter().copied() - } - - #[inline] - pub fn find(&self, id: usize) -> Option { - self.0.get(id).copied() - } - - #[inline] - pub fn par_iter(&self) -> impl rayon::iter::ParallelIterator { - let bit_vec = self.0.clone(); - (0..bit_vec.len()).into_par_iter().map(move |i| bit_vec[i]) - } - - #[inline] - pub fn len(&self) -> usize { - self.0.len() - } -} - -impl FromIterator for Multiple { - fn from_iter>(iter: I) -> Self { - Multiple(iter.into_iter().collect()) - } -} - -impl From> for Multiple { - fn from(v: Vec) -> Self { - v.into_iter().collect() - } -} - -#[cfg(test)] -mod test { - use crate::core::entities::Multiple; - - #[test] - fn empty_bit_multiple() { - let bm = super::Multiple::default(); - let actual = bm.into_iter().collect::>(); - let expected: Vec = vec![]; - assert_eq!(actual, expected); - } - - #[test] - fn set_one() { - let bm: Multiple = [1].into_iter().collect(); - let actual = bm.into_iter().collect::>(); - assert_eq!(actual, vec![1usize]); - } - - #[test] - fn set_two() { - let bm: Multiple = [1, 67].into_iter().collect(); - - let actual = bm.into_iter().collect::>(); - assert_eq!(actual, vec![1usize, 67]); - } -} - -impl LayerIds { - pub fn find(&self, layer_id: usize) -> Option { - match self { - LayerIds::All => Some(layer_id), - LayerIds::One(id) => { - if *id == layer_id { - Some(layer_id) - } else { - None - } +pub fn diff<'a>( + left: &LayerIds, + graph: impl crate::prelude::GraphViewOps<'a>, + other: &LayerIds, +) -> LayerIds { + match (left, other) { + (LayerIds::None, _) => LayerIds::None, + (this, LayerIds::None) => this.clone(), + (_, LayerIds::All) => LayerIds::None, + (LayerIds::One(id), other) => { + if other.contains(id) { + LayerIds::None + } else { + LayerIds::One(*id) } - LayerIds::Multiple(ids) => ids.binary_search(&layer_id).map(|_| layer_id), - LayerIds::None => None, } - } - - pub fn intersect(&self, other: &LayerIds) -> LayerIds { - match (self, other) { - (LayerIds::None, _) => LayerIds::None, - (_, LayerIds::None) => LayerIds::None, - (LayerIds::All, other) => other.clone(), - (this, LayerIds::All) => this.clone(), - (LayerIds::One(id), other) => { - if other.contains(id) { - LayerIds::One(*id) - } else { - LayerIds::None - } - } - (LayerIds::Multiple(ids), other) => { - let ids: Vec = ids.iter().filter(|id| other.contains(id)).collect(); - match ids.len() { - 0 => LayerIds::None, - 1 => LayerIds::One(ids[0]), - _ => LayerIds::Multiple(ids.into()), - } + (LayerIds::Multiple(ids), other) => { + let ids: Vec = ids.iter().filter(|id| !other.contains(id)).collect(); + match ids.len() { + 0 => LayerIds::None, + 1 => LayerIds::One(ids[0]), + _ => LayerIds::Multiple(ids.into()), } } - } - - pub fn diff<'a>( - &self, - graph: impl crate::prelude::GraphViewOps<'a>, - other: &LayerIds, - ) -> LayerIds { - match (self, other) { - (LayerIds::None, _) => LayerIds::None, - (this, LayerIds::None) => this.clone(), - (_, LayerIds::All) => LayerIds::None, - (LayerIds::One(id), other) => { - if other.contains(id) { - LayerIds::None - } else { - LayerIds::One(*id) - } - } - (LayerIds::Multiple(ids), other) => { - let ids: Vec = ids.iter().filter(|id| !other.contains(id)).collect(); - match ids.len() { - 0 => LayerIds::None, - 1 => LayerIds::One(ids[0]), - _ => LayerIds::Multiple(ids.into()), - } + (LayerIds::All, other) => { + let all_layer_ids: Vec = graph + .unique_layers() + .map(|name| graph.get_layer_id(name.as_ref()).unwrap()) + .filter(|id| !other.contains(id)) + .collect(); + match all_layer_ids.len() { + 0 => LayerIds::None, + 1 => LayerIds::One(all_layer_ids[0]), + _ => LayerIds::Multiple(all_layer_ids.into()), } - (LayerIds::All, other) => { - let all_layer_ids: Vec = graph - .unique_layers() - .map(|name| graph.get_layer_id(name.as_ref()).unwrap()) - .filter(|id| !other.contains(id)) - .collect(); - match all_layer_ids.len() { - 0 => LayerIds::None, - 1 => LayerIds::One(all_layer_ids[0]), - _ => LayerIds::Multiple(all_layer_ids.into()), - } - } - } - } - - pub fn constrain_from_edge(&self, e: EdgeRef) -> Cow { - match e.layer() { - None => Cow::Borrowed(self), - Some(l) => self - .find(l) - .map(|id| Cow::Owned(LayerIds::One(id))) - .unwrap_or(Cow::Owned(LayerIds::None)), } } - - pub fn contains(&self, layer_id: &usize) -> bool { - self.find(*layer_id).is_some() - } - - pub fn is_none(&self) -> bool { - matches!(self, LayerIds::None) - } -} - -impl From> for LayerIds { - fn from(mut v: Vec) -> Self { - match v.len() { - 0 => LayerIds::All, - 1 => LayerIds::One(v[0]), - _ => { - v.sort_unstable(); - v.dedup(); - LayerIds::Multiple(v.into()) - } - } - } -} - -impl From<[usize; N]> for LayerIds { - fn from(v: [usize; N]) -> Self { - match v.len() { - 0 => LayerIds::All, - 1 => LayerIds::One(v[0]), - _ => { - let mut v = v.to_vec(); - v.sort_unstable(); - v.dedup(); - LayerIds::Multiple(v.into()) - } - } - } -} - -impl From for LayerIds { - fn from(id: usize) -> Self { - LayerIds::One(id) - } } diff --git a/raphtory/src/db/api/view/internal/core_ops.rs b/raphtory/src/db/api/view/internal/core_ops.rs index 4a9d2b1d6..464ff88ac 100644 --- a/raphtory/src/db/api/view/internal/core_ops.rs +++ b/raphtory/src/db/api/view/internal/core_ops.rs @@ -8,7 +8,7 @@ use crate::{ }, storage::{ locked_view::LockedView, - timeindex::{TimeIndex, TimeIndexOps, TimeIndexWindow}, + timeindex::{TimeIndex, TimeIndexIntoOps, TimeIndexOps, TimeIndexWindow}, }, Prop, }, @@ -31,7 +31,7 @@ use raphtory_api::core::{ use std::{iter, ops::Range}; #[cfg(feature = "storage")] -use pometry_storage::timestamps::TimeStamps; +use pometry_storage::timestamps::LayerAdditions; #[cfg(feature = "storage")] use rayon::prelude::*; @@ -330,7 +330,7 @@ pub enum NodeAdditions<'a> { Locked(LockedView<'a, TimeIndex>), Range(TimeIndexWindow<'a, i64>), #[cfg(feature = "storage")] - Col(Vec>), + Col(LayerAdditions<'a>), } impl<'b> TimeIndexOps for NodeAdditions<'b> { @@ -356,14 +356,7 @@ impl<'b> TimeIndexOps for NodeAdditions<'b> { NodeAdditions::Mem(index) => NodeAdditions::Range(index.range(w)), NodeAdditions::Locked(index) => NodeAdditions::Range(index.range(w)), #[cfg(feature = "storage")] - NodeAdditions::Col(index) => { - let mut ranges = Vec::with_capacity(index.len()); - index - .par_iter() - .map(|index| index.range_t(w.clone())) - .collect_into_vec(&mut ranges); - NodeAdditions::Col(ranges) - } + NodeAdditions::Col(index) => NodeAdditions::Col(index.with_range(w)), NodeAdditions::Range(index) => NodeAdditions::Range(index.range(w)), } } @@ -393,7 +386,7 @@ impl<'b> TimeIndexOps for NodeAdditions<'b> { NodeAdditions::Mem(index) => index.iter(), NodeAdditions::Locked(index) => Box::new(index.iter()), #[cfg(feature = "storage")] - NodeAdditions::Col(index) => Box::new(index.iter().flat_map(|index| index.iter())), + NodeAdditions::Col(index) => Box::new(index.iter().flat_map(|index| index.into_iter())), NodeAdditions::Range(index) => index.iter(), } } diff --git a/raphtory/src/db/api/view/layer.rs b/raphtory/src/db/api/view/layer.rs index 87ccb9421..b2763f45f 100644 --- a/raphtory/src/db/api/view/layer.rs +++ b/raphtory/src/db/api/view/layer.rs @@ -1,5 +1,5 @@ use crate::{ - core::utils::errors::GraphError, + core::{entities::diff, utils::errors::GraphError}, db::{ api::view::internal::{InternalLayerOps, OneHopFilter}, graph::views::layer_graph::LayeredGraph, @@ -55,7 +55,7 @@ impl<'graph, V: OneHopFilter<'graph> + 'graph> LayerOps<'graph> for V { ) -> Result { let all_layer_ids = self.current_filter().layer_ids(); let excluded_ids = self.current_filter().layer_ids_from_names(layers.into())?; - let included_ids = all_layer_ids.diff(self.current_filter().clone(), &excluded_ids); + let included_ids = diff(all_layer_ids, self.current_filter().clone(), &excluded_ids); Ok(self.one_hop_filtered(LayeredGraph::new( self.current_filter().clone(), @@ -68,7 +68,7 @@ impl<'graph, V: OneHopFilter<'graph> + 'graph> LayerOps<'graph> for V { let excluded_ids = self .current_filter() .valid_layer_ids_from_names(layers.into()); - let included_ids = all_layer_ids.diff(self.current_filter().clone(), &excluded_ids); + let included_ids = diff(all_layer_ids, self.current_filter().clone(), &excluded_ids); self.one_hop_filtered(LayeredGraph::new( self.current_filter().clone(), diff --git a/raphtory/src/db/graph/graph.rs b/raphtory/src/db/graph/graph.rs index 3089a45a0..fd66444df 100644 --- a/raphtory/src/db/graph/graph.rs +++ b/raphtory/src/db/graph/graph.rs @@ -446,7 +446,6 @@ mod db_tests { storage::arc_str::{ArcStr, OptionAsStr}, utils::logging::global_info_logger, }; - use serde_json::Value; use std::collections::{HashMap, HashSet}; #[cfg(feature = "proto")] use tempfile::TempDir; diff --git a/raphtory/src/disk_graph/storage_interface/node.rs b/raphtory/src/disk_graph/storage_interface/node.rs index 29706e57a..bfb54983c 100644 --- a/raphtory/src/disk_graph/storage_interface/node.rs +++ b/raphtory/src/disk_graph/storage_interface/node.rs @@ -15,8 +15,9 @@ use crate::{ }; use itertools::Itertools; use polars_arrow::datatypes::ArrowDataType; -use pometry_storage::{graph::TemporalGraph, timestamps::TimeStamps, tprops::DiskTProp, GidRef}; -use rayon::iter::{IndexedParallelIterator, IntoParallelRefIterator, ParallelIterator}; +use pometry_storage::{ + graph::TemporalGraph, timestamps::LayerAdditions, tprops::DiskTProp, GidRef, +}; use std::{borrow::Cow, iter, sync::Arc}; #[derive(Copy, Clone, Debug)] @@ -143,51 +144,12 @@ impl<'a> DiskNode<'a> { } pub fn additions_for_layers(&self, layer_ids: LayerIds) -> NodeAdditions<'a> { - let mut additions = match layer_ids { - LayerIds::None => Vec::with_capacity(1), - LayerIds::All => { - let mut additions = Vec::with_capacity(self.graph.layers().len() + 1); - self.graph - .layers() - .par_iter() - .map(|l| { - TimeStamps::new(l.nodes_storage().additions().value(self.vid.index()), None) - }) - .collect_into_vec(&mut additions); - additions - } - LayerIds::One(id) => { - vec![TimeStamps::new( - self.graph.layers()[id] - .nodes_storage() - .additions() - .value(self.vid.index()), - None, - )] - } - LayerIds::Multiple(ids) => ids - .par_iter() - .map(|l| { - TimeStamps::new( - self.graph.layers()[l] - .nodes_storage() - .additions() - .value(self.vid.index()), - None, - ) - }) - .collect::>(), - }; - - for props in self.graph.node_properties().temporal_props() { - let timestamps = props.timestamps::(self.vid); - if timestamps.len() > 0 { - let ts = timestamps.times(); - additions.push(ts); - } - } - - NodeAdditions::Col(additions) + NodeAdditions::Col(LayerAdditions::new( + self.graph.layers(), + self.vid, + layer_ids, + None, + )) } } diff --git a/raphtory/src/lib.rs b/raphtory/src/lib.rs index 860c952ed..701d50c01 100644 --- a/raphtory/src/lib.rs +++ b/raphtory/src/lib.rs @@ -201,13 +201,6 @@ mod test_utils { }) } - pub(crate) fn build_edge_deletions( - len: usize, - num_nodes: u64, - ) -> impl Strategy> { - proptest::collection::vec((0..num_nodes, 0..num_nodes, i64::MIN..i64::MAX), 0..=len) - } - pub(crate) fn build_window() -> impl Strategy { (i64::MIN..i64::MAX, i64::MIN..i64::MAX) }