From 14b6d30f9e248ea051d2c9f3b755f7dabcb4c254 Mon Sep 17 00:00:00 2001 From: Lucas Jeub Date: Wed, 6 Nov 2024 13:32:34 +0100 Subject: [PATCH 01/17] update to new pyo3 compiles --- examples/custom-gql-apis/Cargo.toml | 30 +-- examples/custom-gql-apis/src/lib.rs | 12 +- examples/netflow/src/lib.rs | 14 +- python/src/lib.rs | 12 +- raphtory-api/src/python/arcstr.rs | 4 +- raphtory-api/src/python/direction.rs | 4 +- raphtory-api/src/python/gid.rs | 6 +- raphtory-graphql/src/python/mod.rs | 7 +- raphtory-graphql/src/python/pymodule.rs | 8 +- raphtory-graphql/src/python/server/server.rs | 23 +- raphtory/Cargo.toml | 3 +- raphtory/src/io/parquet_loaders.rs | 1 + raphtory/src/python/algorithm/epidemics.rs | 12 +- raphtory/src/python/graph/algorithm_result.rs | 18 +- raphtory/src/python/graph/edges.rs | 10 +- raphtory/src/python/graph/graph.rs | 85 +++--- .../src/python/graph/graph_with_deletions.rs | 98 ++++--- .../src/python/graph/io/pandas_loaders.rs | 247 +++++++++--------- raphtory/src/python/graph/node.rs | 17 +- raphtory/src/python/graph/properties/props.rs | 6 +- .../python/graph/properties/temporal_props.rs | 8 +- raphtory/src/python/graph/views/graph_view.rs | 20 +- .../graph/views/graph_view_modules/export.rs | 37 +-- raphtory/src/python/packages/algorithms.rs | 33 ++- raphtory/src/python/packages/base_modules.rs | 26 +- raphtory/src/python/packages/vectors.rs | 25 +- raphtory/src/python/types/macros/iterable.rs | 12 +- .../types/macros/trait_impl/node_state.rs | 19 +- .../types/macros/trait_impl/serialise.rs | 4 +- .../src/python/types/wrappers/document.rs | 20 +- raphtory/src/python/types/wrappers/prop.rs | 7 +- raphtory/src/python/utils/mod.rs | 86 ++++-- 32 files changed, 499 insertions(+), 415 deletions(-) diff --git a/examples/custom-gql-apis/Cargo.toml b/examples/custom-gql-apis/Cargo.toml index b5484334d6..37bb1456bb 100644 --- a/examples/custom-gql-apis/Cargo.toml +++ b/examples/custom-gql-apis/Cargo.toml @@ -14,24 +14,24 @@ name = "raphtory" crate-type = ["cdylib"] [dependencies] -raphtory_core = { package = "raphtory", path= "../../raphtory", features = ["python", "search", "vectors"]} -raphtory-graphql = { path = "../../raphtory-graphql",features = ["python"]} -raphtory-api = { path = "../../raphtory-api"} -async-graphql = { version = "7.0.5", features = ["dynamic-schema"] } -dynamic-graphql = "0.9.0" -futures-util = "0.3.0" -tokio = { version = "1.18.2", features = ["full"] } -pyo3 = { version = "0.20.0", features = ["multiple-pymethods"] } -thiserror = "1.0.48" -display-error-chain = "0.2.0" -serde = { version = "1", features = ["derive", "rc"] } -serde_json = "1.0" -chrono = { version = "0.4.38", features = ["serde"] } -itertools = "0.13.0" +raphtory_core = { package = "raphtory", path = "../../raphtory", features = ["python", "search", "vectors"] } +raphtory-graphql = { path = "../../raphtory-graphql", features = ["python"] } +raphtory-api = { path = "../../raphtory-api" } +async-graphql = { workspace = true, features = ["dynamic-schema"] } +dynamic-graphql = { workspace = true } +futures-util = { workspace = true } +tokio = { workspace = true, features = ["full"] } +pyo3 = { workspace = true, features = ["multiple-pymethods"] } +thiserror = { workspace = true } +display-error-chain = { workspace = true } +serde = { workspace = true, features = ["derive", "rc"] } +serde_json = { workspace = true } +chrono = { workspace = true, features = ["serde"] } +itertools = { workspace = true } [features] extension-module = ["pyo3/extension-module"] default = ["extension-module"] [build-dependencies] -pyo3-build-config = "0.20.0" +pyo3-build-config = { workspace = true } diff --git a/examples/custom-gql-apis/src/lib.rs b/examples/custom-gql-apis/src/lib.rs index 69a96553cb..b2b0ffd103 100644 --- a/examples/custom-gql-apis/src/lib.rs +++ b/examples/custom-gql-apis/src/lib.rs @@ -12,7 +12,7 @@ mod mutation; mod query; #[pymodule] -fn raphtory(py: Python<'_>, m: &PyModule) -> PyResult<()> { +fn raphtory(py: Python<'_>, m: &Bound) -> PyResult<()> { let _ = add_raphtory_classes(m); let graphql_module = base_graphql_module(py)?; @@ -20,11 +20,11 @@ fn raphtory(py: Python<'_>, m: &PyModule) -> PyResult<()> { let graph_loader_module = base_graph_loader_module(py)?; let graph_gen_module = base_graph_gen_module(py)?; let vectors_module = base_vectors_module(py)?; - m.add_submodule(graphql_module)?; - m.add_submodule(algorithm_module)?; - m.add_submodule(graph_loader_module)?; - m.add_submodule(graph_gen_module)?; - m.add_submodule(vectors_module)?; + m.add_submodule(&graphql_module)?; + m.add_submodule(&algorithm_module)?; + m.add_submodule(&graph_loader_module)?; + m.add_submodule(&graph_gen_module)?; + m.add_submodule(&vectors_module)?; //new content graphql_module.add_function(wrap_pyfunction!(py_add_custom_gql_apis, m)?)?; diff --git a/examples/netflow/src/lib.rs b/examples/netflow/src/lib.rs index e4a368053e..4bcdde8a22 100644 --- a/examples/netflow/src/lib.rs +++ b/examples/netflow/src/lib.rs @@ -15,7 +15,7 @@ fn py_netflow_one_path_node(graph: DynamicGraph, no_time: bool, threads: Option< } #[pymodule] -fn raphtory_netflow(py: Python<'_>, m: &PyModule) -> PyResult<()> { +fn raphtory_netflow(py: Python<'_>, m: &Bound) -> PyResult<()> { let _ = add_raphtory_classes(m); let graphql_module = base_graphql_module(py)?; @@ -23,11 +23,11 @@ fn raphtory_netflow(py: Python<'_>, m: &PyModule) -> PyResult<()> { let graph_loader_module = base_graph_loader_module(py)?; let graph_gen_module = base_graph_gen_module(py)?; let vectors_module = base_vectors_module(py)?; - m.add_submodule(graphql_module)?; - m.add_submodule(algorithm_module)?; - m.add_submodule(graph_loader_module)?; - m.add_submodule(graph_gen_module)?; - m.add_submodule(vectors_module)?; + m.add_submodule(&graphql_module)?; + m.add_submodule(&algorithm_module)?; + m.add_submodule(&graph_loader_module)?; + m.add_submodule(&graph_gen_module)?; + m.add_submodule(&vectors_module)?; //new content algorithm_module.add_function(wrap_pyfunction!(py_netflow_one_path_node, m)?)?; @@ -36,7 +36,7 @@ fn raphtory_netflow(py: Python<'_>, m: &PyModule) -> PyResult<()> { } #[pymodule] -fn netflow_algorithm(_py: Python<'_>, m: &PyModule) -> PyResult<()> { +fn netflow_algorithm(_py: Python<'_>, m: &Bound) -> PyResult<()> { m.add_function(wrap_pyfunction!(py_netflow_one_path_node, m)?)?; Ok(()) } diff --git a/python/src/lib.rs b/python/src/lib.rs index 00456219e5..753e88987f 100644 --- a/python/src/lib.rs +++ b/python/src/lib.rs @@ -8,7 +8,7 @@ use raphtory_graphql::python::pymodule::base_graphql_module; /// Raphtory graph analytics library #[pymodule] -fn raphtory(py: Python<'_>, m: &PyModule) -> PyResult<()> { +fn raphtory(py: Python<'_>, m: &Bound) -> PyResult<()> { let _ = add_raphtory_classes(m); let graphql_module = base_graphql_module(py)?; @@ -16,11 +16,11 @@ fn raphtory(py: Python<'_>, m: &PyModule) -> PyResult<()> { let graph_loader_module = base_graph_loader_module(py)?; let graph_gen_module = base_graph_gen_module(py)?; let vectors_module = base_vectors_module(py)?; - m.add_submodule(graphql_module)?; - m.add_submodule(algorithm_module)?; - m.add_submodule(graph_loader_module)?; - m.add_submodule(graph_gen_module)?; - m.add_submodule(vectors_module)?; + m.add_submodule(&graphql_module)?; + m.add_submodule(&algorithm_module)?; + m.add_submodule(&graph_loader_module)?; + m.add_submodule(&graph_gen_module)?; + m.add_submodule(&vectors_module)?; Ok(()) } diff --git a/raphtory-api/src/python/arcstr.rs b/raphtory-api/src/python/arcstr.rs index 2ba99ff7ce..dce5facaaf 100644 --- a/raphtory-api/src/python/arcstr.rs +++ b/raphtory-api/src/python/arcstr.rs @@ -1,5 +1,5 @@ use crate::core::storage::arc_str::ArcStr; -use pyo3::{FromPyObject, IntoPy, PyAny, PyObject, PyResult, Python, ToPyObject}; +use pyo3::prelude::*; impl IntoPy for ArcStr { fn into_py(self, py: Python<'_>) -> PyObject { @@ -14,7 +14,7 @@ impl ToPyObject for ArcStr { } impl<'source> FromPyObject<'source> for ArcStr { - fn extract(ob: &'source PyAny) -> PyResult { + fn extract_bound(ob: &Bound<'source, PyAny>) -> PyResult { ob.extract::().map(|v| v.into()) } } diff --git a/raphtory-api/src/python/direction.rs b/raphtory-api/src/python/direction.rs index 388207a1c6..6f367a85c6 100644 --- a/raphtory-api/src/python/direction.rs +++ b/raphtory-api/src/python/direction.rs @@ -1,8 +1,8 @@ use crate::core::Direction; -use pyo3::{exceptions::PyTypeError, FromPyObject, PyAny, PyResult}; +use pyo3::{exceptions::PyTypeError, prelude::*}; impl<'source> FromPyObject<'source> for Direction { - fn extract(ob: &'source PyAny) -> PyResult { + fn extract_bound(ob: &Bound<'source, PyAny>) -> PyResult { let value: &str = ob.extract()?; match value { "out" => Ok(Direction::OUT), diff --git a/raphtory-api/src/python/gid.rs b/raphtory-api/src/python/gid.rs index f81a5421c9..8825c5677d 100644 --- a/raphtory-api/src/python/gid.rs +++ b/raphtory-api/src/python/gid.rs @@ -1,7 +1,5 @@ use crate::core::entities::GID; -use pyo3::{ - exceptions::PyTypeError, FromPyObject, IntoPy, PyAny, PyObject, PyResult, Python, ToPyObject, -}; +use pyo3::{exceptions::PyTypeError, prelude::*}; impl IntoPy for GID { fn into_py(self, py: Python<'_>) -> PyObject { @@ -22,7 +20,7 @@ impl ToPyObject for GID { } impl<'source> FromPyObject<'source> for GID { - fn extract(id: &'source PyAny) -> PyResult { + fn extract_bound(id: &Bound<'source, PyAny>) -> PyResult { id.extract::() .map(GID::Str) .or_else(|_| id.extract::().map(GID::U64)) diff --git a/raphtory-graphql/src/python/mod.rs b/raphtory-graphql/src/python/mod.rs index bd23189bc9..f70814ced1 100644 --- a/raphtory-graphql/src/python/mod.rs +++ b/raphtory-graphql/src/python/mod.rs @@ -2,9 +2,8 @@ use crate::url_encode::{url_encode_graph, UrlDecodeError}; use async_graphql::{dynamic::ValueAccessor, Value as GraphqlValue}; use pyo3::{ exceptions::{PyTypeError, PyValueError}, - pyfunction, + prelude::*, types::PyDict, - IntoPy, PyErr, PyObject, PyResult, Python, ToPyObject, }; use raphtory::{db::api::view::MaterializedGraph, python::utils::errors::adapt_err_value}; use serde_json::{Map, Number, Value as JsonValue}; @@ -51,7 +50,7 @@ pub(crate) fn translate_from_python(py: Python, value: PyObject) -> PyResult(py) { + } else if let Ok(value) = value.extract::>(py) { let mut map = Map::new(); for (key, value) in value.iter() { let key = key.extract::()?; @@ -97,7 +96,7 @@ fn translate_to_python(py: Python, value: serde_json::Value) -> PyResult { - let dict = PyDict::new(py); + let dict = PyDict::new_bound(py); for (key, value) in map { dict.set_item(key, translate_to_python(py, value)?)?; } diff --git a/raphtory-graphql/src/python/pymodule.rs b/raphtory-graphql/src/python/pymodule.rs index e7c2a574f5..9ebc8de50d 100644 --- a/raphtory-graphql/src/python/pymodule.rs +++ b/raphtory-graphql/src/python/pymodule.rs @@ -7,10 +7,10 @@ use crate::python::{ global_plugins::PyGlobalPlugins, server::{running_server::PyRunningGraphServer, server::PyGraphServer}, }; -use pyo3::{prelude::PyModule, wrap_pyfunction, PyErr, Python}; +use pyo3::prelude::*; -pub fn base_graphql_module(py: Python<'_>) -> Result<&PyModule, PyErr> { - let graphql_module = PyModule::new(py, "graphql")?; +pub fn base_graphql_module(py: Python<'_>) -> Result, PyErr> { + let graphql_module = PyModule::new_bound(py, "graphql")?; graphql_module.add_class::()?; graphql_module.add_class::()?; graphql_module.add_class::()?; @@ -22,7 +22,7 @@ pub fn base_graphql_module(py: Python<'_>) -> Result<&PyModule, PyErr> { graphql_module.add_class::()?; graphql_module.add_class::()?; - graphql_module.add_function(wrap_pyfunction!(encode_graph, graphql_module)?)?; + graphql_module.add_function(wrap_pyfunction!(encode_graph, &graphql_module)?)?; Ok(graphql_module) } diff --git a/raphtory-graphql/src/python/server/server.rs b/raphtory-graphql/src/python/server/server.rs index 1a1bc55850..29ce083814 100644 --- a/raphtory-graphql/src/python/server/server.rs +++ b/raphtory-graphql/src/python/server/server.rs @@ -18,15 +18,14 @@ use dynamic_graphql::internal::{Registry, TypeName}; use itertools::intersperse; use pyo3::{ exceptions::{PyAttributeError, PyException}, - pyclass, pymethods, + prelude::*, types::{IntoPyDict, PyFunction, PyList}, - IntoPy, Py, PyObject, PyRefMut, PyResult, Python, }; use raphtory::{ python::types::wrappers::document::PyDocument, vectors::{embeddings::openai_embedding, template::DocumentTemplate, EmbeddingFunction}, }; -use std::{collections::HashMap, path::PathBuf, thread}; +use std::{collections::HashMap, path::PathBuf, sync::Arc, thread}; /// A class for defining and running a Raphtory GraphQL server #[pyclass(name = "GraphServer")] @@ -81,11 +80,9 @@ impl PyGraphServer { slf: PyRefMut, name: String, input: HashMap, - function: &PyFunction, + function: Py, adapter: F, ) -> PyResult { - let function: Py = function.into(); - let input_mapper = HashMap::from([ ("str", TypeRef::named_nn(TypeRef::STRING)), ("int", TypeRef::named_nn(TypeRef::INT)), @@ -118,9 +115,11 @@ impl PyGraphServer { .iter() .map(|(name, value)| (name.as_str(), adapt_graphql_value(&value, py))) .collect(); - let py_kw_args = kw_args.into_py_dict(py); - let result = function.call(py, (entry_point,), Some(py_kw_args)).unwrap(); - let list = result.downcast::(py).unwrap(); + let py_kw_args = kw_args.into_py_dict_bound(py); + let result = function + .call_bound(py, (entry_point,), Some(&py_kw_args)) + .unwrap(); + let list = result.downcast_bound::(py).unwrap(); let py_documents = list.iter().map(|doc| doc.extract::().unwrap()); py_documents .map(|doc| doc.extract_rust_document(py).unwrap()) @@ -215,14 +214,14 @@ impl PyGraphServer { fn set_embeddings( slf: PyRefMut, cache: String, - embedding: Option<&PyFunction>, + embedding: Option>, graph_template: Option, node_template: Option, edge_template: Option, ) -> PyResult { match embedding { Some(embedding) => { - let embedding: Py = embedding.into(); + let embedding: Arc = Arc::new(embedding); Self::set_generic_embeddings( slf, cache, @@ -291,7 +290,7 @@ impl PyGraphServer { slf: PyRefMut, name: String, input: HashMap, - function: &PyFunction, + function: Py, ) -> PyResult { let adapter = |entry_point: &QueryPlugin, py: Python| { PyGlobalPlugins(entry_point.clone()).into_py(py) diff --git a/raphtory/Cargo.toml b/raphtory/Cargo.toml index 1887f1514f..727b0a6fa6 100644 --- a/raphtory/Cargo.toml +++ b/raphtory/Cargo.toml @@ -16,6 +16,7 @@ homepage.workspace = true [dependencies] raphtory-api = { path = "../raphtory-api", version = "0.13.1" } +hashbrown = { workspace = true } chrono = { workspace = true } itertools = { workspace = true } num-traits = { workspace = true } @@ -41,7 +42,7 @@ ouroboros = { workspace = true } either = { workspace = true } kdam = { workspace = true } bytemuck = { workspace = true } -tracing = {workspace = true} +tracing = { workspace = true } # io optional dependencies csv = { workspace = true, optional = true } diff --git a/raphtory/src/io/parquet_loaders.rs b/raphtory/src/io/parquet_loaders.rs index ec2153fddf..4141c22e93 100644 --- a/raphtory/src/io/parquet_loaders.rs +++ b/raphtory/src/io/parquet_loaders.rs @@ -26,6 +26,7 @@ use std::{ collections::HashMap, fs, fs::File, + ops::Deref, path::{Path, PathBuf}, }; diff --git a/raphtory/src/python/algorithm/epidemics.rs b/raphtory/src/python/algorithm/epidemics.rs index a61f68ce39..8eac86fdf9 100644 --- a/raphtory/src/python/algorithm/epidemics.rs +++ b/raphtory/src/python/algorithm/epidemics.rs @@ -7,7 +7,7 @@ use crate::{ py_algorithm_result, py_algorithm_result_new_ord_hash_eq, python::{ types::repr::{Repr, StructReprBuilder}, - utils::errors::adapt_err_value, + utils::{errors::adapt_err_value, PyNodeRef}, }, }; use pyo3::{ @@ -65,14 +65,14 @@ impl ToPyObject for Infected { } } -pub enum PySeed<'a> { - List(Vec>), +pub enum PySeed { + List(Vec), Number(usize), Probability(f64), } -impl<'source> FromPyObject<'source> for PySeed<'source> { - fn extract(ob: &'source PyAny) -> PyResult { +impl<'source> FromPyObject<'source> for PySeed { + fn extract_bound(ob: &Bound<'source, PyAny>) -> PyResult { let res = if ob.is_instance_of::() { Self::Number(ob.extract()?) } else if ob.is_instance_of::() { @@ -84,7 +84,7 @@ impl<'source> FromPyObject<'source> for PySeed<'source> { } } -impl<'a> IntoSeeds for PySeed<'a> { +impl IntoSeeds for PySeed { fn into_initial_list( self, graph: &G, diff --git a/raphtory/src/python/graph/algorithm_result.rs b/raphtory/src/python/graph/algorithm_result.rs index fc055d768b..6e3402ee38 100644 --- a/raphtory/src/python/graph/algorithm_result.rs +++ b/raphtory/src/python/graph/algorithm_result.rs @@ -78,10 +78,7 @@ macro_rules! py_algorithm_result_base { /// /// Arguments: /// key: The key of type `H` for which the value is to be retrieved. - fn get( - &self, - key: $crate::core::entities::nodes::node_ref::NodeRef, - ) -> Option<$rustValue> { + fn get(&self, key: $crate::python::utils::PyNodeRef) -> Option<$rustValue> { self.0.get(key).cloned() } @@ -136,11 +133,14 @@ macro_rules! py_algorithm_result_base { keys.push(node.into_py(py)); values.push(value.to_object(py)); } - let dict = pyo3::types::PyDict::new(py); - dict.set_item("Node", pyo3::types::PyList::new(py, keys.as_slice()))?; - dict.set_item("Value", pyo3::types::PyList::new(py, values.as_slice()))?; - let pandas = pyo3::types::PyModule::import(py, "pandas")?; - let df: &PyAny = pandas.getattr("DataFrame")?.call1((dict,))?; + let dict = pyo3::types::PyDict::new_bound(py); + dict.set_item("Node", pyo3::types::PyList::new_bound(py, keys.as_slice()))?; + dict.set_item( + "Value", + pyo3::types::PyList::new_bound(py, values.as_slice()), + )?; + let pandas = pyo3::types::PyModule::import_bound(py, "pandas")?; + let df = pandas.getattr("DataFrame")?.call1((dict,))?; Ok(df.to_object(py)) }) } diff --git a/raphtory/src/python/graph/edges.rs b/raphtory/src/python/graph/edges.rs index f7b0f41b9b..429ae9ceae 100644 --- a/raphtory/src/python/graph/edges.rs +++ b/raphtory/src/python/graph/edges.rs @@ -28,9 +28,7 @@ use crate::{ }, }, }; -use pyo3::{ - prelude::*, pyclass, pymethods, types::PyDict, IntoPy, PyObject, PyResult, Python, ToPyObject, -}; +use pyo3::{prelude::*, types::PyDict}; use raphtory_api::core::storage::arc_str::ArcStr; use rayon::{iter::IntoParallelIterator, prelude::*}; use std::collections::HashMap; @@ -338,10 +336,10 @@ impl PyEdges { .collect(); Python::with_gil(|py| { - let pandas = PyModule::import(py, "pandas")?; - let kwargs = PyDict::new(py); + let pandas = PyModule::import_bound(py, "pandas")?; + let kwargs = PyDict::new_bound(py); kwargs.set_item("columns", column_names)?; - let df = pandas.call_method("DataFrame", (edge_tuples,), Some(kwargs))?; + let df = pandas.call_method("DataFrame", (edge_tuples,), Some(&kwargs))?; Ok(df.to_object(py)) }) } diff --git a/raphtory/src/python/graph/graph.rs b/raphtory/src/python/graph/graph.rs index f93bedefd0..d953313d9c 100644 --- a/raphtory/src/python/graph/graph.rs +++ b/raphtory/src/python/graph/graph.rs @@ -17,11 +17,11 @@ use crate::{ edge::PyEdge, graph_with_deletions::PyPersistentGraph, io::pandas_loaders::*, node::PyNode, views::graph_view::PyGraphView, }, - utils::PyTime, + utils::{PyNodeRef, PyTime}, }, serialise::{StableDecode, StableEncode}, }; -use pyo3::prelude::*; +use pyo3::{prelude::*, pybacked::PyBackedStr}; use raphtory_api::core::{entities::GID, storage::arc_str::ArcStr}; use std::{ collections::HashMap, @@ -78,7 +78,7 @@ impl From for DynamicGraph { } impl<'source> FromPyObject<'source> for MaterializedGraph { - fn extract(graph: &'source PyAny) -> PyResult { + fn extract_bound(graph: &Bound<'source, PyAny>) -> PyResult { if let Ok(graph) = graph.extract::>() { Ok(graph.graph.clone().into()) } else if let Ok(graph) = graph.extract::>() { @@ -100,8 +100,9 @@ impl IntoPy for Graph { } impl<'source> FromPyObject<'source> for Graph { - fn extract(ob: &'source PyAny) -> PyResult { - let g: PyRef = ob.extract()?; + fn extract_bound(ob: &Bound<'source, PyAny>) -> PyResult { + let g = ob.downcast::()?.borrow(); + Ok(g.graph.clone()) } } @@ -329,7 +330,7 @@ impl PyGraph { /// /// Returns: /// Node: the node with the specified id, or None if the node does not exist - pub fn node(&self, id: NodeRef) -> Option> { + pub fn node(&self, id: PyNodeRef) -> Option> { self.graph.node(id) } @@ -343,7 +344,7 @@ impl PyGraph { /// Returns: /// Edge: the edge with the specified source and destination nodes, or None if the edge does not exist #[pyo3(signature = (src, dst))] - pub fn edge(&self, src: NodeRef, dst: NodeRef) -> Option> { + pub fn edge(&self, src: PyNodeRef, dst: PyNodeRef) -> Option> { self.graph.edge(src, dst) } @@ -394,17 +395,19 @@ impl PyGraph { #[pyo3( signature = (df,time, id, node_type = None, node_type_col = None, properties = None, constant_properties = None, shared_constant_properties = None) )] - fn load_nodes_from_pandas( + fn load_nodes_from_pandas<'py>( &self, - df: &PyAny, + df: &Bound<'py, PyAny>, time: &str, id: &str, node_type: Option<&str>, node_type_col: Option<&str>, - properties: Option>, - constant_properties: Option>, + properties: Option>, + constant_properties: Option>, shared_constant_properties: Option>, ) -> Result<(), GraphError> { + let properties = convert_py_prop_args(properties.as_deref()); + let constant_properties = convert_py_prop_args(constant_properties.as_deref()); load_nodes_from_pandas( &self.graph, df, @@ -412,8 +415,8 @@ impl PyGraph { id, node_type, node_type_col, - properties.as_ref().map(|props| props.as_ref()), - constant_properties.as_ref().map(|props| props.as_ref()), + properties.as_deref(), + constant_properties.as_deref(), shared_constant_properties.as_ref(), ) } @@ -439,10 +442,12 @@ impl PyGraph { id: &str, node_type: Option<&str>, node_type_col: Option<&str>, - properties: Option>, - constant_properties: Option>, + properties: Option>, + constant_properties: Option>, shared_constant_properties: Option>, ) -> Result<(), GraphError> { + let properties = convert_py_prop_args(properties.as_deref()); + let constant_properties = convert_py_prop_args(constant_properties.as_deref()); load_nodes_from_parquet( &self.graph, parquet_path.as_path(), @@ -450,8 +455,8 @@ impl PyGraph { id, node_type, node_type_col, - properties.as_ref().map(|props| props.as_ref()), - constant_properties.as_ref().map(|props| props.as_ref()), + properties.as_deref(), + constant_properties.as_deref(), shared_constant_properties.as_ref(), ) } @@ -473,24 +478,26 @@ impl PyGraph { )] fn load_edges_from_pandas( &self, - df: &PyAny, + df: &Bound, time: &str, src: &str, dst: &str, - properties: Option>, - constant_properties: Option>, + properties: Option>, + constant_properties: Option>, shared_constant_properties: Option>, layer: Option<&str>, layer_col: Option<&str>, ) -> Result<(), GraphError> { + let properties = convert_py_prop_args(properties.as_deref()); + let constant_properties = convert_py_prop_args(constant_properties.as_deref()); load_edges_from_pandas( &self.graph, df, time, src, dst, - properties.as_ref().map(|props| props.as_ref()), - constant_properties.as_ref().map(|props| props.as_ref()), + properties.as_deref(), + constant_properties.as_deref(), shared_constant_properties.as_ref(), layer, layer_col, @@ -518,20 +525,22 @@ impl PyGraph { time: &str, src: &str, dst: &str, - properties: Option>, - constant_properties: Option>, + properties: Option>, + constant_properties: Option>, shared_constant_properties: Option>, layer: Option<&str>, layer_col: Option<&str>, ) -> Result<(), GraphError> { + let properties = convert_py_prop_args(properties.as_deref()); + let constant_properties = convert_py_prop_args(constant_properties.as_deref()); load_edges_from_parquet( &self.graph, parquet_path.as_path(), time, src, dst, - properties.as_ref().map(|props| props.as_ref()), - constant_properties.as_ref().map(|props| props.as_ref()), + properties.as_deref(), + constant_properties.as_deref(), shared_constant_properties.as_ref(), layer, layer_col, @@ -550,20 +559,21 @@ impl PyGraph { #[pyo3(signature = (df, id, node_type=None, node_type_col=None, constant_properties = None, shared_constant_properties = None))] fn load_node_props_from_pandas( &self, - df: &PyAny, + df: &Bound, id: &str, node_type: Option<&str>, node_type_col: Option<&str>, - constant_properties: Option>, + constant_properties: Option>, shared_constant_properties: Option>, ) -> Result<(), GraphError> { + let constant_properties = convert_py_prop_args(constant_properties.as_deref()); load_node_props_from_pandas( &self.graph, df, id, node_type, node_type_col, - constant_properties.as_ref().map(|props| props.as_ref()), + constant_properties.as_deref(), shared_constant_properties.as_ref(), ) } @@ -584,16 +594,17 @@ impl PyGraph { id: &str, node_type: Option<&str>, node_type_col: Option<&str>, - constant_properties: Option>, + constant_properties: Option>, shared_constant_properties: Option>, ) -> Result<(), GraphError> { + let constant_properties = convert_py_prop_args(constant_properties.as_deref()); load_node_props_from_parquet( &self.graph, parquet_path.as_path(), id, node_type, node_type_col, - constant_properties.as_ref().map(|props| props.as_ref()), + constant_properties.as_deref(), shared_constant_properties.as_ref(), ) } @@ -613,20 +624,21 @@ impl PyGraph { )] fn load_edge_props_from_pandas( &self, - df: &PyAny, + df: &Bound, src: &str, dst: &str, - constant_properties: Option>, + constant_properties: Option>, shared_constant_properties: Option>, layer: Option<&str>, layer_col: Option<&str>, ) -> Result<(), GraphError> { + let constant_properties = convert_py_prop_args(constant_properties.as_deref()); load_edge_props_from_pandas( &self.graph, df, src, dst, - constant_properties.as_ref().map(|props| props.as_ref()), + constant_properties.as_deref(), shared_constant_properties.as_ref(), layer, layer_col, @@ -651,17 +663,18 @@ impl PyGraph { parquet_path: PathBuf, src: &str, dst: &str, - constant_properties: Option>, + constant_properties: Option>, shared_constant_properties: Option>, layer: Option<&str>, layer_col: Option<&str>, ) -> Result<(), GraphError> { + let constant_properties = convert_py_prop_args(constant_properties.as_deref()); load_edge_props_from_parquet( &self.graph, parquet_path.as_path(), src, dst, - constant_properties.as_ref().map(|props| props.as_ref()), + constant_properties.as_deref(), shared_constant_properties.as_ref(), layer, layer_col, diff --git a/raphtory/src/python/graph/graph_with_deletions.rs b/raphtory/src/python/graph/graph_with_deletions.rs index 5867571aea..98f5d2d462 100644 --- a/raphtory/src/python/graph/graph_with_deletions.rs +++ b/raphtory/src/python/graph/graph_with_deletions.rs @@ -5,6 +5,10 @@ //! create windows, and query the graph with a variety of algorithms. //! It is a wrapper around a set of shards, which are the actual graph data structures. //! In Python, this class wraps around the rust graph. +use super::{ + graph::{PyGraph, PyGraphEncoder}, + io::pandas_loaders::*, +}; use crate::{ core::{entities::nodes::node_ref::NodeRef, utils::errors::GraphError, Prop}, db::{ @@ -14,13 +18,15 @@ use crate::{ }, graph::{edge::EdgeView, node::NodeView, views::deletion_graph::PersistentGraph}, }, + io::parquet_loaders::*, prelude::{DeletionOps, GraphViewOps, ImportOps}, python::{ graph::{edge::PyEdge, node::PyNode, views::graph_view::PyGraphView}, - utils::PyTime, + utils::{PyNodeRef, PyTime}, }, + serialise::StableEncode, }; -use pyo3::prelude::*; +use pyo3::{prelude::*, pybacked::PyBackedStr}; use raphtory_api::core::{entities::GID, storage::arc_str::ArcStr}; use std::{ collections::HashMap, @@ -28,15 +34,9 @@ use std::{ path::PathBuf, }; -use super::{ - graph::{PyGraph, PyGraphEncoder}, - io::pandas_loaders::*, -}; -use crate::{io::parquet_loaders::*, serialise::StableEncode}; - /// A temporal graph that allows edges and nodes to be deleted. #[derive(Clone)] -#[pyclass(name = "PersistentGraph", extends = PyGraphView)] +#[pyclass(name = "PersistentGraph", extends = PyGraphView, frozen)] pub struct PyPersistentGraph { pub(crate) graph: PersistentGraph, } @@ -70,8 +70,8 @@ impl IntoPy for PersistentGraph { } impl<'source> FromPyObject<'source> for PersistentGraph { - fn extract(ob: &'source PyAny) -> PyResult { - let g: PyRef = ob.extract()?; + fn extract_bound(ob: &Bound<'source, PyAny>) -> PyResult { + let g = ob.downcast::()?.get(); Ok(g.graph.clone()) } } @@ -227,7 +227,7 @@ impl PyPersistentGraph { /// /// Returns: /// the node with the specified id, or None if the node does not exist - pub fn node(&self, id: NodeRef) -> Option> { + pub fn node(&self, id: PyNodeRef) -> Option> { self.graph.node(id) } @@ -243,8 +243,8 @@ impl PyPersistentGraph { #[pyo3(signature = (src, dst))] pub fn edge( &self, - src: NodeRef, - dst: NodeRef, + src: PyNodeRef, + dst: PyNodeRef, ) -> Option> { self.graph.edge(src, dst) } @@ -362,15 +362,17 @@ impl PyPersistentGraph { #[pyo3(signature = (df,time,id, node_type = None, node_type_col = None, properties = None, constant_properties = None, shared_constant_properties = None))] fn load_nodes_from_pandas( &self, - df: &PyAny, + df: &Bound, time: &str, id: &str, node_type: Option<&str>, node_type_col: Option<&str>, - properties: Option>, - constant_properties: Option>, + properties: Option>, + constant_properties: Option>, shared_constant_properties: Option>, ) -> Result<(), GraphError> { + let properties = convert_py_prop_args(properties.as_deref()); + let constant_properties = convert_py_prop_args(constant_properties.as_deref()); load_nodes_from_pandas( &self.graph, df, @@ -378,8 +380,8 @@ impl PyPersistentGraph { id, node_type, node_type_col, - properties.as_ref().map(|props| props.as_ref()), - constant_properties.as_ref().map(|props| props.as_ref()), + properties.as_deref(), + constant_properties.as_deref(), shared_constant_properties.as_ref(), ) } @@ -408,10 +410,12 @@ impl PyPersistentGraph { id: &str, node_type: Option<&str>, node_type_col: Option<&str>, - properties: Option>, - constant_properties: Option>, + properties: Option>, + constant_properties: Option>, shared_constant_properties: Option>, ) -> Result<(), GraphError> { + let properties = convert_py_prop_args(properties.as_deref()); + let constant_properties = convert_py_prop_args(constant_properties.as_deref()); load_nodes_from_parquet( &self.graph, parquet_path.as_path(), @@ -419,8 +423,8 @@ impl PyPersistentGraph { id, node_type, node_type_col, - properties.as_ref().map(|props| props.as_ref()), - constant_properties.as_ref().map(|props| props.as_ref()), + properties.as_deref(), + constant_properties.as_deref(), shared_constant_properties.as_ref(), ) } @@ -445,24 +449,26 @@ impl PyPersistentGraph { #[pyo3(signature = (df, time, src, dst, properties = None, constant_properties = None, shared_constant_properties = None, layer = None, layer_col = None))] fn load_edges_from_pandas( &self, - df: &PyAny, + df: &Bound, time: &str, src: &str, dst: &str, - properties: Option>, - constant_properties: Option>, + properties: Option>, + constant_properties: Option>, shared_constant_properties: Option>, layer: Option<&str>, layer_col: Option<&str>, ) -> Result<(), GraphError> { + let properties = convert_py_prop_args(properties.as_deref()); + let constant_properties = convert_py_prop_args(constant_properties.as_deref()); load_edges_from_pandas( &self.graph, df, time, src, dst, - properties.as_ref().map(|props| props.as_ref()), - constant_properties.as_ref().map(|props| props.as_ref()), + properties.as_deref(), + constant_properties.as_deref(), shared_constant_properties.as_ref(), layer, layer_col, @@ -493,20 +499,22 @@ impl PyPersistentGraph { time: &str, src: &str, dst: &str, - properties: Option>, - constant_properties: Option>, + properties: Option>, + constant_properties: Option>, shared_constant_properties: Option>, layer: Option<&str>, layer_col: Option<&str>, ) -> Result<(), GraphError> { + let properties = convert_py_prop_args(properties.as_deref()); + let constant_properties = convert_py_prop_args(constant_properties.as_deref()); load_edges_from_parquet( &self.graph, parquet_path.as_path(), time, src, dst, - properties.as_ref().map(|props| props.as_ref()), - constant_properties.as_ref().map(|props| props.as_ref()), + properties.as_deref(), + constant_properties.as_deref(), shared_constant_properties.as_ref(), layer, layer_col, @@ -530,7 +538,7 @@ impl PyPersistentGraph { #[pyo3(signature = (df, time, src, dst, layer = None, layer_col = None))] fn load_edge_deletions_from_pandas( &self, - df: &PyAny, + df: &Bound, time: &str, src: &str, dst: &str, @@ -593,20 +601,21 @@ impl PyPersistentGraph { #[pyo3(signature = (df, id, node_type=None, node_type_col=None, constant_properties = None, shared_constant_properties = None))] fn load_node_props_from_pandas( &self, - df: &PyAny, + df: &Bound, id: &str, node_type: Option<&str>, node_type_col: Option<&str>, - constant_properties: Option>, + constant_properties: Option>, shared_constant_properties: Option>, ) -> Result<(), GraphError> { + let constant_properties = convert_py_prop_args(constant_properties.as_deref()); load_node_props_from_pandas( &self.graph, df, id, node_type, node_type_col, - constant_properties.as_ref().map(|props| props.as_ref()), + constant_properties.as_deref(), shared_constant_properties.as_ref(), ) } @@ -633,16 +642,17 @@ impl PyPersistentGraph { id: &str, node_type: Option<&str>, node_type_col: Option<&str>, - constant_properties: Option>, + constant_properties: Option>, shared_constant_properties: Option>, ) -> Result<(), GraphError> { + let constant_properties = convert_py_prop_args(constant_properties.as_deref()); load_node_props_from_parquet( &self.graph, parquet_path.as_path(), id, node_type, node_type_col, - constant_properties.as_ref().map(|props| props.as_ref()), + constant_properties.as_deref(), shared_constant_properties.as_ref(), ) } @@ -666,20 +676,21 @@ impl PyPersistentGraph { #[pyo3(signature = (df, src, dst, constant_properties = None, shared_constant_properties = None, layer = None, layer_col = None))] fn load_edge_props_from_pandas( &self, - df: &PyAny, + df: &Bound, src: &str, dst: &str, - constant_properties: Option>, + constant_properties: Option>, shared_constant_properties: Option>, layer: Option<&str>, layer_col: Option<&str>, ) -> Result<(), GraphError> { + let constant_properties = convert_py_prop_args(constant_properties.as_deref()); load_edge_props_from_pandas( &self.graph, df, src, dst, - constant_properties.as_ref().map(|props| props.as_ref()), + constant_properties.as_deref(), shared_constant_properties.as_ref(), layer, layer_col, @@ -708,17 +719,18 @@ impl PyPersistentGraph { parquet_path: PathBuf, src: &str, dst: &str, - constant_properties: Option>, + constant_properties: Option>, shared_constant_properties: Option>, layer: Option<&str>, layer_col: Option<&str>, ) -> Result<(), GraphError> { + let constant_properties = convert_py_prop_args(constant_properties.as_deref()); load_edge_props_from_parquet( &self.graph, parquet_path.as_path(), src, dst, - constant_properties.as_ref().map(|props| props.as_ref()), + constant_properties.as_deref(), shared_constant_properties.as_ref(), layer, layer_col, diff --git a/raphtory/src/python/graph/io/pandas_loaders.rs b/raphtory/src/python/graph/io/pandas_loaders.rs index 55327a4250..c49b7db509 100644 --- a/raphtory/src/python/graph/io/pandas_loaders.rs +++ b/raphtory/src/python/graph/io/pandas_loaders.rs @@ -12,16 +12,22 @@ use polars_arrow::{array::Array, ffi}; use pyo3::{ ffi::Py_uintptr_t, prelude::*, + pybacked::PyBackedStr, types::{IntoPyDict, PyDict}, }; -use std::collections::HashMap; +use std::{collections::HashMap, ops::Deref}; use tracing::error; -pub fn load_nodes_from_pandas< +pub(crate) fn convert_py_prop_args(properties: Option<&[PyBackedStr]>) -> Option> { + properties.map(|p| p.iter().map(|p| p.deref()).collect()) +} + +pub(crate) fn load_nodes_from_pandas< + 'py, G: StaticGraphViewOps + InternalPropertyAdditionOps + InternalAdditionOps, >( graph: &G, - df: &PyAny, + df: &Bound<'py, PyAny>, time: &str, id: &str, node_type: Option<&str>, @@ -30,35 +36,34 @@ pub fn load_nodes_from_pandas< constant_properties: Option<&[&str]>, shared_constant_properties: Option<&HashMap>, ) -> Result<(), GraphError> { - Python::with_gil(|py| { - let mut cols_to_check = vec![id, time]; - cols_to_check.extend(properties.unwrap_or(&Vec::new())); - cols_to_check.extend(constant_properties.unwrap_or(&Vec::new())); - if let Some(ref node_type_col) = node_type_col { - cols_to_check.push(node_type_col.as_ref()); - } + let mut cols_to_check = vec![id, time]; + cols_to_check.extend(properties.iter().flat_map(|v| v.iter())); + cols_to_check.extend(constant_properties.iter().flat_map(|v| v.iter())); + if let Some(ref node_type_col) = node_type_col { + cols_to_check.push(node_type_col.as_ref()); + } - let df_view = process_pandas_py_df(df, py, cols_to_check.clone())?; - df_view.check_cols_exist(&cols_to_check)?; - load_nodes_from_df( - df_view, - time, - id, - properties, - constant_properties, - shared_constant_properties, - node_type, - node_type_col, - graph, - ) - }) + let df_view = process_pandas_py_df(df, cols_to_check.clone())?; + df_view.check_cols_exist(&cols_to_check)?; + load_nodes_from_df( + df_view, + time, + id, + properties.as_deref(), + constant_properties.as_deref(), + shared_constant_properties, + node_type, + node_type_col, + graph, + ) } pub(crate) fn load_edges_from_pandas< + 'py, G: StaticGraphViewOps + InternalPropertyAdditionOps + InternalAdditionOps + InternalCache, >( graph: &G, - df: &PyAny, + df: &Bound<'py, PyAny>, time: &str, src: &str, dst: &str, @@ -68,67 +73,65 @@ pub(crate) fn load_edges_from_pandas< layer: Option<&str>, layer_col: Option<&str>, ) -> Result<(), GraphError> { - Python::with_gil(|py| { - let mut cols_to_check = vec![src, dst, time]; - cols_to_check.extend(properties.unwrap_or(&Vec::new())); - cols_to_check.extend(constant_properties.unwrap_or(&Vec::new())); - if let Some(ref layer_col) = layer_col { - cols_to_check.push(layer_col.as_ref()); - } + let mut cols_to_check = vec![src, dst, time]; + cols_to_check.extend(properties.unwrap_or(&Vec::new())); + cols_to_check.extend(constant_properties.unwrap_or(&Vec::new())); + if let Some(ref layer_col) = layer_col { + cols_to_check.push(layer_col.as_ref()); + } - let df_view = process_pandas_py_df(df, py, cols_to_check.clone())?; - df_view.check_cols_exist(&cols_to_check)?; - load_edges_from_df( - df_view, - time, - src, - dst, - properties, - constant_properties, - shared_constant_properties, - layer, - layer_col, - graph, - ) - }) + let df_view = process_pandas_py_df(df, cols_to_check.clone())?; + df_view.check_cols_exist(&cols_to_check)?; + load_edges_from_df( + df_view, + time, + src, + dst, + properties, + constant_properties, + shared_constant_properties, + layer, + layer_col, + graph, + ) } pub(crate) fn load_node_props_from_pandas< + 'py, G: StaticGraphViewOps + InternalPropertyAdditionOps + InternalAdditionOps, >( graph: &G, - df: &PyAny, + df: &Bound<'py, PyAny>, id: &str, node_type: Option<&str>, node_type_col: Option<&str>, constant_properties: Option<&[&str]>, shared_constant_properties: Option<&HashMap>, ) -> Result<(), GraphError> { - Python::with_gil(|py| { - let mut cols_to_check = vec![id]; - cols_to_check.extend(constant_properties.unwrap_or(&Vec::new())); - if let Some(ref node_type_col) = node_type_col { - cols_to_check.push(node_type_col.as_ref()); - } - let df_view = process_pandas_py_df(df, py, cols_to_check.clone())?; - df_view.check_cols_exist(&cols_to_check)?; - load_node_props_from_df( - df_view, - id, - node_type, - node_type_col, - constant_properties, - shared_constant_properties, - graph, - ) - }) + let mut cols_to_check = vec![id]; + cols_to_check.extend(constant_properties.unwrap_or(&Vec::new())); + if let Some(ref node_type_col) = node_type_col { + cols_to_check.push(node_type_col.as_ref()); + } + let df_view = process_pandas_py_df(df, cols_to_check.clone())?; + df_view.check_cols_exist(&cols_to_check)?; + load_node_props_from_df( + df_view, + id, + node_type, + node_type_col, + constant_properties, + shared_constant_properties, + graph, + ) } pub(crate) fn load_edge_props_from_pandas< + 'py, G: StaticGraphViewOps + InternalPropertyAdditionOps + InternalAdditionOps, >( graph: &G, - df: &PyAny, + df: &Bound<'py, PyAny>, src: &str, dst: &str, constant_properties: Option<&[&str]>, @@ -136,66 +139,63 @@ pub(crate) fn load_edge_props_from_pandas< layer: Option<&str>, layer_col: Option<&str>, ) -> Result<(), GraphError> { - Python::with_gil(|py| { - let mut cols_to_check = vec![src, dst]; - if let Some(ref layer_col) = layer_col { - cols_to_check.push(layer_col.as_ref()); - } - cols_to_check.extend(constant_properties.unwrap_or(&Vec::new())); - let df_view = process_pandas_py_df(df, py, cols_to_check.clone())?; - df_view.check_cols_exist(&cols_to_check)?; - load_edges_props_from_df( - df_view, - src, - dst, - constant_properties, - shared_constant_properties, - layer, - layer_col, - graph, - ) - }) + let mut cols_to_check = vec![src, dst]; + if let Some(ref layer_col) = layer_col { + cols_to_check.push(layer_col.as_ref()); + } + cols_to_check.extend(constant_properties.unwrap_or(&Vec::new())); + let df_view = process_pandas_py_df(df, cols_to_check.clone())?; + df_view.check_cols_exist(&cols_to_check)?; + load_edges_props_from_df( + df_view, + src, + dst, + constant_properties, + shared_constant_properties, + layer, + layer_col, + graph, + ) } pub fn load_edge_deletions_from_pandas< + 'py, G: StaticGraphViewOps + InternalPropertyAdditionOps + InternalAdditionOps, >( graph: &G, - df: &PyAny, + df: &Bound<'py, PyAny>, time: &str, src: &str, dst: &str, layer: Option<&str>, layer_col: Option<&str>, ) -> Result<(), GraphError> { - Python::with_gil(|py| { - let mut cols_to_check = vec![src, dst, time]; - if let Some(ref layer_col) = layer_col { - cols_to_check.push(layer_col.as_ref()); - } + let mut cols_to_check = vec![src, dst, time]; + if let Some(ref layer_col) = layer_col { + cols_to_check.push(layer_col.as_ref()); + } - let df_view = process_pandas_py_df(df, py, cols_to_check.clone())?; - df_view.check_cols_exist(&cols_to_check)?; - load_edge_deletions_from_df( - df_view, - time, - src, - dst, - layer, - layer_col, - graph.core_graph(), - ) - }) + let df_view = process_pandas_py_df(df, cols_to_check.clone())?; + df_view.check_cols_exist(&cols_to_check)?; + load_edge_deletions_from_df( + df_view, + time, + src, + dst, + layer, + layer_col, + graph.core_graph(), + ) } pub(crate) fn process_pandas_py_df<'a>( - df: &'a PyAny, - py: Python<'a>, + df: &Bound<'a, PyAny>, col_names: Vec<&str>, ) -> PyResult> + 'a>> { + let py = df.py(); is_jupyter(py); - py.import("pandas")?; - let module = py.import("pyarrow")?; + py.import_bound("pandas")?; + let module = py.import_bound("pyarrow")?; let pa_table = module.getattr("Table")?; let df_columns: Vec = df.getattr("columns")?.extract()?; @@ -207,19 +207,20 @@ pub(crate) fn process_pandas_py_df<'a>( let dropped_df = if !cols_to_drop.is_empty() { let drop_method = df.getattr("drop")?; - drop_method.call((cols_to_drop,), Some(vec![("axis", 1)].into_py_dict(py)))? + &drop_method.call( + (cols_to_drop,), + Some(&vec![("axis", 1)].into_py_dict_bound(py)), + )? } else { df }; - let _df_columns: Vec = dropped_df.getattr("columns")?.extract()?; - - let table = pa_table.call_method("from_pandas", (dropped_df,), None)?; - let kwargs = PyDict::new(py); + let table = pa_table.call_method("from_pandas", (dropped_df.clone(),), None)?; + let kwargs = PyDict::new_bound(py); kwargs.set_item("max_chunksize", 1000000)?; let rb = table - .call_method("to_batches", (), Some(kwargs))? - .extract::>()?; + .call_method("to_batches", (), Some(&kwargs))? + .extract::>>()?; let names: Vec = if let Some(batch0) = rb.get(0) { let schema = batch0.getattr("schema")?; schema.getattr("names")?.extract::>()? @@ -237,20 +238,14 @@ pub(crate) fn process_pandas_py_df<'a>( let array = rb .call_method1("column", (i,)) .map_err(|e| GraphError::from(e))?; - let arr = array_to_rust(array).map_err(|e| GraphError::from(e))?; + let arr = array_to_rust(&array).map_err(|e| GraphError::from(e))?; Ok::, GraphError>(arr) }) .collect::, GraphError>>()?; Ok(DFChunk { chunk }) }); - let num_rows: usize = py - .eval( - "index.__len__()", - Some([("index", df.getattr("index")?)].into_py_dict(py)), - None, - )? - .extract()?; + let num_rows: usize = dropped_df.call_method0("__len__")?.extract()?; Ok(DFView { names, @@ -259,7 +254,7 @@ pub(crate) fn process_pandas_py_df<'a>( }) } -pub fn array_to_rust(obj: &PyAny) -> PyResult { +pub fn array_to_rust(obj: &Bound) -> PyResult { // prepare a pointer to receive the Array struct let array = Box::new(ffi::ArrowArray::empty()); let schema = Box::new(ffi::ArrowSchema::empty()); @@ -299,12 +294,12 @@ except NameError: result = False # Probably standard Python interpreter "#; - if let Err(e) = py.run(code, None, None) { + if let Err(e) = py.run_bound(code, None, None) { error!("Error checking if running in a jupyter notebook: {}", e); return; } - match py.eval("result", None, None) { + match py.eval_bound("result", None, None) { Ok(x) => { if let Ok(x) = x.extract() { kdam::set_notebook(x); diff --git a/raphtory/src/python/graph/node.rs b/raphtory/src/python/graph/node.rs index 4c3a151109..33eb639552 100644 --- a/raphtory/src/python/graph/node.rs +++ b/raphtory/src/python/graph/node.rs @@ -33,7 +33,7 @@ use crate::{ repr::StructReprBuilder, wrappers::{iterables::*, prop::PyPropertyFilter}, }, - utils::PyTime, + utils::{PyNodeRef, PyTime}, }, *, }; @@ -42,6 +42,7 @@ use numpy::{IntoPyArray, Ix1, PyArray}; use pyo3::{ exceptions::{PyIndexError, PyKeyError}, prelude::*, + pybacked::PyBackedStr, pyclass, pyclass::CompareOp, pymethods, @@ -600,7 +601,7 @@ impl PyNodes { self.nodes.out_degree() } - pub fn __getitem__(&self, node: NodeRef) -> PyResult> { + pub fn __getitem__(&self, node: PyNodeRef) -> PyResult> { self.nodes .get(node) .ok_or_else(|| PyIndexError::new_err("Node does not exist")) @@ -670,15 +671,15 @@ impl PyNodes { .collect(); Python::with_gil(|py| { - let kwargs = PyDict::new(py); + let kwargs = PyDict::new_bound(py); kwargs.set_item("columns", column_names.clone())?; - let pandas = PyModule::import(py, "pandas")?; - let df_data = pandas.call_method("DataFrame", (node_tuples,), Some(kwargs))?; + let pandas = PyModule::import_bound(py, "pandas")?; + let df_data = pandas.call_method("DataFrame", (node_tuples,), Some(&kwargs))?; Ok(df_data.to_object(py)) }) } - pub fn type_filter(&self, node_types: Vec<&str>) -> Nodes<'static, DynamicGraph> { + pub fn type_filter(&self, node_types: Vec) -> Nodes<'static, DynamicGraph> { self.nodes.type_filter(&node_types) } } @@ -794,7 +795,7 @@ impl PyPathFromGraph { pub fn type_filter( &self, - node_types: Vec<&str>, + node_types: Vec, ) -> PathFromGraph<'static, DynamicGraph, DynamicGraph> { self.path.type_filter(&node_types) } @@ -932,7 +933,7 @@ impl PyPathFromNode { pub fn type_filter( &self, - node_types: Vec<&str>, + node_types: Vec, ) -> PathFromNode<'static, DynamicGraph, DynamicGraph> { self.path.type_filter(&node_types) } diff --git a/raphtory/src/python/graph/properties/props.rs b/raphtory/src/python/graph/properties/props.rs index 82c7d914e5..4082bc625b 100644 --- a/raphtory/src/python/graph/properties/props.rs +++ b/raphtory/src/python/graph/properties/props.rs @@ -38,7 +38,7 @@ impl PartialEq for PyPropsComp { } impl<'source> FromPyObject<'source> for PyPropsComp { - fn extract(ob: &'source PyAny) -> PyResult { + fn extract_bound(ob: &Bound<'source, PyAny>) -> PyResult { if let Ok(sp) = ob.extract::>() { Ok(sp.deref().into()) } else if let Ok(p) = ob.extract::>() { @@ -200,7 +200,7 @@ impl Repr for PyProperties { pub struct PyPropsListCmp(HashMap); impl<'source> FromPyObject<'source> for PyPropsListCmp { - fn extract(ob: &'source PyAny) -> PyResult { + fn extract_bound(ob: &Bound<'source, PyAny>) -> PyResult { if let Ok(sp) = ob.extract::>() { Ok(sp.deref().into()) } else if let Ok(p) = ob.extract::>() { @@ -348,7 +348,7 @@ py_eq!(PyNestedPropsIterable, PyConstPropsListListCmp); pub struct PyConstPropsListListCmp(HashMap); impl<'source> FromPyObject<'source> for PyConstPropsListListCmp { - fn extract(ob: &'source PyAny) -> PyResult { + fn extract_bound(ob: &Bound<'source, PyAny>) -> PyResult { if let Ok(sp) = ob.extract::>() { Ok(sp.deref().into()) } else if let Ok(p) = ob.extract::>() { diff --git a/raphtory/src/python/graph/properties/temporal_props.rs b/raphtory/src/python/graph/properties/temporal_props.rs index 276d116f4a..67bd03a912 100644 --- a/raphtory/src/python/graph/properties/temporal_props.rs +++ b/raphtory/src/python/graph/properties/temporal_props.rs @@ -63,7 +63,7 @@ impl From<&PyTemporalProperties> for PyTemporalPropsCmp { } impl<'source> FromPyObject<'source> for PyTemporalPropsCmp { - fn extract(ob: &'source PyAny) -> PyResult { + fn extract_bound(ob: &Bound<'source, PyAny>) -> PyResult { if let Ok(v) = ob.extract::>() { Ok(PyTemporalPropsCmp::from(v.deref())) } else if let Ok(v) = ob.extract::>() { @@ -189,7 +189,7 @@ pub struct PyTemporalProp { pub struct PyTemporalPropCmp(Vec<(i64, Prop)>); impl<'source> FromPyObject<'source> for PyTemporalPropCmp { - fn extract(ob: &'source PyAny) -> PyResult { + fn extract_bound(ob: &Bound<'source, PyAny>) -> PyResult { if let Ok(sp) = ob.extract::>() { Ok(sp.deref().into()) } else if let Ok(m) = ob.extract::>() { @@ -454,7 +454,7 @@ impl From> for PyTemporalPropsListCmp { } impl<'source> FromPyObject<'source> for PyTemporalPropsListCmp { - fn extract(ob: &'source PyAny) -> PyResult { + fn extract_bound(ob: &Bound<'source, PyAny>) -> PyResult { if let Ok(v) = ob.extract::>() { Ok(PyTemporalPropsListCmp::from(v.deref())) } else if let Ok(v) = ob.extract::>() { @@ -650,7 +650,7 @@ impl From> for PyTemporalPropsListLis } impl<'source> FromPyObject<'source> for PyTemporalPropsListListCmp { - fn extract(ob: &'source PyAny) -> PyResult { + fn extract_bound(ob: &Bound<'source, PyAny>) -> PyResult { if let Ok(v) = ob.extract::>() { Ok(Self::from(v.deref())) } else if let Ok(v) = ob.extract::>() { diff --git a/raphtory/src/python/graph/views/graph_view.rs b/raphtory/src/python/graph/views/graph_view.rs index 008b3e993a..cc626b9e91 100644 --- a/raphtory/src/python/graph/views/graph_view.rs +++ b/raphtory/src/python/graph/views/graph_view.rs @@ -38,7 +38,7 @@ use crate::{ repr::{Repr, StructReprBuilder}, wrappers::prop::PyPropertyFilter, }, - utils::PyTime, + utils::{PyNodeRef, PyTime}, }, }; use chrono::prelude::*; @@ -61,7 +61,7 @@ impl IntoPy for DynamicGraph { } impl<'source> FromPyObject<'source> for DynamicGraph { - fn extract(ob: &'source PyAny) -> PyResult { + fn extract_bound(ob: &Bound<'source, PyAny>) -> PyResult { ob.extract::>().map(|g| g.graph.clone()) } } @@ -203,7 +203,7 @@ impl PyGraphView { /// /// Returns: /// true if the graph contains the specified node, false otherwise - pub fn has_node(&self, id: NodeRef) -> bool { + pub fn has_node(&self, id: PyNodeRef) -> bool { self.graph.has_node(id) } @@ -216,7 +216,7 @@ impl PyGraphView { /// Returns: /// true if the graph contains the specified edge, false otherwise #[pyo3(signature = (src, dst))] - pub fn has_edge(&self, src: NodeRef, dst: NodeRef) -> bool { + pub fn has_edge(&self, src: PyNodeRef, dst: PyNodeRef) -> bool { self.graph.has_edge(src, dst) } @@ -229,7 +229,7 @@ impl PyGraphView { /// /// Returns: /// the node with the specified id, or None if the node does not exist - pub fn node(&self, id: NodeRef) -> Option> { + pub fn node(&self, id: PyNodeRef) -> Option> { self.graph.node(id) } @@ -276,7 +276,11 @@ impl PyGraphView { /// Returns: /// the edge with the specified source and destination nodes, or None if the edge does not exist #[pyo3(signature = (src, dst))] - pub fn edge(&self, src: NodeRef, dst: NodeRef) -> Option> { + pub fn edge( + &self, + src: PyNodeRef, + dst: PyNodeRef, + ) -> Option> { self.graph.edge(src, dst) } @@ -331,7 +335,7 @@ impl PyGraphView { /// /// Returns: /// GraphView - Returns the subgraph - fn subgraph(&self, nodes: Vec) -> NodeSubgraph { + fn subgraph(&self, nodes: Vec) -> NodeSubgraph { self.graph.subgraph(nodes) } @@ -353,7 +357,7 @@ impl PyGraphView { /// /// Returns: /// GraphView - Returns the subgraph - fn exclude_nodes(&self, nodes: Vec) -> NodeSubgraph { + fn exclude_nodes(&self, nodes: Vec) -> NodeSubgraph { self.graph.exclude_nodes(nodes) } diff --git a/raphtory/src/python/graph/views/graph_view_modules/export.rs b/raphtory/src/python/graph/views/graph_view_modules/export.rs index e1d66542e8..81515bda9b 100644 --- a/raphtory/src/python/graph/views/graph_view_modules/export.rs +++ b/raphtory/src/python/graph/views/graph_view_modules/export.rs @@ -5,9 +5,7 @@ use crate::{ }; use pyo3::{ prelude::*, - pymethods, types::{PyDict, PyList, PyTuple}, - IntoPy, PyObject, PyResult, Python, ToPyObject, }; use raphtory_api::core::storage::arc_str::ArcStr; use std::collections::HashMap; @@ -46,10 +44,10 @@ impl PyGraphView { edge_label: Option<&str>, colour_nodes_by_type: Option, notebook: Option, - kwargs: Option<&PyDict>, + kwargs: Option<&Bound>, ) -> PyResult { Python::with_gil(|py| { - let pyvis = PyModule::import(py, "pyvis.network")?; + let pyvis = PyModule::import_bound(py, "pyvis.network")?; let network = pyvis.getattr("Network")?; let vis_graph = network.call(("notebook", notebook.unwrap_or(true)), kwargs)?; let mut groups = HashMap::new(); @@ -74,7 +72,7 @@ impl PyGraphView { None => Prop::from("https://cdn-icons-png.flaticon.com/512/7584/7584620.png"), }; let shape = shape.unwrap_or("dot"); - let kwargs_node = PyDict::new(py); + let kwargs_node = PyDict::new_bound(py); kwargs_node.set_item("label", v.name())?; kwargs_node.set_item("shape", shape)?; kwargs_node.set_item("image", image)?; @@ -90,9 +88,9 @@ impl PyGraphView { Some(colour) => *colour, }; kwargs_node.set_item("group", group)?; - vis_graph.call_method("add_node", (v.id(),), Some(kwargs_node))?; + vis_graph.call_method("add_node", (v.id(),), Some(&kwargs_node))?; } else { - vis_graph.call_method("add_node", (v.id(),), Some(kwargs_node))?; + vis_graph.call_method("add_node", (v.id(),), Some(&kwargs_node))?; } } let edges = if explode_edges.unwrap_or(false) { @@ -115,7 +113,7 @@ impl PyGraphView { } None => ArcStr::from(""), }; - let kwargs = PyDict::new(py); + let kwargs = PyDict::new_bound(py); kwargs.set_item("value", weight)?; let edge_col = edge_color.unwrap_or("#000000"); kwargs.set_item("color", edge_col)?; @@ -124,7 +122,7 @@ impl PyGraphView { vis_graph.call_method( "add_edge", (edge.src().id(), edge.dst().id()), - Some(kwargs), + Some(&kwargs), )?; } Ok(vis_graph.to_object(py)) @@ -156,22 +154,25 @@ impl PyGraphView { include_property_history: Option, ) -> PyResult { Python::with_gil(|py| { - let networkx = py.import("networkx")?.getattr("MultiDiGraph")?.call0()?; + let networkx = py + .import_bound("networkx")? + .getattr("MultiDiGraph")? + .call0()?; let mut node_tuples = Vec::new(); for v in self.graph.nodes().iter() { - let properties = PyDict::new(py); + let properties = PyDict::new_bound(py); if include_node_properties.unwrap_or(true) { if include_property_history.unwrap_or(true) { let const_props = v.properties().constant().as_map(); - let const_props_py = PyDict::new(py); + let const_props_py = PyDict::new_bound(py); for (key, value) in const_props { const_props_py.set_item(key, value.into_py(py))?; } properties.set_item("constant", const_props_py)?; properties.set_item( "temporal", - PyList::new(py, v.properties().temporal().histories()), + PyList::new_bound(py, v.properties().temporal().histories()), )?; } else { for (key, value) in v.properties().as_map() { @@ -191,7 +192,7 @@ impl PyGraphView { } } let node_tuple = - PyTuple::new(py, &[v.name().to_object(py), properties.to_object(py)]); + PyTuple::new_bound(py, &[v.name().to_object(py), properties.to_object(py)]); node_tuples.push(node_tuple); } networkx.call_method1("add_nodes_from", (node_tuples,))?; @@ -204,13 +205,13 @@ impl PyGraphView { }; for e in edges.iter() { - let properties = PyDict::new(py); + let properties = PyDict::new_bound(py); let src = e.src().name(); let dst = e.dst().name(); if include_edge_properties.unwrap_or(true) { if include_property_history.unwrap_or(true) { let const_props = e.properties().constant().as_map(); - let const_props_py = PyDict::new(py); + let const_props_py = PyDict::new_bound(py); for (key, value) in const_props { const_props_py.set_item(key, value.into_py(py))?; } @@ -225,7 +226,7 @@ impl PyGraphView { } let output: Vec<(ArcStr, Vec<(i64, Prop)>)> = prop_hist_map.into_iter().collect(); - properties.set_item("temporal", PyList::new(py, output))?; + properties.set_item("temporal", PyList::new_bound(py, output))?; } else { for (key, value) in e.properties().as_map() { properties.set_item(key, value.into_py(py))?; @@ -241,7 +242,7 @@ impl PyGraphView { properties.set_item("update_history", e.history())?; } } - let edge_tuple = PyTuple::new( + let edge_tuple = PyTuple::new_bound( py, &[ src.to_object(py), diff --git a/raphtory/src/python/packages/algorithms.rs b/raphtory/src/python/packages/algorithms.rs index 89b76f012a..574338ddfc 100644 --- a/raphtory/src/python/packages/algorithms.rs +++ b/raphtory/src/python/packages/algorithms.rs @@ -54,9 +54,10 @@ use crate::{ db::{api::view::internal::DynamicGraph, graph::node::NodeView}, python::{ graph::{node::PyNode, views::graph_view::PyGraphView}, - utils::PyTime, + utils::{PyNodeRef, PyTime}, }, }; +use itertools::Itertools; use ordered_float::OrderedFloat; #[cfg(feature = "storage")] use pometry_storage::algorithms::connected_components::connected_components as connected_components_rs; @@ -82,7 +83,7 @@ use std::collections::{HashMap, HashSet}; /// int : number of triangles associated with node v /// #[pyfunction] -pub fn local_triangle_count(g: &PyGraphView, v: NodeRef) -> Option { +pub fn local_triangle_count(g: &PyGraphView, v: PyNodeRef) -> Option { local_triangle_count_rs(&g.graph, v) } @@ -236,8 +237,8 @@ pub fn temporally_reachable_nodes( g: &PyGraphView, max_hops: usize, start_time: i64, - seed_nodes: Vec, - stop_nodes: Option>, + seed_nodes: Vec, + stop_nodes: Option>, ) -> AlgorithmResult, Vec<(i64, String)>> { temporal_reachability_rs(&g.graph, None, max_hops, start_time, seed_nodes, stop_nodes) } @@ -253,7 +254,7 @@ pub fn temporally_reachable_nodes( /// Returns: /// float : the local clustering coefficient of node v in g. #[pyfunction] -pub fn local_clustering_coefficient(g: &PyGraphView, v: NodeRef) -> Option { +pub fn local_clustering_coefficient(g: &PyGraphView, v: PyNodeRef) -> Option { local_clustering_coefficient_rs(&g.graph, v) } @@ -619,7 +620,7 @@ pub fn min_degree(g: &PyGraphView) -> usize { #[pyo3[signature = (g, source, cutoff=None)]] pub fn single_source_shortest_path( g: &PyGraphView, - source: NodeRef, + source: PyNodeRef, cutoff: Option, ) -> AlgorithmResult, Vec> { single_source_shortest_path_rs(&g.graph, source, cutoff) @@ -641,8 +642,8 @@ pub fn single_source_shortest_path( #[pyo3[signature = (g, source, targets, direction=Direction::BOTH, weight="weight".to_string())]] pub fn dijkstra_single_source_shortest_paths( g: &PyGraphView, - source: NodeRef, - targets: Vec, + source: PyNodeRef, + targets: Vec, direction: Direction, weight: Option, ) -> PyResult)>> { @@ -848,15 +849,13 @@ pub fn cohesive_fruchterman_reingold( #[pyo3[signature = (graph, views, k, delta)]] pub fn temporal_rich_club_coefficient( graph: PyGraphView, - views: &PyAny, + views: &Bound, k: usize, delta: usize, -) -> f64 { - let py_iterator = PyIterator::from_object(views).unwrap(); - let iter = py_iterator.map(|item| { - item.and_then(PyGraphView::extract) - .map(|pgv: PyGraphView| pgv.graph) - .unwrap() - }); - temporal_rich_club_rs(graph.graph, iter, k, delta) +) -> PyResult { + let py_iterator = views.iter()?; + let views = py_iterator + .map(|view| view.and_then(|view| Ok(view.downcast::()?.get().graph.clone()))) + .collect::>>()?; + Ok(temporal_rich_club_rs(graph.graph, views, k, delta)) } diff --git a/raphtory/src/python/packages/base_modules.rs b/raphtory/src/python/packages/base_modules.rs index 010fc0029f..49c718aec7 100644 --- a/raphtory/src/python/packages/base_modules.rs +++ b/raphtory/src/python/packages/base_modules.rs @@ -28,9 +28,9 @@ use crate::{ }, }, }; -use pyo3::{prelude::PyModule, PyErr, PyResult, Python}; +use pyo3::prelude::*; -pub fn add_raphtory_classes(m: &PyModule) -> PyResult<()> { +pub fn add_raphtory_classes(m: &Bound) -> PyResult<()> { //Graph classes add_classes!( m, @@ -59,10 +59,10 @@ pub fn add_raphtory_classes(m: &PyModule) -> PyResult<()> { return Ok(()); } -pub fn base_algorithm_module(py: Python<'_>) -> Result<&PyModule, PyErr> { - let algorithm_module = PyModule::new(py, "algorithms")?; +pub fn base_algorithm_module(py: Python<'_>) -> Result, PyErr> { + let algorithm_module = PyModule::new_bound(py, "algorithms")?; add_functions!( - algorithm_module, + &algorithm_module, dijkstra_single_source_shortest_paths, global_reciprocity, betweenness_centrality, @@ -107,10 +107,10 @@ pub fn base_algorithm_module(py: Python<'_>) -> Result<&PyModule, PyErr> { return Ok(algorithm_module); } -pub fn base_graph_loader_module(py: Python<'_>) -> Result<&PyModule, PyErr> { - let graph_loader_module = PyModule::new(py, "graph_loader")?; +pub fn base_graph_loader_module(py: Python<'_>) -> Result, PyErr> { + let graph_loader_module = PyModule::new_bound(py, "graph_loader")?; add_functions!( - graph_loader_module, + &graph_loader_module, lotr_graph, neo4j_movie_graph, stable_coin_graph, @@ -121,18 +121,18 @@ pub fn base_graph_loader_module(py: Python<'_>) -> Result<&PyModule, PyErr> { return Ok(graph_loader_module); } -pub fn base_graph_gen_module(py: Python<'_>) -> Result<&PyModule, PyErr> { - let graph_gen_module = PyModule::new(py, "graph_gen")?; +pub fn base_graph_gen_module(py: Python<'_>) -> Result, PyErr> { + let graph_gen_module = PyModule::new_bound(py, "graph_gen")?; add_functions!( - graph_gen_module, + &graph_gen_module, random_attachment, ba_preferential_attachment, ); return Ok(graph_gen_module); } -pub fn base_vectors_module(py: Python<'_>) -> Result<&PyModule, PyErr> { - let vectors_module = PyModule::new(py, "vectors")?; +pub fn base_vectors_module(py: Python<'_>) -> Result, PyErr> { + let vectors_module = PyModule::new_bound(py, "vectors")?; vectors_module.add_class::()?; vectors_module.add_class::()?; vectors_module.add_class::()?; diff --git a/raphtory/src/python/packages/vectors.rs b/raphtory/src/python/packages/vectors.rs index dd33555482..4fea277168 100644 --- a/raphtory/src/python/packages/vectors.rs +++ b/raphtory/src/python/packages/vectors.rs @@ -12,7 +12,7 @@ use crate::{ python::{ graph::{edge::PyEdge, node::PyNode, views::graph_view::PyGraphView}, types::wrappers::document::{PyDocument, PyEmbedding}, - utils::{execute_async_task, PyTime}, + utils::{execute_async_task, PyNodeRef, PyTime}, }, vectors::{ template::DocumentTemplate, @@ -59,7 +59,7 @@ impl PyQuery { } impl<'source> FromPyObject<'source> for PyQuery { - fn extract(query: &'source PyAny) -> PyResult { + fn extract_bound(query: &Bound<'source, PyAny>) -> PyResult { if let Ok(text) = query.extract::() { return Ok(PyQuery::Raw(text)); } @@ -254,7 +254,7 @@ impl PyGraphView { #[pyo3(signature = (embedding, cache = None, overwrite_cache = false, graph_template = None, node_template = None, edge_template = None, graph_name = None, verbose = false))] fn vectorise( &self, - embedding: &PyFunction, + embedding: Bound, cache: Option, overwrite_cache: bool, graph_template: Option, @@ -263,8 +263,8 @@ impl PyGraphView { graph_name: Option, verbose: bool, ) -> PyResult { - let embedding: Py = embedding.into(); let graph = self.graph.clone(); + let embedding = embedding.unbind(); let cache = cache.map(|cache| cache.into()).into(); let template = DocumentTemplate { graph_template, @@ -274,7 +274,7 @@ impl PyGraphView { execute_async_task(move || async move { Ok(graph .vectorise( - Box::new(embedding.clone()), + Box::new(embedding), cache, overwrite_cache, template, @@ -464,7 +464,7 @@ impl PyVectorSelection { /// /// Args: /// nodes (list): a list of the node ids or nodes to add - fn add_nodes(mut self_: PyRefMut<'_, Self>, nodes: Vec) { + fn add_nodes(mut self_: PyRefMut<'_, Self>, nodes: Vec) { self_.0.add_nodes(nodes) } @@ -474,7 +474,7 @@ impl PyVectorSelection { /// /// Args: /// edges (list): a list of the edge ids or edges to add - fn add_edges(mut self_: PyRefMut<'_, Self>, edges: Vec<(NodeRef, NodeRef)>) { + fn add_edges(mut self_: PyRefMut<'_, Self>, edges: Vec<(PyNodeRef, PyNodeRef)>) { self_.0.add_edges(edges) } @@ -615,12 +615,13 @@ pub fn compute_embedding( impl EmbeddingFunction for Py { fn call(&self, texts: Vec) -> BoxFuture<'static, EmbeddingResult>> { - let embedding_function = self.clone(); + let embedding_function = Python::with_gil(|py| self.clone_ref(py)); Box::pin(async move { Python::with_gil(|py| { - let python_texts = PyList::new(py, texts); - let result = embedding_function.call1(py, (python_texts,))?; - let embeddings: &PyList = result.downcast(py).map_err(|_| { + let embedding_function = embedding_function.bind(py); + let python_texts = PyList::new_bound(py, texts); + let result = embedding_function.call1((python_texts,))?; + let embeddings = result.downcast::().map_err(|_| { PyTypeError::new_err( "value returned by the embedding function was not a python list", ) @@ -629,7 +630,7 @@ impl EmbeddingFunction for Py { let embeddings: EmbeddingResult> = embeddings .iter() .map(|embedding| { - let pylist: &PyList = embedding.downcast().map_err(|_| { + let pylist = embedding.downcast::().map_err(|_| { PyTypeError::new_err("one of the values in the list returned by the embedding function was not a python list") })?; let embedding: EmbeddingResult = pylist diff --git a/raphtory/src/python/types/macros/iterable.rs b/raphtory/src/python/types/macros/iterable.rs index 9006b5b176..3d5c5606e9 100644 --- a/raphtory/src/python/types/macros/iterable.rs +++ b/raphtory/src/python/types/macros/iterable.rs @@ -217,14 +217,22 @@ macro_rules! py_float_iterable { /// unique identifier without a proc macro) macro_rules! py_iterable_comp { ($name:ty, $cmp_item:ty, $cmp_internal:ident) => { - #[derive(Clone)] enum $cmp_internal { Vec(Vec<$cmp_item>), This(Py<$name>), } + impl Clone for $cmp_internal { + fn clone(&self) -> Self { + match self { + Self::Vec(v) => Self::Vec(v.clone()), + Self::This(v) => Self::This(Python::with_gil(|py| v.clone_ref(py))), + } + } + } + impl<'source> FromPyObject<'source> for $cmp_internal { - fn extract(ob: &'source PyAny) -> PyResult { + fn extract_bound(ob: &Bound<'source, PyAny>) -> PyResult { if let Ok(s) = ob.extract::>() { Ok($cmp_internal::This(s)) } else if let Ok(v) = ob.extract::>() { diff --git a/raphtory/src/python/types/macros/trait_impl/node_state.rs b/raphtory/src/python/types/macros/trait_impl/node_state.rs index 45fbe2eb36..fe804a59f9 100644 --- a/raphtory/src/python/types/macros/trait_impl/node_state.rs +++ b/raphtory/src/python/types/macros/trait_impl/node_state.rs @@ -1,5 +1,5 @@ use crate::{ - core::entities::nodes::node_ref::NodeRef, + core::entities::nodes::node_ref::{AsNodeRef, NodeRef}, db::{ api::{ state::{LazyNodeState, NodeState, NodeStateOps, OrderedNodeStateOps}, @@ -8,7 +8,10 @@ use crate::{ graph::node::NodeView, }, py_borrowing_iter, - python::types::{repr::Repr, wrappers::iterators::PyBorrowingIterator}, + python::{ + types::{repr::Repr, wrappers::iterators::PyBorrowingIterator}, + utils::PyNodeRef, + }, }; use chrono::{DateTime, Utc}; use pyo3::{ @@ -45,7 +48,8 @@ macro_rules! impl_node_state_ops { .map($to_owned)) } - fn __getitem__(&self, node: NodeRef) -> PyResult<$value> { + fn __getitem__(&self, node: PyNodeRef) -> PyResult<$value> { + let node = node.as_node_ref(); self.inner .get_by_node(node) .map($to_owned) @@ -133,8 +137,9 @@ macro_rules! impl_node_state_ord_ops { .map(|(n, v)| (n.cloned(), ($to_owned)(v))) } - fn __eq__<'py>(&'py self, other: &'py PyAny, py: Python<'py>) -> PyObject { - if let Ok(other) = other.extract::>() { + fn __eq__<'py>(&self, other: &Bound<'py, PyAny>, py: Python<'py>) -> PyObject { + if let Ok(other) = other.downcast::() { + let other = Bound::borrow(other); return self.inner.values().eq(other.inner.values()).into_py(py); } else if let Ok(other) = other.extract::>() { return self @@ -143,14 +148,14 @@ macro_rules! impl_node_state_ord_ops { .map($to_owned) .eq(other.into_iter()) .into_py(py); - } else if let Ok(other) = other.extract::>() { + } else if let Ok(other) = other.extract::>() { return (self.inner.len() == other.len() && other.into_iter().all(|(node, value)| { self.inner.get_by_node(node).map($to_owned) == Some(value) })) .into_py(py); } - PyNotImplemented::get(py).into_py(py) + PyNotImplemented::get_bound(py).into_py(py) } } }; diff --git a/raphtory/src/python/types/macros/trait_impl/serialise.rs b/raphtory/src/python/types/macros/trait_impl/serialise.rs index bd0e43c896..320bb44f3e 100644 --- a/raphtory/src/python/types/macros/trait_impl/serialise.rs +++ b/raphtory/src/python/types/macros/trait_impl/serialise.rs @@ -85,9 +85,9 @@ macro_rules! impl_serialise { /// /// Returns: /// bytes - fn serialise<'py>(&self, py: Python<'py>) -> &'py pyo3::types::PyBytes { + fn serialise<'py>(&self, py: Python<'py>) -> Bound<'py, pyo3::types::PyBytes> { let bytes = $crate::serialise::StableEncode::encode_to_vec(&self.$field); - pyo3::types::PyBytes::new(py, &bytes) + pyo3::types::PyBytes::new_bound(py, &bytes) } } }; diff --git a/raphtory/src/python/types/wrappers/document.rs b/raphtory/src/python/types/wrappers/document.rs index 07fc9581a6..2646fa60ce 100644 --- a/raphtory/src/python/types/wrappers/document.rs +++ b/raphtory/src/python/types/wrappers/document.rs @@ -15,7 +15,6 @@ impl IntoPy for Lifespan { } } -#[derive(Clone)] #[pyclass(name = "Document", frozen, get_all)] pub struct PyDocument { pub(crate) content: String, @@ -24,6 +23,21 @@ pub struct PyDocument { pub(crate) life: Lifespan, } +impl Clone for PyDocument { + fn clone(&self) -> Self { + let entity = self + .entity + .as_ref() + .map(|entity| Python::with_gil(|py| entity.clone_ref(py))); + Self { + content: self.content.clone(), + entity: entity, + embedding: self.embedding.clone(), + life: self.life.clone(), + } + } +} + #[pyclass(name = "Embedding", frozen)] #[derive(Clone)] pub struct PyEmbedding(pub Embedding); @@ -48,13 +62,13 @@ impl From for PyDocument { #[pymethods] impl PyDocument { #[new] - fn new(content: String, life: Option<&PyAny>) -> PyResult { + fn new(content: String, life: Option<&Bound>) -> PyResult { let life = match life { None => Lifespan::Inherited, Some(life) => { if let Ok(time) = life.extract::() { Lifespan::Event { time } - } else if let Ok(life) = life.extract::<&PyTuple>() { + } else if let Ok(life) = life.downcast::() { match life.iter().collect_vec().as_slice() { [start, end] => Lifespan::Interval { start: start.extract::()?, diff --git a/raphtory/src/python/types/wrappers/prop.rs b/raphtory/src/python/types/wrappers/prop.rs index 0f44d4bedc..65d99422d0 100644 --- a/raphtory/src/python/types/wrappers/prop.rs +++ b/raphtory/src/python/types/wrappers/prop.rs @@ -8,10 +8,7 @@ use crate::{ prelude::{GraphViewOps, PropertyFilter}, python::{graph::views::graph_view::PyGraphView, types::repr::Repr}, }; -use pyo3::{ - exceptions::PyTypeError, pyclass, pymethods, types::PyBool, FromPyObject, IntoPy, PyAny, - PyObject, PyResult, Python, ToPyObject, -}; +use pyo3::{exceptions::PyTypeError, prelude::*, types::PyBool}; use std::{collections::HashSet, ops::Deref, sync::Arc}; impl ToPyObject for Prop { @@ -64,7 +61,7 @@ impl IntoPy for Prop { // Manually implemented to make sure we don't end up with f32/i32/u32 from python ints/floats impl<'source> FromPyObject<'source> for Prop { - fn extract(ob: &'source PyAny) -> PyResult { + fn extract_bound(ob: &Bound<'source, PyAny>) -> PyResult { if ob.is_instance_of::() { return Ok(Prop::Bool(ob.extract()?)); } diff --git a/raphtory/src/python/utils/mod.rs b/raphtory/src/python/utils/mod.rs index 20333a1688..093f9ac262 100644 --- a/raphtory/src/python/utils/mod.rs +++ b/raphtory/src/python/utils/mod.rs @@ -4,7 +4,10 @@ //! These functions are not part of the public API and are not exported to the Python module. use crate::{ core::{ - entities::{nodes::node_ref::NodeRef, GidRef}, + entities::{ + nodes::node_ref::{AsNodeRef, NodeRef}, + GidRef, + }, storage::timeindex::AsTime, utils::time::{error::ParseTimeError, Interval, IntoTime, TryIntoTime}, Prop, PropUnwrap, @@ -15,10 +18,13 @@ use crate::{ use chrono::{DateTime, FixedOffset, NaiveDateTime, Utc}; use numpy::IntoPyArray; use pyo3::{ + conversion::FromPyObjectBound, exceptions::{PyRuntimeError, PyTypeError}, prelude::*, + pybacked::PyBackedStr, types::PyDateTime, }; +use raphtory_api::core::entities::{GID, VID}; use serde::Serialize; use std::{future::Future, thread}; @@ -26,34 +32,66 @@ pub mod errors; pub(crate) mod export; mod module_helpers; -/// Extract a `NodeRef` from a Python object. -/// The object can be a `str`, `u64` or `PyNode`. -/// If the object is a `PyNode`, the `NodeRef` is extracted from the `PyNode`. -/// If the object is a `str`, the `NodeRef` is created from the `str`. -/// If the object is a `int`, the `NodeRef` is created from the `int`. -/// -/// Arguments -/// vref: The Python object to extract the `NodeRef` from. -/// -/// Returns -/// A `NodeRef` extracted from the Python object. -impl<'source> FromPyObject<'source> for NodeRef<'source> { - fn extract(vref: &'source PyAny) -> PyResult { - if let Ok(s) = vref.extract::<&'source str>() { - Ok(NodeRef::External(GidRef::Str(s))) - } else if let Ok(gid) = vref.extract::() { - Ok(NodeRef::External(GidRef::U64(gid))) - } else if let Ok(v) = vref.extract::() { - Ok(NodeRef::Internal(v.node.node)) +#[derive(Debug, Eq, PartialEq, Hash)] +pub(crate) enum PyNodeRef { + ExternalStr(PyBackedStr), + ExternalInt(u64), + Internal(VID), +} + +impl<'source> FromPyObject<'source> for PyNodeRef { + fn extract_bound(ob: &Bound<'source, PyAny>) -> PyResult { + if let Ok(s) = ob.extract::() { + Ok(PyNodeRef::ExternalStr(s)) + } else if let Ok(gid) = ob.extract::() { + Ok(PyNodeRef::ExternalInt(gid)) + } else if let Ok(v) = ob.extract::() { + Ok(PyNodeRef::Internal(v.node.node)) } else { Err(PyTypeError::new_err("Not a valid node")) } } } +impl AsNodeRef for PyNodeRef { + fn as_node_ref(&self) -> NodeRef { + match self { + PyNodeRef::ExternalStr(str) => NodeRef::External(GidRef::Str(str)), + PyNodeRef::ExternalInt(gid) => NodeRef::External(GidRef::U64((*gid))), + PyNodeRef::Internal(vid) => NodeRef::Internal(*vid), + } + } +} + +// TODO: Revisit once the two lifetime version of FromPyObject is available in pyo3 (see https://github.com/PyO3/pyo3/pull/4390) +// /// Extract a `NodeRef` from a Python object. +// /// The object can be a `str`, `u64` or `PyNode`. +// /// If the object is a `PyNode`, the `NodeRef` is extracted from the `PyNode`. +// /// If the object is a `str`, the `NodeRef` is created from the `str`. +// /// If the object is a `int`, the `NodeRef` is created from the `int`. +// /// +// /// Arguments +// /// vref: The Python object to extract the `NodeRef` from. +// /// +// /// Returns +// /// A `NodeRef` extracted from the Python object. +// impl<'source> FromPyObject<'source> for NodeRef<'source> { +// fn extract_bound(vref: &Bound<'source, PyAny>) -> PyResult { +// if let Ok(s) = vref.extract::<&'source str>() { +// Ok(NodeRef::External(GidRef::Str(s))) +// } else if let Ok(gid) = vref.extract::() { +// Ok(NodeRef::External(GidRef::U64(gid))) +// } else if let Ok(v) = vref.extract::() { +// Ok(NodeRef::Internal(v.node.node)) +// } else { +// Err(PyTypeError::new_err("Not a valid node")) +// } +// } +// } + fn parse_email_timestamp(timestamp: &str) -> PyResult { Python::with_gil(|py| { - let email_utils = PyModule::import(py, "email.utils")?; + let email_utils = PyModule::import_bound(py, "email.utils")?; let datetime = email_utils.call_method1("parsedate_to_datetime", (timestamp,))?; let py_seconds = datetime.call_method1("timestamp", ())?; let seconds = py_seconds.extract::()?; @@ -67,7 +105,7 @@ pub struct PyTime { } impl<'source> FromPyObject<'source> for PyTime { - fn extract(time: &'source PyAny) -> PyResult { + fn extract_bound(time: &Bound<'source, PyAny>) -> PyResult { if let Ok(string) = time.extract::() { let timestamp = string.as_str(); let parsing_result = timestamp @@ -97,7 +135,7 @@ impl<'source> FromPyObject<'source> for PyTime { // Important, this is needed to ensure that naive DateTime objects are treated as UTC and not local time return Ok(PyTime::new(parsed_datetime.into_time())); } - if let Ok(py_datetime) = time.extract::<&PyDateTime>() { + if let Ok(py_datetime) = time.downcast::() { let time = (py_datetime.call_method0("timestamp")?.extract::()? * 1000.0) as i64; return Ok(PyTime::new(time)); } @@ -139,7 +177,7 @@ impl PyInterval { } impl<'source> FromPyObject<'source> for PyInterval { - fn extract(interval: &'source PyAny) -> PyResult { + fn extract_bound(interval: &Bound<'source, PyAny>) -> PyResult { let string = interval.extract::(); let result = string.map(|string| PyInterval::new(string.as_str())); From 4d03392700d513d6808c75e13824349eb2dd1815 Mon Sep 17 00:00:00 2001 From: Lucas Jeub Date: Wed, 6 Nov 2024 13:05:49 +0100 Subject: [PATCH 02/17] disk graph also compiles --- raphtory/src/python/graph/disk_graph.rs | 111 +++++++++++-------- raphtory/src/python/packages/base_modules.rs | 4 +- 2 files changed, 64 insertions(+), 51 deletions(-) diff --git a/raphtory/src/python/graph/disk_graph.rs b/raphtory/src/python/graph/disk_graph.rs index c4bb373ca4..e54c7039f2 100644 --- a/raphtory/src/python/graph/disk_graph.rs +++ b/raphtory/src/python/graph/disk_graph.rs @@ -13,18 +13,20 @@ use crate::{ }; use itertools::Itertools; use pometry_storage::graph::load_node_const_properties; +use pyo3::{exceptions::PyRuntimeError, pybacked::PyBackedStr}; /// A columnar temporal graph. use pyo3::{ prelude::*, types::{PyDict, PyList, PyString}, }; use std::{ + ops::Deref, path::{Path, PathBuf}, str::FromStr, }; #[derive(Clone)] -#[pyclass(name = "DiskGraphStorage")] +#[pyclass(name = "DiskGraphStorage", frozen)] pub struct PyDiskGraph { pub graph: DiskGraphStorage, } @@ -57,63 +59,69 @@ impl IntoPy for DiskGraphStorage { } impl<'source> FromPyObject<'source> for DiskGraphStorage { - fn extract(ob: &'source PyAny) -> PyResult { - let py_graph: PyRef = ob.extract()?; + fn extract_bound(ob: &Bound<'source, PyAny>) -> PyResult { + let py_graph = ob.downcast::()?.get(); Ok(py_graph.graph.clone()) } } -impl<'a> FromPyObject<'a> for ParquetLayerCols<'a> { - fn extract(obj: &'a PyAny) -> PyResult { +struct PyParquetLayerCols { + parquet_dir: PyBackedStr, + layer: PyBackedStr, + src_col: PyBackedStr, + dst_col: PyBackedStr, + time_col: PyBackedStr, + exclude_edge_props: Vec, +} + +impl PyParquetLayerCols { + pub fn as_deref(&self) -> ParquetLayerCols { + ParquetLayerCols { + parquet_dir: self.parquet_dir.deref(), + layer: self.layer.deref(), + src_col: self.src_col.deref(), + dst_col: self.dst_col.deref(), + time_col: self.time_col.deref(), + exclude_edge_props: self.exclude_edge_props.iter().map(|s| s.deref()).collect(), + } + } +} + +impl<'a> FromPyObject<'a> for PyParquetLayerCols { + fn extract_bound(obj: &Bound<'a, PyAny>) -> PyResult { let dict = obj.downcast::()?; - Ok(ParquetLayerCols { + Ok(PyParquetLayerCols { parquet_dir: dict - .get_item("parquet_dir") - .and_then(|item| { - item.expect("parquet_dir is required") - .extract::<&PyString>() - }) - .and_then(|s| s.to_str())?, + .get_item("parquet_dir")? + .ok_or(PyRuntimeError::new_err("parquet_dir is required"))? + .extract::()?, layer: dict - .get_item("layer") - .and_then(|item| item.expect("layer is required").extract::<&PyString>()) - .and_then(|s| s.to_str())?, + .get_item("layer")? + .ok_or(PyRuntimeError::new_err("layer is required"))? + .extract::()?, src_col: dict - .get_item("src_col") - .and_then(|item| item.expect("src_col is required").extract::<&PyString>()) - .and_then(|s| s.to_str())?, + .get_item("src_col")? + .ok_or(PyRuntimeError::new_err("src_col is required"))? + .extract::()?, dst_col: dict - .get_item("dst_col") - .and_then(|item| item.expect("dst_col is required").extract::<&PyString>()) - .and_then(|s| s.to_str())?, + .get_item("dst_col")? + .ok_or(PyRuntimeError::new_err("dst_col is required"))? + .extract::()?, time_col: dict - .get_item("time_col") - .and_then(|item| item.expect("time_col is required").extract::<&PyString>()) - .and_then(|s| s.to_str())?, - exclude_edge_props: dict.get_item("exclude_edge_props").and_then(|item| { - item.map(|item| item.extract::>()) - .unwrap_or_else(|| Ok(vec![])) - })?, + .get_item("time_col")? + .ok_or(PyRuntimeError::new_err("time_col is required"))? + .extract::()?, + exclude_edge_props: match dict.get_item("exclude_edge_props")? { + None => Ok(vec![]), + Some(item) => item + .iter()? + .map(|v| v.and_then(|v| v.extract::())) + .collect::>>(), + }?, }) } } -pub struct ParquetLayerColsList<'a>(pub Vec>); - -impl<'a> FromPyObject<'a> for ParquetLayerColsList<'a> { - fn extract(obj: &'a PyAny) -> PyResult { - let list = obj.downcast::()?; - let mut cols_list = Vec::new(); - - for item in list.iter() { - let cols = ParquetLayerCols::extract(item)?; - cols_list.push(cols); - } - - Ok(ParquetLayerColsList(cols_list)) - } -} - #[pymethods] impl PyGraph { /// save graph in disk_graph format and memory map the result @@ -143,7 +151,7 @@ impl PyDiskGraph { #[pyo3(signature = (graph_dir, edge_df, time_col, src_col, dst_col))] pub fn load_from_pandas( graph_dir: PathBuf, - edge_df: &PyAny, + edge_df: &Bound, time_col: &str, src_col: &str, dst_col: &str, @@ -154,7 +162,7 @@ impl PyDiskGraph { let df_columns: Vec = edge_df.getattr("columns")?.extract()?; let df_columns: Vec<&str> = df_columns.iter().map(|x| x.as_str()).collect(); - let df_view = process_pandas_py_df(edge_df, py, df_columns)?; + let df_view = process_pandas_py_df(edge_df, df_columns)?; df_view.check_cols_exist(&cols_to_check)?; let src_index = df_view.get_index(src_col)?; let dst_index = df_view.get_index(dst_col)?; @@ -224,16 +232,20 @@ impl PyDiskGraph { )] fn load_from_parquets( graph_dir: PathBuf, - layer_parquet_cols: ParquetLayerColsList, + layer_parquet_cols: Vec, node_properties: Option, chunk_size: usize, t_props_chunk_size: usize, num_threads: usize, node_type_col: Option<&str>, ) -> Result { + let layer_cols = layer_parquet_cols + .iter() + .map(|layer| layer.as_deref()) + .collect(); DiskGraphStorage::load_from_parquets( graph_dir, - layer_parquet_cols.0, + layer_cols, node_properties, chunk_size, t_props_chunk_size, @@ -248,9 +260,10 @@ impl PyDiskGraph { pub fn load_node_const_properties( &self, location: &str, - col_names: Option>, + col_names: Option>, chunk_size: Option, ) -> Result { + let col_names = convert_py_prop_args(col_names.as_deref()); let path = PathBuf::from_str(location).unwrap(); let chunks = read_struct_arrays(&path, col_names.as_deref())?; let _ = diff --git a/raphtory/src/python/packages/base_modules.rs b/raphtory/src/python/packages/base_modules.rs index 49c718aec7..01047a97ce 100644 --- a/raphtory/src/python/packages/base_modules.rs +++ b/raphtory/src/python/packages/base_modules.rs @@ -103,8 +103,8 @@ pub fn base_algorithm_module(py: Python<'_>) -> Result, PyErr> { ); #[cfg(feature = "storage")] - add_functions!(algorithm_module, connected_components); - return Ok(algorithm_module); + add_functions!(&algorithm_module, connected_components); + Ok(algorithm_module) } pub fn base_graph_loader_module(py: Python<'_>) -> Result, PyErr> { From 4af8b8d827c7180c0699d0d8cac8b1e248f52f15 Mon Sep 17 00:00:00 2001 From: Lucas Jeub Date: Wed, 6 Nov 2024 13:08:14 +0100 Subject: [PATCH 03/17] tidy --- python/python/raphtory/__init__.pyi | 115 +++++++++++++++++++++ python/tests/graphql/misc/test_snapshot.py | 19 +++- 2 files changed, 129 insertions(+), 5 deletions(-) diff --git a/python/python/raphtory/__init__.pyi b/python/python/raphtory/__init__.pyi index 0a64806695..3f111e98af 100644 --- a/python/python/raphtory/__init__.pyi +++ b/python/python/raphtory/__init__.pyi @@ -609,6 +609,29 @@ class Edge(object): """ + def snapshot_at(self, time: TimeInput): + """ + Create a view of the Edge including all events that have not been explicitly deleted at `time`. + + This is equivalent to `before(time + 1)` for `EventGraph`s and `at(time)` for `PersitentGraph`s + + Arguments: + time (TimeInput): The time of the window. + + Returns: + A Edge object. + """ + + def snapshot_latest(self): + """ + Create a view of the Edge including all events that have not been explicitly deleted at the latest time. + + This is equivalent to a no-op for `EventGraph`s and `latest()` for `PersitentGraph`s + + Returns: + A Edge object. + """ + @property def src(self): """Returns the source node of the edge.""" @@ -1014,6 +1037,29 @@ class Edges(object): """ + def snapshot_at(self, time: TimeInput): + """ + Create a view of the Edges including all events that have not been explicitly deleted at `time`. + + This is equivalent to `before(time + 1)` for `EventGraph`s and `at(time)` for `PersitentGraph`s + + Arguments: + time (TimeInput): The time of the window. + + Returns: + A Edges object. + """ + + def snapshot_latest(self): + """ + Create a view of the Edges including all events that have not been explicitly deleted at the latest time. + + This is equivalent to a no-op for `EventGraph`s and `latest()` for `PersitentGraph`s + + Returns: + A Edges object. + """ + @property def src(self): """Returns the source node of the edge.""" @@ -2058,6 +2104,29 @@ class GraphView(object): """ + def snapshot_at(self, time: TimeInput): + """ + Create a view of the GraphView including all events that have not been explicitly deleted at `time`. + + This is equivalent to `before(time + 1)` for `EventGraph`s and `at(time)` for `PersitentGraph`s + + Arguments: + time (TimeInput): The time of the window. + + Returns: + A GraphView object. + """ + + def snapshot_latest(self): + """ + Create a view of the GraphView including all events that have not been explicitly deleted at the latest time. + + This is equivalent to a no-op for `EventGraph`s and `latest()` for `PersitentGraph`s + + Returns: + A GraphView object. + """ + @property def start(self): """ @@ -2740,6 +2809,29 @@ class Node(object): """ + def snapshot_at(self, time: TimeInput): + """ + Create a view of the Node including all events that have not been explicitly deleted at `time`. + + This is equivalent to `before(time + 1)` for `EventGraph`s and `at(time)` for `PersitentGraph`s + + Arguments: + time (TimeInput): The time of the window. + + Returns: + A Node object. + """ + + def snapshot_latest(self): + """ + Create a view of the Node including all events that have not been explicitly deleted at the latest time. + + This is equivalent to a no-op for `EventGraph`s and `latest()` for `PersitentGraph`s + + Returns: + A Node object. + """ + @property def start(self): """ @@ -3196,6 +3288,29 @@ class Nodes(object): """ + def snapshot_at(self, time: TimeInput): + """ + Create a view of the Nodes including all events that have not been explicitly deleted at `time`. + + This is equivalent to `before(time + 1)` for `EventGraph`s and `at(time)` for `PersitentGraph`s + + Arguments: + time (TimeInput): The time of the window. + + Returns: + A Nodes object. + """ + + def snapshot_latest(self): + """ + Create a view of the Nodes including all events that have not been explicitly deleted at the latest time. + + This is equivalent to a no-op for `EventGraph`s and `latest()` for `PersitentGraph`s + + Returns: + A Nodes object. + """ + @property def start(self): """ diff --git a/python/tests/graphql/misc/test_snapshot.py b/python/tests/graphql/misc/test_snapshot.py index f9de2e15fb..b4ff411f6f 100644 --- a/python/tests/graphql/misc/test_snapshot.py +++ b/python/tests/graphql/misc/test_snapshot.py @@ -3,6 +3,7 @@ from pandas.core.generic import gc from raphtory.graphql import GraphServer, RaphtoryClient + def test_snapshot(): work_dir = tempfile.mkdtemp() server = GraphServer(work_dir) @@ -10,7 +11,8 @@ def test_snapshot(): client = RaphtoryClient("http://localhost:1736") def query(graph: str, window: str): - return client.query(f"""{{ + return client.query( + f"""{{ graph(path: "{graph}") {{ window: {window} {{ edges {{ @@ -25,7 +27,8 @@ def query(graph: str, window: str): }} }} }} - }}""") + }}""" + ) client.new_graph("event", "EVENT") g = client.remote_graph("event") @@ -33,8 +36,12 @@ def query(graph: str, window: str): g.add_edge(2, 1, 3) for time in range(0, 4): - assert query("event", f"before(time: {time + 1})") == query("event", f"snapshotAt(time: {time})") - assert query("event", f"before(time: 1000)") == query("event", f"snapshotLatest") + assert query("event", f"before(time: {time + 1})") == query( + "event", f"snapshotAt(time: {time})" + ) + assert query("event", f"before(time: 1000)") == query( + "event", f"snapshotLatest" + ) client.new_graph("persistent", "PERSISTENT") g = client.remote_graph("persistent") @@ -43,5 +50,7 @@ def query(graph: str, window: str): g.delete_edge(3, 1, 2) for time in range(0, 5): - assert query("persistent", f"at(time: {time})") == query("persistent", f"snapshotAt(time: {time})") + assert query("persistent", f"at(time: {time})") == query( + "persistent", f"snapshotAt(time: {time})" + ) assert query("persistent", f"latest") == query("persistent", f"snapshotLatest") From d6d4d94ed0e3686126993556ccfd59ede273f562 Mon Sep 17 00:00:00 2001 From: Lucas Jeub Date: Wed, 6 Nov 2024 13:34:02 +0100 Subject: [PATCH 04/17] clean up warnings --- Cargo.lock | 46 +++++--- examples/netflow/src/lib.rs | 1 + raphtory-graphql/src/data.rs | 9 +- .../src/model/plugins/operation.rs | 4 +- raphtory-graphql/src/python/client/mod.rs | 3 + .../src/python/client/raphtory_client.rs | 1 + .../src/python/client/remote_edge.rs | 4 + .../src/python/client/remote_graph.rs | 1 + .../src/python/client/remote_node.rs | 1 + raphtory-graphql/src/routes.rs | 1 - .../db/api/storage/graph/edges/edge_entry.rs | 11 +- raphtory/src/db/graph/graph.rs | 15 +-- raphtory/src/io/parquet_loaders.rs | 1 - raphtory/src/python/algorithm/epidemics.rs | 2 +- raphtory/src/python/graph/disk_graph.rs | 105 ++++++++---------- raphtory/src/python/graph/edge.rs | 4 + raphtory/src/python/graph/graph.rs | 2 +- .../src/python/graph/graph_with_deletions.rs | 3 +- raphtory/src/python/graph/node.rs | 1 + raphtory/src/python/graph/views/graph_view.rs | 7 +- raphtory/src/python/packages/algorithms.rs | 17 +-- raphtory/src/python/packages/vectors.rs | 1 - .../python/types/macros/trait_impl/timeops.rs | 1 + .../src/python/types/wrappers/document.rs | 1 + raphtory/src/python/utils/mod.rs | 7 +- raphtory/src/vectors/mod.rs | 9 +- 26 files changed, 136 insertions(+), 122 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3d2362e494..d1490bd6d2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2129,6 +2129,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" + [[package]] name = "foreign_vec" version = "0.1.0" @@ -2386,6 +2392,17 @@ dependencies = [ "rayon", ] +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] + [[package]] name = "headers" version = "0.4.0" @@ -2882,9 +2899,7 @@ dependencies = [ [[package]] name = "kdam" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2f08e037030a8ae7807e4edc2a12fad4a0cce624d227f422e3879fea8c89908" +version = "0.5.2" dependencies = [ "pyo3", "terminal_size", @@ -4397,9 +4412,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.20.3" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53bdbb96d49157e65d45cc287af5f32ffadd5f4761438b527b055fb0d4bb8233" +checksum = "3d922163ba1f79c04bc49073ba7b32fd5a8d3b76a87c955921234b8e77333c51" dependencies = [ "cfg-if", "chrono", @@ -4407,7 +4422,7 @@ dependencies = [ "inventory", "libc", "memoffset", - "parking_lot", + "once_cell", "portable-atomic", "pyo3-build-config", "pyo3-ffi", @@ -4417,9 +4432,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.20.3" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deaa5745de3f5231ce10517a1f5dd97d53e5a2fd77aa6b5842292085831d48d7" +checksum = "bc38c5feeb496c8321091edf3d63e9a6829eab4b863b4a6a65f26f3e9cc6b179" dependencies = [ "once_cell", "target-lexicon", @@ -4427,9 +4442,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.20.3" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b42531d03e08d4ef1f6e85a2ed422eb678b8cd62b762e53891c05faf0d4afa" +checksum = "94845622d88ae274d2729fcefc850e63d7a3ddff5e3ce11bd88486db9f1d357d" dependencies = [ "libc", "pyo3-build-config", @@ -4437,9 +4452,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.20.3" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7305c720fa01b8055ec95e484a6eca7a83c841267f0dd5280f0c8b8551d2c158" +checksum = "e655aad15e09b94ffdb3ce3d217acf652e26bbc37697ef012f5e5e348c716e5e" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -4449,11 +4464,11 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.20.3" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c7e9b68bb9c3149c5b0cade5d07f953d6d125eb4337723c4ccdb665f1f96185" +checksum = "ae1e3f09eecd94618f60a455a23def79f79eba4dc561a97324bf9ac8c6df30ce" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "proc-macro2", "pyo3-build-config", "quote", @@ -4634,6 +4649,7 @@ dependencies = [ "flate2", "futures-util", "glam", + "hashbrown 0.15.0", "indoc", "itertools 0.13.0", "kdam", diff --git a/examples/netflow/src/lib.rs b/examples/netflow/src/lib.rs index 4bcdde8a22..322a65af36 100644 --- a/examples/netflow/src/lib.rs +++ b/examples/netflow/src/lib.rs @@ -10,6 +10,7 @@ use raphtory_core::db::api::view::DynamicGraph; use raphtory_graphql::python::pymodule::base_graphql_module; #[pyfunction(name = "netflow_one_path_node")] +#[pyo3(signature = (graph, no_time, threads=None))] fn py_netflow_one_path_node(graph: DynamicGraph, no_time: bool, threads: Option) -> usize { netflow_one_path_node(&graph, no_time, threads) } diff --git a/raphtory-graphql/src/data.rs b/raphtory-graphql/src/data.rs index 7640f954fd..95c0265780 100644 --- a/raphtory-graphql/src/data.rs +++ b/raphtory-graphql/src/data.rs @@ -248,9 +248,12 @@ impl Data { #[cfg(test)] pub(crate) mod data_tests { - use crate::data::Data; + use crate::{ + config::app_config::{AppConfig, AppConfigBuilder}, + data::Data, + }; use itertools::Itertools; - use raphtory::{db::api::view::MaterializedGraph, prelude::*}; + use raphtory::{core::utils::errors::GraphError, db::api::view::MaterializedGraph, prelude::*}; use std::{ collections::HashMap, fs, @@ -259,8 +262,6 @@ pub(crate) mod data_tests { path::{Path, PathBuf}, }; - use crate::config::app_config::{AppConfig, AppConfigBuilder}; - use raphtory::core::utils::errors::{GraphError, InvalidPathReason}; #[cfg(feature = "storage")] use raphtory::{ db::api::storage::graph::storage_ops::GraphStorage, db::api::view::internal::CoreGraphOps, diff --git a/raphtory-graphql/src/model/plugins/operation.rs b/raphtory-graphql/src/model/plugins/operation.rs index 75853b3145..1202ec48b7 100644 --- a/raphtory-graphql/src/model/plugins/operation.rs +++ b/raphtory-graphql/src/model/plugins/operation.rs @@ -49,8 +49,8 @@ impl<'a> Operation<'a, MutationPlugin> for NoOpMutation { } fn apply<'b>( - entry_point: &MutationPlugin, - ctx: ResolverContext, + _entry_point: &MutationPlugin, + _ctx: ResolverContext, ) -> BoxFuture<'b, FieldResult>>> { Box::pin(async move { Ok(Some(FieldValue::value("no-op".to_owned()))) }) } diff --git a/raphtory-graphql/src/python/client/mod.rs b/raphtory-graphql/src/python/client/mod.rs index 7dd8b35fa5..885a58db0d 100644 --- a/raphtory-graphql/src/python/client/mod.rs +++ b/raphtory-graphql/src/python/client/mod.rs @@ -58,6 +58,7 @@ impl Serialize for PyUpdate { #[pymethods] impl PyUpdate { #[new] + #[pyo3(signature = (time, properties=None))] pub(crate) fn new(time: PyTime, properties: Option>) -> Self { Self { time, properties } } @@ -116,6 +117,7 @@ impl Serialize for PyNodeAddition { #[pymethods] impl PyNodeAddition { #[new] + #[pyo3(signature = (name, node_type=None, constant_properties=None, updates=None))] pub(crate) fn new( name: GID, node_type: Option, @@ -187,6 +189,7 @@ impl Serialize for PyEdgeAddition { #[pymethods] impl PyEdgeAddition { #[new] + #[pyo3(signature = (src, dst, layer=None, constant_properties=None, updates=None))] pub(crate) fn new( src: GID, dst: GID, diff --git a/raphtory-graphql/src/python/client/raphtory_client.rs b/raphtory-graphql/src/python/client/raphtory_client.rs index 098bfbe4a4..ca40ef06d7 100644 --- a/raphtory-graphql/src/python/client/raphtory_client.rs +++ b/raphtory-graphql/src/python/client/raphtory_client.rs @@ -125,6 +125,7 @@ impl PyRaphtoryClient { /// /// Returns: /// The `data` field from the graphQL response. + #[pyo3(signature = (query, variables=None))] pub(crate) fn query( &self, py: Python, diff --git a/raphtory-graphql/src/python/client/remote_edge.rs b/raphtory-graphql/src/python/client/remote_edge.rs index 7a81dd9228..6eec638d3f 100644 --- a/raphtory-graphql/src/python/client/remote_edge.rs +++ b/raphtory-graphql/src/python/client/remote_edge.rs @@ -39,6 +39,7 @@ impl PyRemoteEdge { /// t (int | str | datetime): The timestamp at which the updates should be applied. /// properties (Optional[Dict[str, Prop]]): A dictionary of properties to update. /// layer (str, optional): The layer you want the updates to be applied. + #[pyo3(signature = (t, properties=None, layer=None))] fn add_updates( &self, py: Python, @@ -76,6 +77,7 @@ impl PyRemoteEdge { /// Parameters: /// t (int | str | datetime): The timestamp at which the deletion should be applied. /// layer (str, optional): The layer you want the deletion applied to. + #[pyo3(signature = (t, layer=None))] fn delete(&self, py: Python, t: PyTime, layer: Option<&str>) -> Result<(), GraphError> { let template = r#" { @@ -108,6 +110,7 @@ impl PyRemoteEdge { /// Parameters: /// properties (Dict[str, Prop]): A dictionary of properties to be added to the edge. /// layer (str, optional): The layer you want these properties to be added on to. + #[pyo3(signature = (properties, layer=None))] fn add_constant_properties( &self, py: Python, @@ -145,6 +148,7 @@ impl PyRemoteEdge { /// Parameters: /// properties (Dict[str, Prop]): A dictionary of properties to be added to the edge. /// layer (str, optional): The layer you want these properties to be added on to. + #[pyo3(signature = (properties, layer=None))] pub fn update_constant_properties( &self, py: Python, diff --git a/raphtory-graphql/src/python/client/remote_graph.rs b/raphtory-graphql/src/python/client/remote_graph.rs index 5d532fb909..7633ee74a5 100644 --- a/raphtory-graphql/src/python/client/remote_graph.rs +++ b/raphtory-graphql/src/python/client/remote_graph.rs @@ -385,6 +385,7 @@ impl PyRemoteGraph { /// /// Returns: /// RemoteEdge + #[pyo3(signature = (timestamp, src, dst, layer=None))] pub fn delete_edge( &self, py: Python, diff --git a/raphtory-graphql/src/python/client/remote_node.rs b/raphtory-graphql/src/python/client/remote_node.rs index 2b510eb6fe..bad06a09e0 100644 --- a/raphtory-graphql/src/python/client/remote_node.rs +++ b/raphtory-graphql/src/python/client/remote_node.rs @@ -60,6 +60,7 @@ impl PyRemoteNode { /// Parameters: /// t (int | str | datetime): The timestamp at which the updates should be applied. /// properties (Dict[str, Prop], optional): A dictionary of properties to update. + #[pyo3(signature = (t, properties=None))] pub fn add_updates( &self, py: Python, diff --git a/raphtory-graphql/src/routes.rs b/raphtory-graphql/src/routes.rs index 08e4fc9020..e193b554e3 100644 --- a/raphtory-graphql/src/routes.rs +++ b/raphtory-graphql/src/routes.rs @@ -1,4 +1,3 @@ -use async_graphql::http::{playground_source, GraphQLPlaygroundConfig}; use poem::{ handler, http::StatusCode, diff --git a/raphtory/src/db/api/storage/graph/edges/edge_entry.rs b/raphtory/src/db/api/storage/graph/edges/edge_entry.rs index 87a4c93665..e239952b12 100644 --- a/raphtory/src/db/api/storage/graph/edges/edge_entry.rs +++ b/raphtory/src/db/api/storage/graph/edges/edge_entry.rs @@ -1,10 +1,4 @@ -use std::ops::Range; - -use rayon::prelude::*; - use super::edge_storage_ops::MemEdge; -#[cfg(feature = "storage")] -use crate::disk_graph::storage_interface::edge::DiskEdge; use crate::{ core::{ entities::{edges::edge_ref::EdgeRef, LayerIds, VID}, @@ -19,6 +13,11 @@ use crate::{ tprop_storage_ops::TPropOps, }, }; +use rayon::prelude::*; +use std::ops::Range; + +#[cfg(feature = "storage")] +use crate::disk_graph::storage_interface::edge::DiskEdge; #[derive(Debug)] pub enum EdgeStorageEntry<'a> { diff --git a/raphtory/src/db/graph/graph.rs b/raphtory/src/db/graph/graph.rs index e7e8a1632c..9a7d92a84c 100644 --- a/raphtory/src/db/graph/graph.rs +++ b/raphtory/src/db/graph/graph.rs @@ -398,10 +398,7 @@ mod db_tests { api::{ properties::internal::ConstPropertiesOps, view::{ - internal::{ - CoreGraphOps, EdgeFilterOps, InternalMaterialize, OneHopFilter, - TimeSemantics, - }, + internal::{CoreGraphOps, EdgeFilterOps, TimeSemantics}, time::internal::InternalTimeOps, EdgeViewOps, Layer, LayerOps, NodeViewOps, TimeOps, }, @@ -3213,14 +3210,4 @@ mod db_tests { let graph = pool.install(|| Graph::new()); assert_eq!(graph.core_graph().internal_num_nodes(), 0); } - - // TODO: remove this - fn test_event() { - let g = Graph::new(); - let m = g.materialize().unwrap(); - let w = g.window(1, 3).layers("asa").unwrap().window(2, 3); - let b = w.base(); - let b = w.base_graph(); - let t = w.graph_type(); - } } diff --git a/raphtory/src/io/parquet_loaders.rs b/raphtory/src/io/parquet_loaders.rs index 4141c22e93..ec2153fddf 100644 --- a/raphtory/src/io/parquet_loaders.rs +++ b/raphtory/src/io/parquet_loaders.rs @@ -26,7 +26,6 @@ use std::{ collections::HashMap, fs, fs::File, - ops::Deref, path::{Path, PathBuf}, }; diff --git a/raphtory/src/python/algorithm/epidemics.rs b/raphtory/src/python/algorithm/epidemics.rs index 8eac86fdf9..8f88794af8 100644 --- a/raphtory/src/python/algorithm/epidemics.rs +++ b/raphtory/src/python/algorithm/epidemics.rs @@ -2,7 +2,7 @@ use crate::{ algorithms::dynamics::temporal::epidemics::{ Infected, IntoSeeds, Number, Probability, SeedError, }, - core::entities::{nodes::node_ref::NodeRef, VID}, + core::entities::VID, db::api::view::{DynamicGraph, StaticGraphViewOps}, py_algorithm_result, py_algorithm_result_new_ord_hash_eq, python::{ diff --git a/raphtory/src/python/graph/disk_graph.rs b/raphtory/src/python/graph/disk_graph.rs index e54c7039f2..70b9f7b084 100644 --- a/raphtory/src/python/graph/disk_graph.rs +++ b/raphtory/src/python/graph/disk_graph.rs @@ -1,3 +1,5 @@ +//! A columnar temporal graph. +//! use super::io::pandas_loaders::*; use crate::{ arrow2::{ @@ -13,12 +15,7 @@ use crate::{ }; use itertools::Itertools; use pometry_storage::graph::load_node_const_properties; -use pyo3::{exceptions::PyRuntimeError, pybacked::PyBackedStr}; -/// A columnar temporal graph. -use pyo3::{ - prelude::*, - types::{PyDict, PyList, PyString}, -}; +use pyo3::{exceptions::PyRuntimeError, prelude::*, pybacked::PyBackedStr, types::PyDict}; use std::{ ops::Deref, path::{Path, PathBuf}, @@ -156,64 +153,57 @@ impl PyDiskGraph { src_col: &str, dst_col: &str, ) -> Result { - let graph: Result = Python::with_gil(|py| { - let cols_to_check = vec![src_col, dst_col, time_col]; + let cols_to_check = vec![src_col, dst_col, time_col]; - let df_columns: Vec = edge_df.getattr("columns")?.extract()?; - let df_columns: Vec<&str> = df_columns.iter().map(|x| x.as_str()).collect(); + let df_columns: Vec = edge_df.getattr("columns")?.extract()?; + let df_columns: Vec<&str> = df_columns.iter().map(|x| x.as_str()).collect(); - let df_view = process_pandas_py_df(edge_df, df_columns)?; - df_view.check_cols_exist(&cols_to_check)?; - let src_index = df_view.get_index(src_col)?; - let dst_index = df_view.get_index(dst_col)?; - let time_index = df_view.get_index(time_col)?; + let df_view = process_pandas_py_df(edge_df, df_columns)?; + df_view.check_cols_exist(&cols_to_check)?; + let src_index = df_view.get_index(src_col)?; + let dst_index = df_view.get_index(dst_col)?; + let time_index = df_view.get_index(time_col)?; - let mut chunks_iter = df_view.chunks.peekable(); - let chunk_size = if let Some(result) = chunks_iter.peek() { - match result { - Ok(df) => df.chunk.len(), - Err(e) => { - return Err(GraphError::LoadFailure(format!( - "Failed to load graph {e:?}" - ))) - } + let mut chunks_iter = df_view.chunks.peekable(); + let chunk_size = if let Some(result) = chunks_iter.peek() { + match result { + Ok(df) => df.chunk.len(), + Err(e) => { + return Err(GraphError::LoadFailure(format!( + "Failed to load graph {e:?}" + ))) } - } else { - return Err(GraphError::LoadFailure("No chunks available".to_string())); - }; + } + } else { + return Err(GraphError::LoadFailure("No chunks available".to_string())); + }; - let edge_lists = chunks_iter - .map_ok(|df| { - let fields = df - .chunk - .iter() - .zip(df_view.names.iter()) - .map(|(arr, col_name)| { - Field::new(col_name, arr.data_type().clone(), arr.null_count() > 0) - }) - .collect_vec(); - let s_array = StructArray::new(DataType::Struct(fields), df.chunk, None); - s_array - }) - .collect::, GraphError>>()?; + let edge_lists = chunks_iter + .map_ok(|df| { + let fields = df + .chunk + .iter() + .zip(df_view.names.iter()) + .map(|(arr, col_name)| { + Field::new(col_name, arr.data_type().clone(), arr.null_count() > 0) + }) + .collect_vec(); + let s_array = StructArray::new(DataType::Struct(fields), df.chunk, None); + s_array + }) + .collect::, GraphError>>()?; - let graph = DiskGraphStorage::load_from_edge_lists( - &edge_lists, - chunk_size, - chunk_size, - graph_dir, - time_index, - src_index, - dst_index, - )?; - Ok::<_, GraphError>(graph) - }); + let graph = DiskGraphStorage::load_from_edge_lists( + &edge_lists, + chunk_size, + chunk_size, + graph_dir, + time_index, + src_index, + dst_index, + )?; - graph.map_err(|e| { - GraphError::LoadFailure(format!( - "Failed to load graph {e:?} from pandas data frames" - )) - }) + Ok(graph) } #[staticmethod] @@ -257,6 +247,7 @@ impl PyDiskGraph { }) } + #[pyo3(signature = (location, col_names=None, chunk_size=None))] pub fn load_node_const_properties( &self, location: &str, diff --git a/raphtory/src/python/graph/edge.rs b/raphtory/src/python/graph/edge.rs index 47477ecb37..7c209282b2 100644 --- a/raphtory/src/python/graph/edge.rs +++ b/raphtory/src/python/graph/edge.rs @@ -388,6 +388,7 @@ impl PyMutableEdge { /// t (TimeInput): The timestamp at which the updates should be applied. /// properties (PropInput, optional): A dictionary of properties to update. /// layer (str, optional): The layer you want these properties to be added on to. + #[pyo3(signature = (t, properties=None, layer=None))] fn add_updates( &self, t: PyTime, @@ -403,6 +404,7 @@ impl PyMutableEdge { /// Parameters: /// t (TimeInput): The timestamp at which the deletion should be applied. /// layer (str, optional): The layer you want the deletion applied to . + #[pyo3(signature = (t, layer=None))] fn delete(&self, t: PyTime, layer: Option<&str>) -> Result<(), GraphError> { self.edge.delete(t, layer) } @@ -414,6 +416,7 @@ impl PyMutableEdge { /// Parameters: /// properties (PropInput): A dictionary of properties to be added to the edge. /// layer (str, optional): The layer you want these properties to be added on to. + #[pyo3(signature = (properties, layer=None))] fn add_constant_properties( &self, properties: HashMap, @@ -429,6 +432,7 @@ impl PyMutableEdge { /// Parameters: /// properties (PropInput): A dictionary of properties to be added to the edge. /// layer (str, optional): The layer you want these properties to be added on to. + #[pyo3(signature = (properties, layer=None))] pub fn update_constant_properties( &self, properties: HashMap, diff --git a/raphtory/src/python/graph/graph.rs b/raphtory/src/python/graph/graph.rs index d953313d9c..97287c1bed 100644 --- a/raphtory/src/python/graph/graph.rs +++ b/raphtory/src/python/graph/graph.rs @@ -5,7 +5,7 @@ //! In Python, this class wraps around the rust graph. use crate::{ algorithms::components::LargestConnectedComponent, - core::{entities::nodes::node_ref::NodeRef, utils::errors::GraphError}, + core::utils::errors::GraphError, db::{ api::view::internal::{CoreGraphOps, DynamicGraph, IntoDynamic, MaterializedGraph}, graph::{edge::EdgeView, node::NodeView, views::node_subgraph::NodeSubgraph}, diff --git a/raphtory/src/python/graph/graph_with_deletions.rs b/raphtory/src/python/graph/graph_with_deletions.rs index 98f5d2d462..f4650875b9 100644 --- a/raphtory/src/python/graph/graph_with_deletions.rs +++ b/raphtory/src/python/graph/graph_with_deletions.rs @@ -10,7 +10,7 @@ use super::{ io::pandas_loaders::*, }; use crate::{ - core::{entities::nodes::node_ref::NodeRef, utils::errors::GraphError, Prop}, + core::{utils::errors::GraphError, Prop}, db::{ api::{ mutation::{AdditionOps, PropertyAdditionOps}, @@ -209,6 +209,7 @@ impl PyPersistentGraph { /// /// Returns: /// The deleted edge + #[pyo3(signature = (timestamp, src, dst, layer=None))] pub fn delete_edge( &self, timestamp: PyTime, diff --git a/raphtory/src/python/graph/node.rs b/raphtory/src/python/graph/node.rs index 33eb639552..c62d91697c 100644 --- a/raphtory/src/python/graph/node.rs +++ b/raphtory/src/python/graph/node.rs @@ -376,6 +376,7 @@ impl PyMutableNode { /// /// Returns: /// Result: A result object indicating success or failure. On failure, it contains a GraphError. + #[pyo3(signature = (t, properties=None))] pub fn add_updates( &self, t: PyTime, diff --git a/raphtory/src/python/graph/views/graph_view.rs b/raphtory/src/python/graph/views/graph_view.rs index cc626b9e91..8a273e6fca 100644 --- a/raphtory/src/python/graph/views/graph_view.rs +++ b/raphtory/src/python/graph/views/graph_view.rs @@ -1,10 +1,7 @@ //! The API for querying a view of the graph in a read-only state -use rayon::prelude::*; -use std::collections::HashMap; - use crate::{ - core::{entities::nodes::node_ref::NodeRef, utils::errors::GraphError}, + core::utils::errors::GraphError, db::{ api::{ properties::Properties, @@ -44,6 +41,8 @@ use crate::{ use chrono::prelude::*; use pyo3::prelude::*; use raphtory_api::core::storage::arc_str::ArcStr; +use rayon::prelude::*; +use std::collections::HashMap; impl IntoPy for MaterializedGraph { fn into_py(self, py: Python<'_>) -> PyObject { diff --git a/raphtory/src/python/packages/algorithms.rs b/raphtory/src/python/packages/algorithms.rs index 574338ddfc..19633452c1 100644 --- a/raphtory/src/python/packages/algorithms.rs +++ b/raphtory/src/python/packages/algorithms.rs @@ -1,6 +1,5 @@ #![allow(non_snake_case)] -#[cfg(feature = "storage")] -use crate::python::graph::disk_graph::PyDiskGraph; + use crate::{ algorithms::{ algorithm_result::AlgorithmResult, @@ -50,22 +49,24 @@ use crate::{ }, projections::temporal_bipartite_projection::temporal_bipartite_projection as temporal_bipartite_rs, }, - core::{entities::nodes::node_ref::NodeRef, Prop}, + core::Prop, db::{api::view::internal::DynamicGraph, graph::node::NodeView}, python::{ graph::{node::PyNode, views::graph_view::PyGraphView}, utils::{PyNodeRef, PyTime}, }, }; -use itertools::Itertools; use ordered_float::OrderedFloat; -#[cfg(feature = "storage")] -use pometry_storage::algorithms::connected_components::connected_components as connected_components_rs; -use pyo3::{prelude::*, types::PyIterator}; +use pyo3::prelude::*; use rand::{prelude::StdRng, SeedableRng}; use raphtory_api::core::{entities::GID, Direction}; use std::collections::{HashMap, HashSet}; +#[cfg(feature = "storage")] +use crate::python::graph::disk_graph::PyDiskGraph; +#[cfg(feature = "storage")] +use pometry_storage::algorithms::connected_components::connected_components as connected_components_rs; + /// Implementations of various graph algorithms that can be run on a graph. /// /// To run an algorithm simply import the module and call the function with the graph as the argument @@ -233,6 +234,7 @@ pub fn pagerank( /// Returns: /// AlgorithmResult : AlgorithmResult with string keys and float values mapping node names to their pagerank value. #[pyfunction] +#[pyo3(signature = (g, max_hops, start_time, seed_nodes, stop_nodes=None))] pub fn temporally_reachable_nodes( g: &PyGraphView, max_hops: usize, @@ -724,6 +726,7 @@ pub fn label_propagation( /// `recovered`: the time stamp at which the node recovered (i.e., stopped spreading the infection) /// #[pyfunction(name = "temporal_SEIR")] +#[pyo3(signature = (graph, seeds, infection_prob, initial_infection, recovery_rate=None, incubation_rate=None, rng_seed=None))] pub fn temporal_SEIR( graph: &PyGraphView, seeds: crate::python::algorithm::epidemics::PySeed, diff --git a/raphtory/src/python/packages/vectors.rs b/raphtory/src/python/packages/vectors.rs index 4fea277168..84604d9bbc 100644 --- a/raphtory/src/python/packages/vectors.rs +++ b/raphtory/src/python/packages/vectors.rs @@ -1,6 +1,5 @@ use crate::{ core::{ - entities::nodes::node_ref::NodeRef, utils::{errors::GraphError, time::IntoTime}, DocumentInput, Lifespan, Prop, }, diff --git a/raphtory/src/python/types/macros/trait_impl/timeops.rs b/raphtory/src/python/types/macros/trait_impl/timeops.rs index 1b3269eea4..143583fb03 100644 --- a/raphtory/src/python/types/macros/trait_impl/timeops.rs +++ b/raphtory/src/python/types/macros/trait_impl/timeops.rs @@ -76,6 +76,7 @@ macro_rules! impl_timeops { /// /// Returns: /// WindowSet: A `WindowSet` object. + #[pyo3(signature = (window, step=None))] fn rolling( &self, window: $crate::python::utils::PyInterval, diff --git a/raphtory/src/python/types/wrappers/document.rs b/raphtory/src/python/types/wrappers/document.rs index 2646fa60ce..6e9d520526 100644 --- a/raphtory/src/python/types/wrappers/document.rs +++ b/raphtory/src/python/types/wrappers/document.rs @@ -62,6 +62,7 @@ impl From for PyDocument { #[pymethods] impl PyDocument { #[new] + #[pyo3(signature = (content, life=None))] fn new(content: String, life: Option<&Bound>) -> PyResult { let life = match life { None => Lifespan::Inherited, diff --git a/raphtory/src/python/utils/mod.rs b/raphtory/src/python/utils/mod.rs index 093f9ac262..9fce97003c 100644 --- a/raphtory/src/python/utils/mod.rs +++ b/raphtory/src/python/utils/mod.rs @@ -18,13 +18,12 @@ use crate::{ use chrono::{DateTime, FixedOffset, NaiveDateTime, Utc}; use numpy::IntoPyArray; use pyo3::{ - conversion::FromPyObjectBound, exceptions::{PyRuntimeError, PyTypeError}, prelude::*, pybacked::PyBackedStr, types::PyDateTime, }; -use raphtory_api::core::entities::{GID, VID}; +use raphtory_api::core::entities::VID; use serde::Serialize; use std::{future::Future, thread}; @@ -33,7 +32,7 @@ pub(crate) mod export; mod module_helpers; #[derive(Debug, Eq, PartialEq, Hash)] -pub(crate) enum PyNodeRef { +pub enum PyNodeRef { ExternalStr(PyBackedStr), ExternalInt(u64), Internal(VID), @@ -57,7 +56,7 @@ impl AsNodeRef for PyNodeRef { fn as_node_ref(&self) -> NodeRef { match self { PyNodeRef::ExternalStr(str) => NodeRef::External(GidRef::Str(str)), - PyNodeRef::ExternalInt(gid) => NodeRef::External(GidRef::U64((*gid))), + PyNodeRef::ExternalInt(gid) => NodeRef::External(GidRef::U64(*gid)), PyNodeRef::Internal(vid) => NodeRef::Internal(*vid), } } diff --git a/raphtory/src/vectors/mod.rs b/raphtory/src/vectors/mod.rs index 79c7e9e15c..9f14ff8f9b 100644 --- a/raphtory/src/vectors/mod.rs +++ b/raphtory/src/vectors/mod.rs @@ -169,7 +169,8 @@ mod vector_tests { None, false, ) - .await; + .await + .unwrap(); let path = "/tmp/raphtory/very/deep/path/embedding-cache-test"; let _ = remove_file(path); @@ -183,7 +184,8 @@ mod vector_tests { None, false, ) - .await; + .await + .unwrap(); // the following uses the embeddings from the cache, so it doesn't call the panicking // embedding, which would make the test fail @@ -195,7 +197,8 @@ mod vector_tests { None, false, ) - .await; + .await + .unwrap(); } #[tokio::test] From d5f1609955fe7c8f4a52cd25bc3f826e1abe56c4 Mon Sep 17 00:00:00 2001 From: Lucas Jeub Date: Wed, 6 Nov 2024 13:34:43 +0100 Subject: [PATCH 05/17] point kdam at PR for now --- Cargo.lock | 1 + Cargo.toml | 9 +-------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d1490bd6d2..0e47bb286a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2900,6 +2900,7 @@ dependencies = [ [[package]] name = "kdam" version = "0.5.2" +source = "git+https://github.com/ljeub-pometry/kdam.git?branch=pyo3_0_22#b3fc30a21fff97daa7de08f76764a98699e5f505" dependencies = [ "pyo3", "terminal_size", diff --git a/Cargo.toml b/Cargo.toml index debfe46c92..b631052cec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -105,7 +105,7 @@ polars-parquet = "0.39.2" polars-core = "0.39.2" polars-io = "0.39.2" polars-utils = "0.39.2" -kdam = { version = "0.5.1" } +kdam = { git = "https://github.com/ljeub-pometry/kdam.git", branch = "pyo3_0_22" } pretty_assertions = "1.4.0" quickcheck = "1.0.3" quickcheck_macros = "1.0.0" @@ -142,17 +142,12 @@ base64-compat = { package = "base64-compat", version = "1.0.0" } prost = "0.13.1" prost-types = "0.13.1" prost-build = "0.13.1" - lazy_static = "1.4.0" pest = "2.7.8" pest_derive = "2.7.8" minijinja = "2.2.0" minijinja-contrib = { version = "2.2.0", features = ["datetime"] } sqlparser = "0.47" - -tqdm = "0.7.0" - - datafusion = { version = "40" } futures = "0.3" arrow = { version = "52" } @@ -160,6 +155,4 @@ arrow-buffer = { version = "52" } arrow-schema = { version = "52" } arrow-data = { version = "52" } arrow-array = { version = "52" } - - moka = { version = "0.12.7", features = ["sync"] } From 2699e35a012fd7d39a4bfdd00d5af344cb5ed595 Mon Sep 17 00:00:00 2001 From: Lucas Jeub Date: Wed, 6 Nov 2024 13:48:47 +0100 Subject: [PATCH 06/17] rebase fixes --- Cargo.lock | 82 ++++++------------------------ Cargo.toml | 7 +-- examples/rust/Cargo.toml | 1 - raphtory/src/core/entities/mod.rs | 7 ++- raphtory/src/io/parquet_loaders.rs | 5 +- raphtory/src/python/graph/edge.rs | 4 +- raphtory/src/python/graph/node.rs | 4 +- raphtory/src/python/utils/mod.rs | 14 ++--- 8 files changed, 35 insertions(+), 89 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0e47bb286a..245dc2855e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1133,7 +1133,7 @@ version = "7.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b34115915337defe99b2aff5c2ce6771e5fbc4079f4b506301f5cf394c8452f7" dependencies = [ - "crossterm 0.27.0", + "crossterm", "strum", "strum_macros", "unicode-width", @@ -1341,22 +1341,6 @@ version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" -[[package]] -name = "crossterm" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67" -dependencies = [ - "bitflags 1.3.2", - "crossterm_winapi", - "libc", - "mio", - "parking_lot", - "signal-hook", - "signal-hook-mio", - "winapi", -] - [[package]] name = "crossterm" version = "0.27.0" @@ -2060,7 +2044,6 @@ dependencies = [ "raphtory", "regex", "serde", - "tqdm", "tracing", ] @@ -2394,9 +2377,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" dependencies = [ "allocator-api2", "equivalent", @@ -3244,7 +3227,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", - "log", "wasi", "windows-sys 0.48.0", ] @@ -3495,9 +3477,9 @@ dependencies = [ [[package]] name = "numpy" -version = "0.20.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef41cbb417ea83b30525259e30ccef6af39b31c240bda578889494c5392d331" +checksum = "edb929bc0da91a4d85ed6c0a84deaa53d411abfb387fc271124f91bf6b89f14e" dependencies = [ "libc", "ndarray", @@ -4413,9 +4395,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.22.5" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d922163ba1f79c04bc49073ba7b32fd5a8d3b76a87c955921234b8e77333c51" +checksum = "f402062616ab18202ae8319da13fa4279883a2b8a9d9f83f20dbade813ce1884" dependencies = [ "cfg-if", "chrono", @@ -4433,9 +4415,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.22.5" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc38c5feeb496c8321091edf3d63e9a6829eab4b863b4a6a65f26f3e9cc6b179" +checksum = "b14b5775b5ff446dd1056212d778012cbe8a0fbffd368029fd9e25b514479c38" dependencies = [ "once_cell", "target-lexicon", @@ -4443,9 +4425,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.22.5" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94845622d88ae274d2729fcefc850e63d7a3ddff5e3ce11bd88486db9f1d357d" +checksum = "9ab5bcf04a2cdcbb50c7d6105de943f543f9ed92af55818fd17b660390fc8636" dependencies = [ "libc", "pyo3-build-config", @@ -4453,9 +4435,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.22.5" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e655aad15e09b94ffdb3ce3d217acf652e26bbc37697ef012f5e5e348c716e5e" +checksum = "0fd24d897903a9e6d80b968368a34e1525aeb719d568dba8b3d4bfa5dc67d453" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -4465,9 +4447,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.22.5" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1e3f09eecd94618f60a455a23def79f79eba4dc561a97324bf9ac8c6df30ce" +checksum = "36c011a03ba1e50152b4b394b479826cad97e7a21eb52df179cd91ac411cbfbe" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -4650,7 +4632,7 @@ dependencies = [ "flate2", "futures-util", "glam", - "hashbrown 0.15.0", + "hashbrown 0.15.1", "indoc", "itertools 0.13.0", "kdam", @@ -5472,27 +5454,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" -[[package]] -name = "signal-hook" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" -dependencies = [ - "libc", - "signal-hook-registry", -] - -[[package]] -name = "signal-hook-mio" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd" -dependencies = [ - "libc", - "mio", - "signal-hook", -] - [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -6307,17 +6268,6 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" -[[package]] -name = "tqdm" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2d2932240205a99b65f15d9861992c95fbb8c9fb280b3a1f17a92db6dc611f" -dependencies = [ - "anyhow", - "crossterm 0.25.0", - "once_cell", -] - [[package]] name = "tracing" version = "0.1.40" diff --git a/Cargo.toml b/Cargo.toml index b631052cec..bce47a186a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -57,9 +57,9 @@ reqwest = { version = "0.12.8", default-features = false, features = [ ] } serde = { version = "1.0.197", features = ["derive", "rc"] } serde_json = "1.0.114" -pyo3 = { version = "0.20.0", features = ["multiple-pymethods", "chrono"] } -pyo3-build-config = "0.20.0" -numpy = "0.20.0" +pyo3 = { version = "0.22.6", features = ["multiple-pymethods", "chrono"] } +pyo3-build-config = "0.22.6" +numpy = "0.22.1" itertools = "0.13.0" rand = "0.8.5" rayon = "1.8.1" @@ -106,6 +106,7 @@ polars-core = "0.39.2" polars-io = "0.39.2" polars-utils = "0.39.2" kdam = { git = "https://github.com/ljeub-pometry/kdam.git", branch = "pyo3_0_22" } +hashbrown = "0.15.1" pretty_assertions = "1.4.0" quickcheck = "1.0.3" quickcheck_macros = "1.0.0" diff --git a/examples/rust/Cargo.toml b/examples/rust/Cargo.toml index 7b11bad58c..c8e1dbeaf1 100644 --- a/examples/rust/Cargo.toml +++ b/examples/rust/Cargo.toml @@ -13,7 +13,6 @@ regex = { workspace = true } serde = { workspace = true } itertools = { workspace = true } tracing = { workspace = true } -tqdm = { workspace = true } [[bin]] name = "btc" diff --git a/raphtory/src/core/entities/mod.rs b/raphtory/src/core/entities/mod.rs index 5d1ec13686..a675695a3f 100644 --- a/raphtory/src/core/entities/mod.rs +++ b/raphtory/src/core/entities/mod.rs @@ -1,7 +1,6 @@ -use std::{borrow::Cow, ops::Index, sync::Arc}; - 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; @@ -81,14 +80,14 @@ mod test { #[test] fn set_one() { - let mut bm: Multiple = [1].into_iter().collect(); + let bm: Multiple = [1].into_iter().collect(); let actual = bm.into_iter().collect::>(); assert_eq!(actual, vec![1usize]); } #[test] fn set_two() { - let mut bm: Multiple = [1, 67].into_iter().collect(); + let bm: Multiple = [1, 67].into_iter().collect(); let actual = bm.into_iter().collect::>(); assert_eq!(actual, vec![1usize, 67]); diff --git a/raphtory/src/io/parquet_loaders.rs b/raphtory/src/io/parquet_loaders.rs index ec2153fddf..b192f5e43f 100644 --- a/raphtory/src/io/parquet_loaders.rs +++ b/raphtory/src/io/parquet_loaders.rs @@ -12,10 +12,7 @@ use crate::{ serialise::incremental::InternalCache, }; use itertools::Itertools; -use polars_arrow::{ - array::StructArray, - datatypes::{ArrowDataType as DataType, ArrowSchema, Field}, -}; +use polars_arrow::datatypes::{ArrowDataType as DataType, ArrowSchema, Field}; use polars_parquet::{ read, read::{read_metadata, FileMetaData, FileReader}, diff --git a/raphtory/src/python/graph/edge.rs b/raphtory/src/python/graph/edge.rs index 7c209282b2..d0399c2c61 100644 --- a/raphtory/src/python/graph/edge.rs +++ b/raphtory/src/python/graph/edge.rs @@ -177,9 +177,9 @@ impl PyEdge { /// Returns: /// List[int]: A list of unix timestamps. /// - pub fn history<'py>(&self, py: Python<'py>) -> Py> { + pub fn history<'py>(&self, py: Python<'py>) -> Bound<'py, PyArray> { let history = self.edge.history(); - history.into_pyarray(py).to_owned() + history.into_pyarray_bound(py) } /// Returns the number of times an edge is added or change to an edge is made. diff --git a/raphtory/src/python/graph/node.rs b/raphtory/src/python/graph/node.rs index c62d91697c..7d03edc09e 100644 --- a/raphtory/src/python/graph/node.rs +++ b/raphtory/src/python/graph/node.rs @@ -231,9 +231,9 @@ impl PyNode { /// /// Returns: /// List[int]: A list of unix timestamps of the event history of node. - pub fn history(&self, py: Python<'_>) -> Py> { + pub fn history<'py>(&self, py: Python<'py>) -> Bound<'py, PyArray> { let history = self.node.history(); - history.into_pyarray(py).to_owned() + history.into_pyarray_bound(py) } /// Returns the history of a node, including node additions and changes made to node. diff --git a/raphtory/src/python/utils/mod.rs b/raphtory/src/python/utils/mod.rs index 9fce97003c..59811d87fb 100644 --- a/raphtory/src/python/utils/mod.rs +++ b/raphtory/src/python/utils/mod.rs @@ -413,13 +413,13 @@ impl From> for NumpyArray { impl IntoPy for NumpyArray { fn into_py(self, py: Python<'_>) -> PyObject { match self { - NumpyArray::Bool(value) => value.into_pyarray(py).to_object(py), - NumpyArray::I32(value) => value.into_pyarray(py).to_object(py), - NumpyArray::I64(value) => value.into_pyarray(py).to_object(py), - NumpyArray::U32(value) => value.into_pyarray(py).to_object(py), - NumpyArray::U64(value) => value.into_pyarray(py).to_object(py), - NumpyArray::F32(value) => value.into_pyarray(py).to_object(py), - NumpyArray::F64(value) => value.into_pyarray(py).to_object(py), + NumpyArray::Bool(value) => value.into_pyarray_bound(py).to_object(py), + NumpyArray::I32(value) => value.into_pyarray_bound(py).to_object(py), + NumpyArray::I64(value) => value.into_pyarray_bound(py).to_object(py), + NumpyArray::U32(value) => value.into_pyarray_bound(py).to_object(py), + NumpyArray::U64(value) => value.into_pyarray_bound(py).to_object(py), + NumpyArray::F32(value) => value.into_pyarray_bound(py).to_object(py), + NumpyArray::F64(value) => value.into_pyarray_bound(py).to_object(py), NumpyArray::Props(vec) => match vec.first() { Some(Prop::Bool(_)) => { Self::Bool(vec.into_iter().filter_map(|p| p.into_bool()).collect()).into_py(py) From b1a0f84b13566c4b47596b050c479ccca4456f75 Mon Sep 17 00:00:00 2001 From: Lucas Jeub Date: Wed, 6 Nov 2024 14:06:52 +0100 Subject: [PATCH 07/17] tidy --- python/python/raphtory/__init__.pyi | 10 ++++++ .../update_graph/test_batch_updates.py | 35 +++++++++++-------- .../graphql/update_graph/test_edge_updates.py | 7 ++-- .../graphql/update_graph/test_node_updates.py | 2 +- .../tests/test_graphdb/test_latest_graph.py | 6 ++-- raphtory/src/io/parquet_loaders.rs | 2 ++ 6 files changed, 41 insertions(+), 21 deletions(-) diff --git a/python/python/raphtory/__init__.pyi b/python/python/raphtory/__init__.pyi index 3f111e98af..cf75a3fb89 100644 --- a/python/python/raphtory/__init__.pyi +++ b/python/python/raphtory/__init__.pyi @@ -444,6 +444,15 @@ class Edge(object): """ + def history_counts(self) -> int: + """ + Returns the number of times an edge is added or change to an edge is made. + + Returns: + int: The number of times an edge is added or change to an edge is made. + + """ + def history_date_time(self): """ Returns a list of timestamps of when an edge is added or change to an edge is made. @@ -895,6 +904,7 @@ class Edges(object): """ + def history_counts(self): ... def history_date_time(self): """ Returns all timestamps of edges, when an edge is added or change to an edge is made. diff --git a/python/tests/graphql/update_graph/test_batch_updates.py b/python/tests/graphql/update_graph/test_batch_updates.py index d343b26e34..b0a4292688 100644 --- a/python/tests/graphql/update_graph/test_batch_updates.py +++ b/python/tests/graphql/update_graph/test_batch_updates.py @@ -13,6 +13,7 @@ RemoteEdgeAddition, ) + def make_props(): current_datetime = datetime.now(timezone.utc) naive_datetime = datetime.now() @@ -116,12 +117,15 @@ def test_add_nodes(): ben = g.node("ben") hamza = g.node("hamza") lucas = g.node("lucas") - check_arr(ben.properties.temporal.get("prop_float").values(), [ - 2.0, - 3.0, - 2.0, - 3.0, - ]) + check_arr( + ben.properties.temporal.get("prop_float").values(), + [ + 2.0, + 3.0, + 2.0, + 3.0, + ], + ) check_arr(ben.history(), [1, 2, 3, 4, 5, 6]) assert ben.node_type == "person" check_arr(hamza.history(), [1, 2]) @@ -176,14 +180,17 @@ def test_add_edges(): ben_hammza = g.edge("ben", "hamza") hamza_lucas = g.edge("hamza", "lucas") lucas_hamza = g.edge("lucas", "hamza") - check_arr( ben_hammza.properties.temporal.get("prop_float").values() , [ - 2.0, - 3.0, - 2.0, - 3.0, - ]) - check_arr( ben_hammza.history() , [1, 2, 3, 4, 5, 6]) + check_arr( + ben_hammza.properties.temporal.get("prop_float").values(), + [ + 2.0, + 3.0, + 2.0, + 3.0, + ], + ) + check_arr(ben_hammza.history(), [1, 2, 3, 4, 5, 6]) assert ben_hammza.layer_names == ["_default", "test"] - check_arr( hamza_lucas.history() , [1, 2]) + check_arr(hamza_lucas.history(), [1, 2]) assert hamza_lucas.layer_names == ["_default"] helper_test_props(lucas_hamza.layer("_default"), lucas_props) diff --git a/python/tests/graphql/update_graph/test_edge_updates.py b/python/tests/graphql/update_graph/test_edge_updates.py index 9072614ae9..7f91abb8fc 100644 --- a/python/tests/graphql/update_graph/test_edge_updates.py +++ b/python/tests/graphql/update_graph/test_edge_updates.py @@ -5,6 +5,7 @@ from raphtory.graphql import GraphServer, RaphtoryClient from numpy.testing import assert_equal as check_arr + def make_props(): current_datetime = datetime.now(timezone.utc) naive_datetime = datetime.now() @@ -76,9 +77,9 @@ def test_add_updates(): g = client.receive_graph("path/to/event_graph") e = g.edge("ben", "hamza") helper_test_props(e, props) - check_arr( e.properties.temporal.get("prop_float").history() , [2, 3]) - check_arr( e.layer("test").properties.temporal.get("prop_float").history() , [2]) - check_arr( e.history() , [1, 2, 3, 4, 5, 6]) + check_arr(e.properties.temporal.get("prop_float").history(), [2, 3]) + check_arr(e.layer("test").properties.temporal.get("prop_float").history(), [2]) + check_arr(e.history(), [1, 2, 3, 4, 5, 6]) def test_add_constant_properties(): diff --git a/python/tests/graphql/update_graph/test_node_updates.py b/python/tests/graphql/update_graph/test_node_updates.py index 2deb8507eb..34c730dd70 100644 --- a/python/tests/graphql/update_graph/test_node_updates.py +++ b/python/tests/graphql/update_graph/test_node_updates.py @@ -69,7 +69,7 @@ def test_add_updates(): rg.node("ben").add_updates(4) g = client.receive_graph("path/to/event_graph") helper_test_props(g.node("ben"), props) - check_arr( g.node("ben").history() , [1, 2, 3, 4]) + check_arr(g.node("ben").history(), [1, 2, 3, 4]) def test_add_constant_properties(): diff --git a/python/tests/test_graphdb/test_latest_graph.py b/python/tests/test_graphdb/test_latest_graph.py index 5a769b62e7..8ff159b30b 100644 --- a/python/tests/test_graphdb/test_latest_graph.py +++ b/python/tests/test_graphdb/test_latest_graph.py @@ -157,7 +157,7 @@ def test_persistent_node_latest(): wg = g.window(5, 12) assert wg.latest_time == 11 assert wg.earliest_time == 5 - check_arr( wg.node(1).latest().history() , []) + check_arr(wg.node(1).latest().history(), []) - check_arr( g.nodes.latest().id.collect() , [1, 2, 3]) - check_arr( wg.nodes.latest().id.collect() , [1, 2]) + check_arr(g.nodes.latest().id.collect(), [1, 2, 3]) + check_arr(wg.nodes.latest().id.collect(), [1, 2]) diff --git a/raphtory/src/io/parquet_loaders.rs b/raphtory/src/io/parquet_loaders.rs index b192f5e43f..c15d30c059 100644 --- a/raphtory/src/io/parquet_loaders.rs +++ b/raphtory/src/io/parquet_loaders.rs @@ -12,6 +12,8 @@ use crate::{ serialise::incremental::InternalCache, }; use itertools::Itertools; +#[cfg(feature = "storage")] +use polars_arrow::array::StructArray; use polars_arrow::datatypes::{ArrowDataType as DataType, ArrowSchema, Field}; use polars_parquet::{ read, From 01eafb68b59652eb561a6dcf0fd6c63cf903adde Mon Sep 17 00:00:00 2001 From: Lucas Jeub Date: Thu, 7 Nov 2024 08:47:30 +0100 Subject: [PATCH 08/17] fix test comment --- python/tests/test_graphdb/test_iterables.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/tests/test_graphdb/test_iterables.py b/python/tests/test_graphdb/test_iterables.py index bba4be775d..035f719b96 100644 --- a/python/tests/test_graphdb/test_iterables.py +++ b/python/tests/test_graphdb/test_iterables.py @@ -61,7 +61,7 @@ def test_pyprophistvaluelist(): v = g.node("1") res = v.out_edges.properties.temporal.get( "value_dec" - ).values() # PyPropHistValueList([[10, 10, 10], [20], [2]]) + ).values() # PyPropHistValueList([[10, 10, 100], [20], [2, 1, 5]]) assert res.sum() == [120, 20, 8] assert res.min() == [10, 20, 1] assert res.max() == [100, 20, 5] From b3f3a7af03201cb920b60a11b0c080f10a5282cc Mon Sep 17 00:00:00 2001 From: Lucas Jeub Date: Thu, 7 Nov 2024 08:22:15 +0100 Subject: [PATCH 09/17] update latest python version to 3.13 --- .github/workflows/_release_python.yml | 15 +++++++++------ .github/workflows/test_python_workflow.yml | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/_release_python.yml b/.github/workflows/_release_python.yml index 9c045b345a..a06d365a07 100644 --- a/.github/workflows/_release_python.yml +++ b/.github/workflows/_release_python.yml @@ -27,7 +27,7 @@ jobs: - name: Install Protoc uses: arduino/setup-protoc@v3 with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Set up cargo cache uses: actions/cache@v3 continue-on-error: false @@ -50,13 +50,14 @@ jobs: 3.10 3.11 3.12 + 3.13 - name: Build wheels uses: PyO3/maturin-action@v1 with: working-directory: ./python command: build target: ${{ matrix.target }} - args: --release --out dist -i python3.8 -i python3.9 -i python3.10 -i python3.11 -i python3.12 + args: --release --out dist -i python3.8 -i python3.9 -i python3.10 -i python3.11 -i python3.12 -i python3.13 manylinux: 2_28 before-script-linux: | if [[ -f /etc/os-release ]]; then @@ -137,7 +138,7 @@ jobs: - name: Install Protoc uses: arduino/setup-protoc@v3 with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: actions/checkout@v3 with: ref: ${{ inputs.base }} @@ -149,6 +150,7 @@ jobs: 3.10 3.11 3.12 + 3.13 architecture: ${{ matrix.target }} - name: Build wheels uses: PyO3/maturin-action@v1 @@ -156,7 +158,7 @@ jobs: working-directory: ./python command: build target: ${{ matrix.target }} - args: --release --out dist -i python3.8 -i python3.9 -i python3.10 -i python3.11 -i python3.12 + args: --release --out dist -i python3.8 -i python3.9 -i python3.10 -i python3.11 -i python3.12 -i python3.13 - name: Upload wheels to gh artifact uses: actions/upload-artifact@v3 with: @@ -177,7 +179,7 @@ jobs: - name: Install Protoc uses: arduino/setup-protoc@v3 with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Set up cargo cache uses: actions/cache@v3 continue-on-error: false @@ -200,13 +202,14 @@ jobs: 3.10 3.11 3.12 + 3.13 - name: Build wheels uses: PyO3/maturin-action@v1 with: working-directory: ./python command: build target: ${{ matrix.target }} - args: --release --out dist -i python3.8 -i python3.9 -i python3.10 -i python3.11 -i python3.12 + args: --release --out dist -i python3.8 -i python3.9 -i python3.10 -i python3.11 -i python3.12 -i python3.13 - name: Upload wheels to gh artifact uses: actions/upload-artifact@v3 with: diff --git a/.github/workflows/test_python_workflow.yml b/.github/workflows/test_python_workflow.yml index ee33eaaf32..d4fd678025 100644 --- a/.github/workflows/test_python_workflow.yml +++ b/.github/workflows/test_python_workflow.yml @@ -19,7 +19,7 @@ jobs: steps: - id: set-matrix run: | - echo "python-versions=[\"3.8\",\"3.12\"]" >> $GITHUB_OUTPUT + echo "python-versions=[\"3.8\",\"3.13\"]" >> $GITHUB_OUTPUT python-test: if: ${{ !inputs.skip_tests }} name: Python Tests From 23d1c3e426b99af79ac16e1f2fa4a81a509ae3d0 Mon Sep 17 00:00:00 2001 From: Lucas Jeub Date: Thu, 7 Nov 2024 09:16:43 +0100 Subject: [PATCH 10/17] update pyarrow requirement and drop python 3.8 --- .github/workflows/_release_python.yml | 9 +++------ .github/workflows/test_python_workflow.yml | 2 +- python/pyproject.toml | 4 ++-- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/_release_python.yml b/.github/workflows/_release_python.yml index a06d365a07..330a2f0769 100644 --- a/.github/workflows/_release_python.yml +++ b/.github/workflows/_release_python.yml @@ -45,7 +45,6 @@ jobs: - uses: actions/setup-python@v4 with: python-version: | - 3.8 3.9 3.10 3.11 @@ -57,7 +56,7 @@ jobs: working-directory: ./python command: build target: ${{ matrix.target }} - args: --release --out dist -i python3.8 -i python3.9 -i python3.10 -i python3.11 -i python3.12 -i python3.13 + args: --release --out dist -i python3.9 -i python3.10 -i python3.11 -i python3.12 -i python3.13 manylinux: 2_28 before-script-linux: | if [[ -f /etc/os-release ]]; then @@ -145,7 +144,6 @@ jobs: - uses: actions/setup-python@v4 with: python-version: | - 3.8 3.9 3.10 3.11 @@ -158,7 +156,7 @@ jobs: working-directory: ./python command: build target: ${{ matrix.target }} - args: --release --out dist -i python3.8 -i python3.9 -i python3.10 -i python3.11 -i python3.12 -i python3.13 + args: --release --out dist -i python3.9 -i python3.10 -i python3.11 -i python3.12 -i python3.13 - name: Upload wheels to gh artifact uses: actions/upload-artifact@v3 with: @@ -197,7 +195,6 @@ jobs: - uses: actions/setup-python@v4 with: python-version: | - 3.8 3.9 3.10 3.11 @@ -209,7 +206,7 @@ jobs: working-directory: ./python command: build target: ${{ matrix.target }} - args: --release --out dist -i python3.8 -i python3.9 -i python3.10 -i python3.11 -i python3.12 -i python3.13 + args: --release --out dist -i python3.9 -i python3.10 -i python3.11 -i python3.12 -i python3.13 - name: Upload wheels to gh artifact uses: actions/upload-artifact@v3 with: diff --git a/.github/workflows/test_python_workflow.yml b/.github/workflows/test_python_workflow.yml index d4fd678025..602e25115a 100644 --- a/.github/workflows/test_python_workflow.yml +++ b/.github/workflows/test_python_workflow.yml @@ -19,7 +19,7 @@ jobs: steps: - id: set-matrix run: | - echo "python-versions=[\"3.8\",\"3.13\"]" >> $GITHUB_OUTPUT + echo "python-versions=[\"3.9\",\"3.13\"]" >> $GITHUB_OUTPUT python-test: if: ${{ !inputs.skip_tests }} name: Python Tests diff --git a/python/pyproject.toml b/python/pyproject.toml index 77fbe896ca..006f5fbb74 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "raphtory" -requires-python = ">=3.8" +requires-python = ">=3.9" dynamic = ["version"] classifiers = [ "Programming Language :: Rust", @@ -15,7 +15,7 @@ dependencies = [ "pyvis >= 0.3.2", "networkx >= 2.6.3", "pandas >= 2.0.3", - "pyarrow >=14.0.1, <16", + "pyarrow >=18", "requests >= 2.31.0", "gql[all] == 3.5.0", "matplotlib >= 3.4.3", From 4abcc0263c60fbc535d1f6d8bc490a01ffef4b8a Mon Sep 17 00:00:00 2001 From: Lucas Jeub Date: Thu, 7 Nov 2024 10:20:54 +0100 Subject: [PATCH 11/17] fix for numpy >= 2.0 --- Cargo.lock | 1417 ++++++++++++--------- python/pyproject.toml | 1 + python/tests/test_graphdb/test_graphdb.py | 2 +- 3 files changed, 848 insertions(+), 572 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 245dc2855e..1bb4ca98f0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,19 +14,13 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - [[package]] name = "adler2" version = "2.0.0" @@ -141,9 +135,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstream" -version = "0.6.15" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", @@ -156,49 +150,49 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.4" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" [[package]] name = "arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" dependencies = [ "derive_arbitrary", ] @@ -215,11 +209,17 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf7d0a018de4f6aa429b9d33d69edf69072b1c5b1cb8d3e4a5f7ef898fc3eb76" +[[package]] +name = "arraydeque" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d902e3d592a523def97af8f317b08ce16b7ab854c1985a0c671e6f15cebc236" + [[package]] name = "arrayref" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" @@ -234,16 +234,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05048a8932648b63f21c37d88b552ccc8a65afb6dfe9fc9f30ce79174c2e7a85" dependencies = [ "arrow-arith", - "arrow-array", - "arrow-buffer", + "arrow-array 52.2.0", + "arrow-buffer 52.2.0", "arrow-cast", "arrow-csv", - "arrow-data", + "arrow-data 52.2.0", "arrow-ipc", "arrow-json", "arrow-ord", "arrow-row", - "arrow-schema", + "arrow-schema 52.2.0", "arrow-select", "arrow-string", ] @@ -254,10 +254,10 @@ version = "52.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d8a57966e43bfe9a3277984a14c24ec617ad874e4c0e1d2a1b083a39cfbf22c" dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", + "arrow-array 52.2.0", + "arrow-buffer 52.2.0", + "arrow-data 52.2.0", + "arrow-schema 52.2.0", "chrono", "half", "num", @@ -270,9 +270,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16f4a9468c882dc66862cef4e1fd8423d47e67972377d85d80e022786427768c" dependencies = [ "ahash", - "arrow-buffer", - "arrow-data", - "arrow-schema", + "arrow-buffer 52.2.0", + "arrow-data 52.2.0", + "arrow-schema 52.2.0", "chrono", "chrono-tz 0.9.0", "half", @@ -280,6 +280,22 @@ dependencies = [ "num", ] +[[package]] +name = "arrow-array" +version = "53.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d39387ca628be747394890a6e47f138ceac1aa912eab64f02519fed24b637af8" +dependencies = [ + "ahash", + "arrow-buffer 53.2.0", + "arrow-data 53.2.0", + "arrow-schema 53.2.0", + "chrono", + "half", + "hashbrown 0.14.5", + "num", +] + [[package]] name = "arrow-buffer" version = "52.2.0" @@ -291,16 +307,27 @@ dependencies = [ "num", ] +[[package]] +name = "arrow-buffer" +version = "53.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e51e05228852ffe3eb391ce7178a0f97d2cf80cc6ef91d3c4a6b3cb688049ec" +dependencies = [ + "bytes", + "half", + "num", +] + [[package]] name = "arrow-cast" version = "52.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da26719e76b81d8bc3faad1d4dbdc1bcc10d14704e63dc17fc9f3e7e1e567c8e" dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", + "arrow-array 52.2.0", + "arrow-buffer 52.2.0", + "arrow-data 52.2.0", + "arrow-schema 52.2.0", "arrow-select", "atoi", "base64 0.22.1", @@ -318,11 +345,11 @@ version = "52.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c13c36dc5ddf8c128df19bab27898eea64bf9da2b555ec1cd17a8ff57fba9ec2" dependencies = [ - "arrow-array", - "arrow-buffer", + "arrow-array 52.2.0", + "arrow-buffer 52.2.0", "arrow-cast", - "arrow-data", - "arrow-schema", + "arrow-data 52.2.0", + "arrow-schema 52.2.0", "chrono", "csv", "csv-core", @@ -337,8 +364,20 @@ version = "52.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd9d6f18c65ef7a2573ab498c374d8ae364b4a4edf67105357491c031f716ca5" dependencies = [ - "arrow-buffer", - "arrow-schema", + "arrow-buffer 52.2.0", + "arrow-schema 52.2.0", + "half", + "num", +] + +[[package]] +name = "arrow-data" +version = "53.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98ae0af50890b494cebd7d6b04b35e896205c1d1df7b29a6272c5d0d0249ef5" +dependencies = [ + "arrow-buffer 53.2.0", + "arrow-schema 53.2.0", "half", "num", ] @@ -349,11 +388,11 @@ version = "52.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e786e1cdd952205d9a8afc69397b317cfbb6e0095e445c69cda7e8da5c1eeb0f" dependencies = [ - "arrow-array", - "arrow-buffer", + "arrow-array 52.2.0", + "arrow-buffer 52.2.0", "arrow-cast", - "arrow-data", - "arrow-schema", + "arrow-data 52.2.0", + "arrow-schema 52.2.0", "flatbuffers", "lz4_flex", ] @@ -364,14 +403,14 @@ version = "52.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb22284c5a2a01d73cebfd88a33511a3234ab45d66086b2ca2d1228c3498e445" dependencies = [ - "arrow-array", - "arrow-buffer", + "arrow-array 52.2.0", + "arrow-buffer 52.2.0", "arrow-cast", - "arrow-data", - "arrow-schema", + "arrow-data 52.2.0", + "arrow-schema 52.2.0", "chrono", "half", - "indexmap 2.4.0", + "indexmap 2.6.0", "lexical-core", "num", "serde", @@ -384,10 +423,10 @@ version = "52.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42745f86b1ab99ef96d1c0bcf49180848a64fe2c7a7a0d945bc64fa2b21ba9bc" dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", + "arrow-array 52.2.0", + "arrow-buffer 52.2.0", + "arrow-data 52.2.0", + "arrow-schema 52.2.0", "arrow-select", "half", "num", @@ -400,10 +439,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cd09a518c602a55bd406bcc291a967b284cfa7a63edfbf8b897ea4748aad23c" dependencies = [ "ahash", - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", + "arrow-array 52.2.0", + "arrow-buffer 52.2.0", + "arrow-data 52.2.0", + "arrow-schema 52.2.0", "half", ] @@ -413,6 +452,12 @@ version = "52.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e972cd1ff4a4ccd22f86d3e53e835c2ed92e0eea6a3e8eadb72b4f1ac802cf8" +[[package]] +name = "arrow-schema" +version = "53.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "539ada65246b949bd99ffa0881a9a15a4a529448af1a07a9838dd78617dafab1" + [[package]] name = "arrow-select" version = "52.2.0" @@ -420,10 +465,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "600bae05d43483d216fb3494f8c32fdbefd8aa4e1de237e790dbb3d9f44690a3" dependencies = [ "ahash", - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", + "arrow-array 52.2.0", + "arrow-buffer 52.2.0", + "arrow-data 52.2.0", + "arrow-schema 52.2.0", "num", ] @@ -433,15 +478,15 @@ version = "52.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0dc1985b67cb45f6606a248ac2b4a288849f196bab8c657ea5589f47cdd55e6" dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", + "arrow-array 52.2.0", + "arrow-buffer 52.2.0", + "arrow-data 52.2.0", + "arrow-schema 52.2.0", "arrow-select", "memchr", "num", "regex", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", ] [[package]] @@ -452,9 +497,9 @@ checksum = "71938f30533e4d95a6d17aa530939da3842c2ab6f4f84b9dae68447e4129f74a" [[package]] name = "async-compression" -version = "0.4.12" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fec134f64e2bc57411226dfc4e52dec859ddfc7e711fc5e07b612584f000e4aa" +checksum = "0cb8f1d480b0ea3783ab015936d2a55c87e219676f0c0b7dec61494043f21857" dependencies = [ "bzip2", "flate2", @@ -496,7 +541,7 @@ dependencies = [ "futures-util", "handlebars", "http 1.1.0", - "indexmap 2.4.0", + "indexmap 2.6.0", "mime", "multer", "num-traits", @@ -513,26 +558,26 @@ dependencies = [ [[package]] name = "async-graphql-derive" -version = "7.0.7" +version = "7.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e2e26a6b44bc61df3ca8546402cf9204c28e30c06084cc8e75cd5e34d4f150" +checksum = "a94c2d176893486bd37cd1b6defadd999f7357bf5804e92f510c08bcf16c538f" dependencies = [ "Inflector", "async-graphql-parser", "darling", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", "strum", - "syn 2.0.75", + "syn 2.0.87", "thiserror", ] [[package]] name = "async-graphql-parser" -version = "7.0.7" +version = "7.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f801451484b4977d6fe67b29030f81353cabdcbb754e5a064f39493582dac0cf" +checksum = "79272bdbf26af97866e149f05b2b546edb5c00e51b5f916289931ed233e208ad" dependencies = [ "async-graphql-value", "pest", @@ -559,12 +604,12 @@ dependencies = [ [[package]] name = "async-graphql-value" -version = "7.0.7" +version = "7.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69117c43c01d81a69890a9f5dd6235f2f027ca8d1ec62d6d3c5e01ca0edb4f2b" +checksum = "ef5ec94176a12a8cbe985cd73f2e54dc9c702c88c766bdef12f1f3a67cedbee1" dependencies = [ "bytes", - "indexmap 2.4.0", + "indexmap 2.6.0", "serde", "serde_json", ] @@ -583,7 +628,7 @@ dependencies = [ "eventsource-stream", "futures", "rand", - "reqwest 0.12.8", + "reqwest 0.12.9", "reqwest-eventsource", "secrecy", "serde", @@ -597,9 +642,9 @@ dependencies = [ [[package]] name = "async-stream" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" dependencies = [ "async-stream-impl", "futures-core", @@ -608,24 +653,24 @@ dependencies = [ [[package]] name = "async-stream-impl" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] name = "async-trait" -version = "0.1.81" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -651,15 +696,15 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "axum" -version = "0.7.5" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" +checksum = "504e3947307ac8326a5437504c517c4b56716c9d98fac0028c2acc7ca47d70ae" dependencies = [ "async-trait", "axum-core", @@ -677,16 +722,16 @@ dependencies = [ "rustversion", "serde", "sync_wrapper 1.0.1", - "tower", + "tower 0.5.1", "tower-layer", "tower-service", ] [[package]] name = "axum-core" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" dependencies = [ "async-trait", "bytes", @@ -697,7 +742,7 @@ dependencies = [ "mime", "pin-project-lite", "rustversion", - "sync_wrapper 0.1.2", + "sync_wrapper 1.0.1", "tower-layer", "tower-service", ] @@ -718,17 +763,17 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", - "miniz_oxide 0.7.4", + "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -887,22 +932,22 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94bbb0ad554ad961ddc5da507a12a29b14e4ae5bda06b19f575a3e6079d2e2ae" +checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.7.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc8b54b395f2fcfbb3d90c47b01c7f444d94d05bdeb775811dec868ac3bbc26" +checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -913,9 +958,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" dependencies = [ "serde", ] @@ -976,6 +1021,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "chrono" version = "0.4.38" @@ -1074,9 +1125,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.16" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" dependencies = [ "clap_builder", "clap_derive", @@ -1084,9 +1135,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.15" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" dependencies = [ "anstream", "anstyle", @@ -1096,14 +1147,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.13" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -1123,9 +1174,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "comfy-table" @@ -1141,14 +1192,13 @@ dependencies = [ [[package]] name = "config" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7328b20597b53c2454f0b1919720c25c7339051c02b72b7e05409e00b14132be" +checksum = "68578f196d2a33ff61b27fae256c3164f65e36382648e30666dde05b8cc9dfdf" dependencies = [ "async-trait", "convert_case", "json5", - "lazy_static", "nom", "pathdiff", "ron", @@ -1156,7 +1206,7 @@ dependencies = [ "serde", "serde_json", "toml", - "yaml-rust", + "yaml-rust2", ] [[package]] @@ -1191,9 +1241,9 @@ dependencies = [ [[package]] name = "constant_time_eq" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "convert_case" @@ -1240,9 +1290,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] @@ -1431,7 +1481,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -1442,7 +1492,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -1460,9 +1510,9 @@ dependencies = [ [[package]] name = "dashmap" -version = "6.0.1" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "804c8821570c3f8b70230c2ba75ffa5c0f9a4189b9a432b6656c536712acae28" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" dependencies = [ "cfg-if", "crossbeam-utils", @@ -1487,9 +1537,9 @@ checksum = "ab9d55a9cd2634818953809f75ebe5248b00dd43c3227efb2a51a2d5feaad54e" dependencies = [ "ahash", "arrow", - "arrow-array", + "arrow-array 52.2.0", "arrow-ipc", - "arrow-schema", + "arrow-schema 52.2.0", "async-compression", "async-trait", "bytes", @@ -1513,7 +1563,7 @@ dependencies = [ "glob", "half", "hashbrown 0.14.5", - "indexmap 2.4.0", + "indexmap 2.6.0", "itertools 0.12.1", "log", "num_cpus", @@ -1541,9 +1591,9 @@ checksum = "def66b642959e7f96f5d2da22e1f43d3bd35598f821e5ce351a0553e0f1b7367" dependencies = [ "ahash", "arrow", - "arrow-array", - "arrow-buffer", - "arrow-schema", + "arrow-array 52.2.0", + "arrow-buffer 52.2.0", + "arrow-schema 52.2.0", "chrono", "half", "hashbrown 0.14.5", @@ -1593,8 +1643,8 @@ checksum = "2103d2cc16fb11ef1fa993a6cac57ed5cb028601db4b97566c90e5fa77aa1e68" dependencies = [ "ahash", "arrow", - "arrow-array", - "arrow-buffer", + "arrow-array 52.2.0", + "arrow-buffer 52.2.0", "chrono", "datafusion-common", "paste", @@ -1638,7 +1688,7 @@ checksum = "92718db1aff70c47e5abf9fc975768530097059e5db7c7b78cd64b5e9a11fc77" dependencies = [ "ahash", "arrow", - "arrow-schema", + "arrow-schema 52.2.0", "datafusion-common", "datafusion-execution", "datafusion-expr", @@ -1655,10 +1705,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30bb80f46ff3dcf4bb4510209c2ba9b8ce1b716ac8b7bf70c6bf7dca6260c831" dependencies = [ "arrow", - "arrow-array", - "arrow-buffer", + "arrow-array 52.2.0", + "arrow-buffer 52.2.0", "arrow-ord", - "arrow-schema", + "arrow-schema 52.2.0", "datafusion-common", "datafusion-execution", "datafusion-expr", @@ -1682,11 +1732,11 @@ dependencies = [ "datafusion-expr", "datafusion-physical-expr", "hashbrown 0.14.5", - "indexmap 2.4.0", + "indexmap 2.6.0", "itertools 0.12.1", "log", "paste", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", ] [[package]] @@ -1697,10 +1747,10 @@ checksum = "45538630defedb553771434a437f7ca8f04b9b3e834344aafacecb27dc65d5e5" dependencies = [ "ahash", "arrow", - "arrow-array", - "arrow-buffer", + "arrow-array 52.2.0", + "arrow-buffer 52.2.0", "arrow-ord", - "arrow-schema", + "arrow-schema 52.2.0", "arrow-string", "base64 0.22.1", "chrono", @@ -1711,7 +1761,7 @@ dependencies = [ "half", "hashbrown 0.14.5", "hex", - "indexmap 2.4.0", + "indexmap 2.6.0", "itertools 0.12.1", "log", "paste", @@ -1741,10 +1791,10 @@ checksum = "b504eae6107a342775e22e323e9103f7f42db593ec6103b28605b7b7b1405c4a" dependencies = [ "ahash", "arrow", - "arrow-array", - "arrow-buffer", + "arrow-array 52.2.0", + "arrow-buffer 52.2.0", "arrow-ord", - "arrow-schema", + "arrow-schema 52.2.0", "async-trait", "chrono", "datafusion-common", @@ -1757,7 +1807,7 @@ dependencies = [ "futures", "half", "hashbrown 0.14.5", - "indexmap 2.4.0", + "indexmap 2.6.0", "itertools 0.12.1", "log", "once_cell", @@ -1774,8 +1824,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5db33f323f41b95ae201318ba654a9bf11113e58a51a1dff977b1a836d3d889" dependencies = [ "arrow", - "arrow-array", - "arrow-schema", + "arrow-array 52.2.0", + "arrow-schema 52.2.0", "datafusion-common", "datafusion-expr", "log", @@ -1832,44 +1882,44 @@ dependencies = [ [[package]] name = "derive_arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] name = "derive_builder" -version = "0.20.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0350b5cb0331628a5916d6c5c0b72e97393b8b6b03b47a9284f4e7f5a405ffd7" +checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" dependencies = [ "derive_builder_macro", ] [[package]] name = "derive_builder_core" -version = "0.20.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d48cda787f839151732d396ac69e3473923d54312c070ee21e9effcaa8ca0b1d" +checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] name = "derive_builder_macro" -version = "0.20.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b" +checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -1891,9 +1941,9 @@ dependencies = [ [[package]] name = "display-error-chain" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d305e5a3904ee14166439a70feef04853c1234226dbb27ede127b88dc5a4a9d" +checksum = "0bc2146e86bc19f52f4c064a64782f05f139ca464ed72937301631e73f8d6cf5" [[package]] name = "displaydoc" @@ -1903,7 +1953,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -1961,7 +2011,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", "thiserror", ] @@ -1973,9 +2023,9 @@ checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -1989,7 +2039,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -2070,15 +2120,15 @@ dependencies = [ [[package]] name = "fastdivide" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59668941c55e5c186b8b58c391629af56774ec768f73c08bbcd56f09348eb00b" +checksum = "9afc2bd4d5a73106dd53d10d73d3401c2f32730ba2c0b93ddb888a8983680471" [[package]] name = "fastrand" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "fixedbitset" @@ -2098,12 +2148,12 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.32" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c0596c1eac1f9e04ed902702e9878208b336edc9d6fddc8a48387349bab3666" +checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" dependencies = [ "crc32fast", - "miniz_oxide 0.8.0", + "miniz_oxide", ] [[package]] @@ -2145,9 +2195,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -2160,9 +2210,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -2170,15 +2220,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -2187,32 +2237,32 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-timer" @@ -2222,9 +2272,9 @@ checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -2273,15 +2323,15 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glam" -version = "0.29.0" +version = "0.29.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28091a37a5d09b555cb6628fd954da299b536433834f5b8e59eba78e0cbbf8a" +checksum = "dc46dd3ec48fdd8e693a98d2b8bafae273a2d54c1de02a2a7e3d57d501f39677" [[package]] name = "glob" @@ -2301,7 +2351,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.4.0", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", @@ -2320,7 +2370,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.1.0", - "indexmap 2.4.0", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", @@ -2358,12 +2408,6 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" - [[package]] name = "hashbrown" version = "0.14.5" @@ -2386,6 +2430,15 @@ dependencies = [ "foldhash", ] +[[package]] +name = "hashlink" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +dependencies = [ + "hashbrown 0.14.5", +] + [[package]] name = "headers" version = "0.4.0" @@ -2531,9 +2584,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -2549,9 +2602,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.30" +version = "0.14.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" dependencies = [ "bytes", "futures-channel", @@ -2573,9 +2626,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" dependencies = [ "bytes", "futures-channel", @@ -2600,7 +2653,7 @@ checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http 0.2.12", - "hyper 0.14.30", + "hyper 0.14.31", "rustls 0.21.12", "tokio", "tokio-rustls 0.24.1", @@ -2608,30 +2661,30 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", "http 1.1.0", - "hyper 1.4.1", + "hyper 1.5.0", "hyper-util", - "rustls 0.23.12", - "rustls-native-certs 0.7.2", + "rustls 0.23.16", + "rustls-native-certs 0.8.0", "rustls-pki-types", "tokio", "tokio-rustls 0.26.0", "tower-service", - "webpki-roots 0.26.3", + "webpki-roots 0.26.6", ] [[package]] name = "hyper-timeout" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" +checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ - "hyper 1.4.1", + "hyper 1.5.0", "hyper-util", "pin-project-lite", "tokio", @@ -2640,29 +2693,28 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.7" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", "futures-util", "http 1.1.0", "http-body 1.0.1", - "hyper 1.4.1", + "hyper 1.5.0", "pin-project-lite", "socket2", "tokio", - "tower", "tower-service", "tracing", ] [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -2681,6 +2733,124 @@ dependencies = [ "cc", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -2689,12 +2859,23 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] @@ -2709,12 +2890,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.4.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.1", "serde", ] @@ -2759,9 +2940,9 @@ checksum = "f958d3d68f4167080a18141e10381e7634563984a537f2a49a30fd8e53ac5767" [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "is-terminal" @@ -2847,9 +3028,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -2968,21 +3149,15 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.158" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] name = "libm" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" - -[[package]] -name = "linked-hash-map" -version = "0.5.6" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] name = "linux-raw-sys" @@ -2990,6 +3165,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litemap" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" + [[package]] name = "lock_api" version = "0.4.12" @@ -3015,28 +3196,27 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lru" -version = "0.12.4" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ee39891760e7d94734f6f63fedc29a2e4a152f836120753a72503f09fcf904" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown 0.14.5", + "hashbrown 0.15.1", ] [[package]] name = "lz4" -version = "1.26.0" +version = "1.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958b4caa893816eea05507c20cfe47574a43d9a697138a7872990bba8a0ece68" +checksum = "4d1febb2b4a79ddd1980eede06a8f7902197960aa0383ffcfdd62fe723036725" dependencies = [ - "libc", "lz4-sys", ] [[package]] name = "lz4-sys" -version = "1.10.0" +version = "1.11.1+lz4-1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109de74d5d2353660401699a4174a4ff23fcc649caf553df71933c7fb45ad868" +checksum = "6bd8c0d6c6ed0cd30b3652886bb8711dc4bb01d637a68105a3d5158039b418e6" dependencies = [ "cc", "libc", @@ -3134,9 +3314,9 @@ dependencies = [ [[package]] name = "memmap2" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" +checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" dependencies = [ "libc", ] @@ -3168,9 +3348,9 @@ dependencies = [ [[package]] name = "minicov" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c71e683cd655513b99affab7d317deb690528255a0d5f717f1024093c12b169" +checksum = "f27fe9f1cc3c22e1687f9446c2083c4c5fc7f0bcf1c7a86bdbded14985895b4b" dependencies = [ "cc", "walkdir", @@ -3178,18 +3358,18 @@ dependencies = [ [[package]] name = "minijinja" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d7d3e3a3eece1fa4618237ad41e1de855ced47eab705cec1c9a920e1d1c5aad" +checksum = "c9ca8daf4b0b4029777f1bc6e1aedd1aec7b74c276a43bc6f620a8e1a1c0a90e" dependencies = [ "serde", ] [[package]] name = "minijinja-contrib" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744a2b84dbd22398e347594ed2aef9d3f1b948934e3e6e94ef69ecd39d597f4b" +checksum = "39ffd46ee854be23604a20efd6c9655374fefbe4d44b949dc0f907305d92873a" dependencies = [ "minijinja", "serde", @@ -3202,15 +3382,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -[[package]] -name = "miniz_oxide" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" -dependencies = [ - "adler", -] - [[package]] name = "miniz_oxide" version = "0.8.0" @@ -3304,14 +3475,16 @@ checksum = "2195bf6aa996a481483b29d62a7663eed3fe39600c460e323f8ff41e90bdd89b" [[package]] name = "ndarray" -version = "0.15.6" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb12d4e967ec485a5f71c6311fe28158e9d6f4bc4a447b474184d0f91a8fa32" +checksum = "882ed72dce9365842bf196bdeedf5055305f11fc8c03dee7bb0194a6cad34841" dependencies = [ "matrixmultiply", "num-complex", "num-integer", "num-traits", + "portable-atomic", + "portable-atomic-util", "rawpointer", ] @@ -3333,14 +3506,14 @@ dependencies = [ "neo4rs-macros", "paste", "pin-project-lite", - "rustls-native-certs 0.7.2", - "rustls-pemfile 2.1.3", + "rustls-native-certs 0.7.3", + "rustls-pemfile 2.2.0", "serde", "thiserror", "tokio", "tokio-rustls 0.26.0", "url", - "webpki-roots 0.26.3", + "webpki-roots 0.26.6", ] [[package]] @@ -3350,7 +3523,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53a0d57c55d2d1dc62a2b1d16a0a1079eb78d67c36bdf468d582ab4482ec7002" dependencies = [ "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -3361,7 +3534,7 @@ checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" dependencies = [ "bitflags 2.6.0", "cfg-if", - "cfg_aliases", + "cfg_aliases 0.1.1", "libc", ] @@ -3512,9 +3685,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.3" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] @@ -3542,9 +3715,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "oneshot" @@ -3646,21 +3819,21 @@ dependencies = [ [[package]] name = "ordered-float" -version = "4.2.2" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a91171844676f8c7990ce64959210cd2eaef32c2612c50f9fae9f8aaa6065a6" +checksum = "c65ee1f9701bf938026630b455d5315f490640234259037edb259798b3bcf85e" dependencies = [ "num-traits", ] [[package]] name = "ordered-multimap" -version = "0.6.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ed8acf08e98e744e5384c8bc63ceb0364e68a6854187221c18df61c4797690e" +checksum = "49203cdcae0030493bad186b28da2fa25645fa276a51b6fec8010d281e02ef79" dependencies = [ "dlv-list", - "hashbrown 0.13.2", + "hashbrown 0.14.5", ] [[package]] @@ -3685,7 +3858,7 @@ dependencies = [ "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -3733,12 +3906,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e977b9066b4d3b03555c22bdc442f3fadebd96a39111249113087d0edb2691cd" dependencies = [ "ahash", - "arrow-array", - "arrow-buffer", + "arrow-array 52.2.0", + "arrow-buffer 52.2.0", "arrow-cast", - "arrow-data", + "arrow-data 52.2.0", "arrow-ipc", - "arrow-schema", + "arrow-schema 52.2.0", "arrow-select", "base64 0.22.1", "brotli 6.0.0", @@ -3785,9 +3958,9 @@ checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pathdiff" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" +checksum = "d61c5ce1153ab5b689d0c074c4e7fc613e942dfb7dd9eea5ab202d2ad91fe361" [[package]] name = "pbkdf2" @@ -3817,9 +3990,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.11" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95" +checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" dependencies = [ "memchr", "thiserror", @@ -3828,9 +4001,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.11" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a548d2beca6773b1c244554d36fcf8548a8a58e74156968211567250e48e49a" +checksum = "d214365f632b123a47fd913301e14c946c61d1c183ee245fa76eb752e59a02dd" dependencies = [ "pest", "pest_generator", @@ -3838,22 +4011,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.11" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c93a82e8d145725dcbaf44e5ea887c8a869efdcc28706df2d08c69e17077183" +checksum = "eb55586734301717aea2ac313f50b2eb8f60d2fc3dc01d190eefa2e625f60c4e" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] name = "pest_meta" -version = "2.7.11" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a941429fea7e08bedec25e4f6785b6ffaacc6b755da98df5ef3e7dcf4a124c4f" +checksum = "b75da2a70cf4d9cb76833c990ac9cd3923c9a8905a8929789ce347c84564d03d" dependencies = [ "once_cell", "pest", @@ -3867,7 +4040,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.4.0", + "indexmap 2.6.0", ] [[package]] @@ -3910,29 +4083,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -3942,9 +4115,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "planus" @@ -3957,9 +4130,9 @@ dependencies = [ [[package]] name = "plotters" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15b6eccb8484002195a3e44fe65a4ce8e93a625797a063735536fd59cb01cf3" +checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" dependencies = [ "num-traits", "plotters-backend", @@ -3970,15 +4143,15 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "414cec62c6634ae900ea1c56128dfe87cf63e7caece0852ec76aba307cebadb7" +checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" [[package]] name = "plotters-svg" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b30686a7d9c3e010b84284bdd26a29f2138574f52f5eb6f794fc0ad924e705" +checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" dependencies = [ "plotters-backend", ] @@ -3997,7 +4170,7 @@ dependencies = [ "headers", "http 1.1.0", "http-body-util", - "hyper 1.4.1", + "hyper 1.5.0", "hyper-util", "mime", "nix", @@ -4023,14 +4196,14 @@ dependencies = [ [[package]] name = "poem-derive" -version = "3.0.4" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62fea1692d80a000126f9b28d865012a160b80000abb53ccf152b428222c155" +checksum = "cdfed15c1102d2a9a51b9f1aba945628c72ccb52fc5d3e4ad4ffbbd222e11821" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -4040,10 +4213,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "725b09f2b5ef31279b66e27bbab63c58d49d8f6696b66b1f46c7eaab95e80f75" dependencies = [ "ahash", - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", + "arrow-array 53.2.0", + "arrow-buffer 53.2.0", + "arrow-data 53.2.0", + "arrow-schema 53.2.0", "atoi_simd", "bytemuck", "chrono", @@ -4105,7 +4278,7 @@ dependencies = [ "comfy-table", "either", "hashbrown 0.14.5", - "indexmap 2.4.0", + "indexmap 2.6.0", "num-traits", "once_cell", "polars-arrow", @@ -4202,7 +4375,7 @@ dependencies = [ "ahash", "bytemuck", "hashbrown 0.14.5", - "indexmap 2.4.0", + "indexmap 2.6.0", "num-traits", "once_cell", "polars-error", @@ -4231,9 +4404,18 @@ version = "0.13.1" [[package]] name = "portable-atomic" -version = "1.7.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" + +[[package]] +name = "portable-atomic-util" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90a7d5beecc52a491b54d6dd05c7a45ba1801666a5baad9fdbfc6fef8d2d206c" +dependencies = [ + "portable-atomic", +] [[package]] name = "powerfmt" @@ -4252,22 +4434,22 @@ dependencies = [ [[package]] name = "pretty_assertions" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" +checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" dependencies = [ "diff", - "yansi 0.5.1", + "yansi", ] [[package]] name = "prettyplease" -version = "0.2.20" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -4282,18 +4464,18 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.21.1", + "toml_edit 0.22.22", ] [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] @@ -4306,9 +4488,9 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", "version_check", - "yansi 1.0.1", + "yansi", ] [[package]] @@ -4325,7 +4507,7 @@ dependencies = [ "rand", "rand_chacha", "rand_xorshift", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", "rusty-fork", "tempfile", "unarray", @@ -4333,9 +4515,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.13.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13db3d3fde688c61e2446b4d843bc27a7e8af269a69440c0308021dc92333cc" +checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" dependencies = [ "bytes", "prost-derive", @@ -4343,9 +4525,9 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.13.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb182580f71dd070f88d01ce3de9f4da5021db7115d2e1c3605a754153b77c1" +checksum = "0c1318b19085f08681016926435853bbf7858f9c082d0999b80550ff5d9abe15" dependencies = [ "bytes", "heck 0.5.0", @@ -4358,37 +4540,37 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.75", + "syn 2.0.87", "tempfile", ] [[package]] name = "prost-derive" -version = "0.13.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18bec9b0adc4eba778b33684b7ba3e7137789434769ee3ce3930463ef904cfca" +checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" dependencies = [ "anyhow", "itertools 0.13.0", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] name = "prost-types" -version = "0.13.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee5168b05f49d4b0ca581206eb14a7b22fafd963efe729ac48eb03266e25cc2" +checksum = "4759aa0d3a6232fb8dbdb97b61de2c20047c68aca932c7ed76da9d788508d670" dependencies = [ "prost", ] [[package]] name = "psm" -version = "0.1.21" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" +checksum = "aa37f80ca58604976033fae9515a8a2989fc13797d953f7c04fb8fa36a11f205" dependencies = [ "cc", ] @@ -4442,7 +4624,7 @@ dependencies = [ "proc-macro2", "pyo3-macros-backend", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -4455,14 +4637,14 @@ dependencies = [ "proc-macro2", "pyo3-build-config", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] name = "quad-rand" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658fa1faf7a4cc5f057c9ee5ef560f717ad9d8dc66d975267f709624d6e1ab88" +checksum = "5a651516ddc9168ebd67b24afd085a718be02f8858fe406591b013d101ce2f40" [[package]] name = "quanta" @@ -4509,16 +4691,16 @@ dependencies = [ [[package]] name = "quinn" -version = "0.11.3" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b22d8e7369034b9a7132bc2008cac12f2013c8132b45e0554e6e20e2617f2156" +checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" dependencies = [ "bytes", "pin-project-lite", "quinn-proto", "quinn-udp", "rustc-hash 2.0.0", - "rustls 0.23.12", + "rustls 0.23.16", "socket2", "thiserror", "tokio", @@ -4527,15 +4709,15 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.6" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba92fb39ec7ad06ca2582c0ca834dfeadcaf06ddfc8e635c80aa7e1c05315fdd" +checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" dependencies = [ "bytes", "rand", "ring", "rustc-hash 2.0.0", - "rustls 0.23.12", + "rustls 0.23.16", "slab", "thiserror", "tinyvec", @@ -4544,22 +4726,23 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.4" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bffec3605b73c6f1754535084a85229fa8a30f86014e6c81aeec4abb68b0285" +checksum = "7d5a626c6807713b15cac82a6acaccd6043c9a5408c24baae07611fec3f243da" dependencies = [ + "cfg_aliases 0.2.1", "libc", "once_cell", "socket2", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -4624,7 +4807,7 @@ dependencies = [ "bzip2", "chrono", "csv", - "dashmap 6.0.1", + "dashmap 6.1.0", "display-error-chain", "dotenv", "either", @@ -4637,7 +4820,7 @@ dependencies = [ "itertools 0.13.0", "kdam", "lock_api", - "memmap2 0.9.4", + "memmap2 0.9.5", "minijinja", "minijinja-contrib", "neo4rs", @@ -4646,7 +4829,7 @@ dependencies = [ "num-traits", "numpy", "once_cell", - "ordered-float 4.2.2", + "ordered-float 4.5.0", "ouroboros", "parking_lot", "polars-arrow", @@ -4668,7 +4851,7 @@ dependencies = [ "raphtory-api", "rayon", "regex", - "reqwest 0.12.8", + "reqwest 0.12.9", "rustc-hash 2.0.0", "serde", "serde_json", @@ -4689,7 +4872,7 @@ version = "0.13.1" dependencies = [ "bytemuck", "chrono", - "dashmap 6.0.1", + "dashmap 6.1.0", "lock_api", "num-traits", "parking_lot", @@ -4731,9 +4914,9 @@ name = "raphtory-cypher" version = "0.13.1" dependencies = [ "arrow", - "arrow-array", - "arrow-buffer", - "arrow-schema", + "arrow-array 52.2.0", + "arrow-buffer 52.2.0", + "arrow-schema 52.2.0", "async-trait", "clap", "datafusion", @@ -4779,13 +4962,13 @@ dependencies = [ "opentelemetry", "opentelemetry-otlp", "opentelemetry_sdk", - "ordered-float 4.2.2", + "ordered-float 4.5.0", "parking_lot", "poem", "pyo3", "raphtory", "raphtory-api", - "reqwest 0.12.8", + "reqwest 0.12.9", "serde", "serde_json", "tempfile", @@ -4844,9 +5027,9 @@ dependencies = [ [[package]] name = "raw-cpuid" -version = "11.1.0" +version = "11.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb9ee317cfe3fbd54b36a511efc1edd42e216903c9cd575e686dd68a2ba90d8d" +checksum = "1ab240315c661615f2ee9f0f2cd32d5a7343a84d5ebcccb99d46e6637565e7b0" dependencies = [ "bitflags 2.6.0", ] @@ -4879,23 +5062,23 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.3" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ "bitflags 2.6.0", ] [[package]] name = "regex" -version = "1.10.6" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.4.8", + "regex-syntax 0.8.5", ] [[package]] @@ -4909,13 +5092,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", ] [[package]] @@ -4926,9 +5109,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" @@ -4944,7 +5127,7 @@ dependencies = [ "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.30", + "hyper 0.14.31", "hyper-rustls 0.24.2", "ipnet", "js-sys", @@ -4973,9 +5156,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.8" +version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" dependencies = [ "base64 0.22.1", "bytes", @@ -4985,8 +5168,8 @@ dependencies = [ "http 1.1.0", "http-body 1.0.1", "http-body-util", - "hyper 1.4.1", - "hyper-rustls 0.27.2", + "hyper 1.5.0", + "hyper-rustls 0.27.3", "hyper-util", "ipnet", "js-sys", @@ -4997,9 +5180,9 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.12", + "rustls 0.23.16", "rustls-native-certs 0.8.0", - "rustls-pemfile 2.1.3", + "rustls-pemfile 2.2.0", "rustls-pki-types", "serde", "serde_json", @@ -5014,7 +5197,7 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "webpki-roots 0.26.3", + "webpki-roots 0.26.6", "windows-registry", ] @@ -5030,7 +5213,7 @@ dependencies = [ "mime", "nom", "pin-project-lite", - "reqwest 0.12.8", + "reqwest 0.12.9", "thiserror", ] @@ -5078,9 +5261,9 @@ dependencies = [ [[package]] name = "rust-ini" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e2a3bcec1f113553ef1c88aae6c020a369d03d55b58de9869a0908930385091" +checksum = "3e0698206bcb8882bf2a9ecb4c1e7785db57ff052297085a6efd4fe42302068a" dependencies = [ "cfg-if", "ordered-multimap", @@ -5116,18 +5299,18 @@ checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "375116bee2be9ed569afe2154ea6a99dfdffd257f533f187498c2a8f5feaf4ee" dependencies = [ "bitflags 2.6.0", "errno", @@ -5150,26 +5333,26 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.12" +version = "0.23.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" +checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e" dependencies = [ "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.102.6", + "rustls-webpki 0.102.8", "subtle", "zeroize", ] [[package]] name = "rustls-native-certs" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04182dffc9091a404e0fc069ea5cd60e5b866c3adf881eff99a32d048242dffa" +checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" dependencies = [ "openssl-probe", - "rustls-pemfile 2.1.3", + "rustls-pemfile 2.2.0", "rustls-pki-types", "schannel", "security-framework", @@ -5182,7 +5365,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" dependencies = [ "openssl-probe", - "rustls-pemfile 2.1.3", + "rustls-pemfile 2.2.0", "rustls-pki-types", "schannel", "security-framework", @@ -5199,19 +5382,18 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.3" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" [[package]] name = "rustls-webpki" @@ -5225,9 +5407,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.6" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "ring", "rustls-pki-types", @@ -5236,9 +5418,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "rusty-fork" @@ -5269,11 +5451,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -5323,9 +5505,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.1" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" dependencies = [ "core-foundation-sys", "libc", @@ -5345,9 +5527,9 @@ checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" [[package]] name = "serde" -version = "1.0.208" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2" +checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" dependencies = [ "serde_derive", ] @@ -5365,20 +5547,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.208" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" +checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] name = "serde_json" -version = "1.0.125" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83c8e735a073ccf5be70aa8066aa984eaf2fa000db6c8d0100ae605b366d31ed" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ "itoa", "memchr", @@ -5398,9 +5580,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -5471,9 +5653,9 @@ checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" [[package]] name = "simdutf8" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "simple_asn1" @@ -5618,7 +5800,7 @@ checksum = "01b2e185515564f15375f593fb966b5718bc624ba77fe49fa4616ad619690554" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -5629,15 +5811,15 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "stacker" -version = "0.1.15" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce" +checksum = "799c883d55abdb5e98af1a7b3f23b9b6de8ecada0ecac058672d7635eb48ca7b" dependencies = [ "cc", "cfg-if", "libc", "psm", - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -5707,7 +5889,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -5729,9 +5911,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.75" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", @@ -5753,6 +5935,17 @@ dependencies = [ "futures-core", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "system-configuration" version = "0.5.1" @@ -5805,7 +5998,7 @@ dependencies = [ "lru", "lz4_flex", "measure_time", - "memmap2 0.9.4", + "memmap2 0.9.5", "num_cpus", "once_cell", "oneshot", @@ -5876,7 +6069,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d60769b80ad7953d8a7b2c70cdfe722bbcdcac6bccc8ac934c40c034d866fc18" dependencies = [ "byteorder", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", "utf8-ranges", ] @@ -5935,9 +6128,9 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tempfile" -version = "3.12.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if", "fastrand", @@ -5958,22 +6151,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "02dd99dc800bbb97186339685293e1cc5d9df1f8fae2d0aecd9ff1c77efea892" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "a7c61ec9a6f64d2793d8a45faba21efbe3ced62a886d44c36a009b2b519b4c7e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -6037,6 +6230,16 @@ dependencies = [ "crunchy", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinytemplate" version = "1.2.1" @@ -6089,7 +6292,7 @@ checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -6108,16 +6311,16 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.12", + "rustls 0.23.16", "rustls-pki-types", "tokio", ] [[package]] name = "tokio-stream" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" dependencies = [ "futures-core", "pin-project-lite", @@ -6138,9 +6341,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", @@ -6159,7 +6362,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.20", + "toml_edit 0.22.22", ] [[package]] @@ -6177,40 +6380,29 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.4.0", - "toml_datetime", - "winnow 0.5.40", -] - -[[package]] -name = "toml_edit" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" -dependencies = [ - "indexmap 2.4.0", + "indexmap 2.6.0", "toml_datetime", "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.22.20" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "indexmap 2.4.0", + "indexmap 2.6.0", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.18", + "winnow 0.6.20", ] [[package]] name = "tonic" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6f6ba989e4b2c58ae83d862d3a3e27690b6e3ae630d0deb59f3697f32aa88ad" +checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" dependencies = [ "async-stream", "async-trait", @@ -6221,7 +6413,7 @@ dependencies = [ "http 1.1.0", "http-body 1.0.1", "http-body-util", - "hyper 1.4.1", + "hyper 1.5.0", "hyper-timeout", "hyper-util", "percent-encoding", @@ -6230,7 +6422,7 @@ dependencies = [ "socket2", "tokio", "tokio-stream", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", "tracing", @@ -6256,6 +6448,20 @@ dependencies = [ "tracing", ] +[[package]] +name = "tower" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 0.1.2", + "tower-layer", + "tower-service", +] + [[package]] name = "tower-layer" version = "0.3.3" @@ -6287,7 +6493,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -6397,9 +6603,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" [[package]] name = "unarray" @@ -6418,45 +6624,27 @@ dependencies = [ [[package]] name = "unicase" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" [[package]] name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.23" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" -dependencies = [ - "tinyvec", -] +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unindent" @@ -6482,9 +6670,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.2" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada" dependencies = [ "form_urlencoded", "idna", @@ -6498,12 +6686,24 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + [[package]] name = "utf8-ranges" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fcfc827f90e53a02eaef5e535ee14266c1d569214c6aa70133a624d8a3164ba" +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.2" @@ -6512,9 +6712,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ "getrandom", "serde", @@ -6568,9 +6768,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", "once_cell", @@ -6579,24 +6779,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.43" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -6606,9 +6806,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6616,28 +6816,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "wasm-bindgen-test" -version = "0.3.43" +version = "0.3.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68497a05fb21143a08a7d24fc81763384a3072ee43c44e86aad1744d6adef9d9" +checksum = "d381749acb0943d357dcbd8f0b100640679883fcdeeef04def49daf8d33a5426" dependencies = [ "console_error_panic_hook", "js-sys", @@ -6650,20 +6850,20 @@ dependencies = [ [[package]] name = "wasm-bindgen-test-macro" -version = "0.3.43" +version = "0.3.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8220be1fa9e4c889b30fd207d4906657e7e90b12e0e6b0c8b8d8709f5de021" +checksum = "c97b2ef2c8d627381e51c071c2ab328eac606d3f69dd82bcbca20a9e389d95f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] name = "wasm-streams" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" dependencies = [ "futures-util", "js-sys", @@ -6674,9 +6874,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -6700,18 +6900,18 @@ checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "webpki-roots" -version = "0.26.3" +version = "0.26.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" +checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" dependencies = [ "rustls-pki-types", ] [[package]] name = "wildmatch" -version = "2.3.4" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3928939971918220fed093266b809d1ee4ec6c1a2d72692ff6876898f3b16c19" +checksum = "68ce1ab1f8c62655ebe1350f589c61e505cf94d385bc6a12899442d9081e71fd" [[package]] name = "winapi" @@ -6942,9 +7142,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.18" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] @@ -6959,6 +7159,18 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "xxhash-rust" version = "0.8.12" @@ -6975,25 +7187,45 @@ dependencies = [ ] [[package]] -name = "yaml-rust" -version = "0.4.5" +name = "yaml-rust2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +checksum = "8902160c4e6f2fb145dbe9d6760a75e3c9522d8bf796ed7047c85919ac7115f8" dependencies = [ - "linked-hash-map", + "arraydeque", + "encoding_rs", + "hashlink", ] [[package]] name = "yansi" -version = "0.5.1" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] -name = "yansi" -version = "1.0.1" +name = "yoke" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" +checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", +] [[package]] name = "zerocopy" @@ -7013,7 +7245,28 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", +] + +[[package]] +name = "zerofrom" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", ] [[package]] @@ -7033,7 +7286,29 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", ] [[package]] @@ -7052,7 +7327,7 @@ dependencies = [ "displaydoc", "flate2", "hmac", - "indexmap 2.4.0", + "indexmap 2.6.0", "lzma-rs", "memchr", "pbkdf2", diff --git a/python/pyproject.toml b/python/pyproject.toml index 006f5fbb74..a483c05873 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -20,6 +20,7 @@ dependencies = [ "gql[all] == 3.5.0", "matplotlib >= 3.4.3", "ipywidgets >= 8.1.5", + "numpy >= 2.0", ] diff --git a/python/tests/test_graphdb/test_graphdb.py b/python/tests/test_graphdb/test_graphdb.py index 6ca6e648a1..f4dc42bf34 100644 --- a/python/tests/test_graphdb/test_graphdb.py +++ b/python/tests/test_graphdb/test_graphdb.py @@ -2728,7 +2728,7 @@ def test_is_self_loop(): def test_NaN_NaT_as_properties(): now = datetime.now() data = { - "floats": [np.NaN, None, 2.4, None, None, None], + "floats": [np.nan, None, 2.4, None, None, None], "time": [10, 20, 30, 40, 50, 60], "id": [101, 102, 103, 104, 105, 106], "datetime": [ From 65604884f6a4af0ed697096e824c43ae44e67416 Mon Sep 17 00:00:00 2001 From: Lucas Jeub Date: Thu, 7 Nov 2024 10:31:32 +0100 Subject: [PATCH 12/17] fix arrow version mismatch --- Cargo.lock | 544 +++++++++++++++++++++++++++++------------------------ Cargo.toml | 18 +- 2 files changed, 311 insertions(+), 251 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1bb4ca98f0..439e412425 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -72,6 +72,7 @@ dependencies = [ "const-random", "getrandom", "once_cell", + "serde", "version_check", "zerocopy", ] @@ -229,54 +230,37 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "arrow" -version = "52.2.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05048a8932648b63f21c37d88b552ccc8a65afb6dfe9fc9f30ce79174c2e7a85" +checksum = "4caf25cdc4a985f91df42ed9e9308e1adbcd341a31a72605c697033fcef163e3" dependencies = [ "arrow-arith", - "arrow-array 52.2.0", - "arrow-buffer 52.2.0", + "arrow-array", + "arrow-buffer", "arrow-cast", "arrow-csv", - "arrow-data 52.2.0", + "arrow-data", "arrow-ipc", "arrow-json", "arrow-ord", "arrow-row", - "arrow-schema 52.2.0", + "arrow-schema", "arrow-select", "arrow-string", ] [[package]] name = "arrow-arith" -version = "52.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d8a57966e43bfe9a3277984a14c24ec617ad874e4c0e1d2a1b083a39cfbf22c" -dependencies = [ - "arrow-array 52.2.0", - "arrow-buffer 52.2.0", - "arrow-data 52.2.0", - "arrow-schema 52.2.0", - "chrono", - "half", - "num", -] - -[[package]] -name = "arrow-array" -version = "52.2.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f4a9468c882dc66862cef4e1fd8423d47e67972377d85d80e022786427768c" +checksum = "91f2dfd1a7ec0aca967dfaa616096aec49779adc8eccec005e2f5e4111b1192a" dependencies = [ - "ahash", - "arrow-buffer 52.2.0", - "arrow-data 52.2.0", - "arrow-schema 52.2.0", + "arrow-array", + "arrow-buffer", + "arrow-data", + "arrow-schema", "chrono", - "chrono-tz 0.9.0", "half", - "hashbrown 0.14.5", "num", ] @@ -287,26 +271,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d39387ca628be747394890a6e47f138ceac1aa912eab64f02519fed24b637af8" dependencies = [ "ahash", - "arrow-buffer 53.2.0", - "arrow-data 53.2.0", - "arrow-schema 53.2.0", + "arrow-buffer", + "arrow-data", + "arrow-schema", "chrono", + "chrono-tz 0.10.0", "half", "hashbrown 0.14.5", "num", ] -[[package]] -name = "arrow-buffer" -version = "52.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c975484888fc95ec4a632cdc98be39c085b1bb518531b0c80c5d462063e5daa1" -dependencies = [ - "bytes", - "half", - "num", -] - [[package]] name = "arrow-buffer" version = "53.2.0" @@ -320,14 +294,14 @@ dependencies = [ [[package]] name = "arrow-cast" -version = "52.2.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da26719e76b81d8bc3faad1d4dbdc1bcc10d14704e63dc17fc9f3e7e1e567c8e" +checksum = "d09aea56ec9fa267f3f3f6cdab67d8a9974cbba90b3aa38c8fe9d0bb071bd8c1" dependencies = [ - "arrow-array 52.2.0", - "arrow-buffer 52.2.0", - "arrow-data 52.2.0", - "arrow-schema 52.2.0", + "arrow-array", + "arrow-buffer", + "arrow-data", + "arrow-schema", "arrow-select", "atoi", "base64 0.22.1", @@ -341,15 +315,15 @@ dependencies = [ [[package]] name = "arrow-csv" -version = "52.2.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c13c36dc5ddf8c128df19bab27898eea64bf9da2b555ec1cd17a8ff57fba9ec2" +checksum = "c07b5232be87d115fde73e32f2ca7f1b353bff1b44ac422d3c6fc6ae38f11f0d" dependencies = [ - "arrow-array 52.2.0", - "arrow-buffer 52.2.0", + "arrow-array", + "arrow-buffer", "arrow-cast", - "arrow-data 52.2.0", - "arrow-schema 52.2.0", + "arrow-data", + "arrow-schema", "chrono", "csv", "csv-core", @@ -358,56 +332,44 @@ dependencies = [ "regex", ] -[[package]] -name = "arrow-data" -version = "52.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd9d6f18c65ef7a2573ab498c374d8ae364b4a4edf67105357491c031f716ca5" -dependencies = [ - "arrow-buffer 52.2.0", - "arrow-schema 52.2.0", - "half", - "num", -] - [[package]] name = "arrow-data" version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b98ae0af50890b494cebd7d6b04b35e896205c1d1df7b29a6272c5d0d0249ef5" dependencies = [ - "arrow-buffer 53.2.0", - "arrow-schema 53.2.0", + "arrow-buffer", + "arrow-schema", "half", "num", ] [[package]] name = "arrow-ipc" -version = "52.2.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e786e1cdd952205d9a8afc69397b317cfbb6e0095e445c69cda7e8da5c1eeb0f" +checksum = "0ed91bdeaff5a1c00d28d8f73466bcb64d32bbd7093b5a30156b4b9f4dba3eee" dependencies = [ - "arrow-array 52.2.0", - "arrow-buffer 52.2.0", + "arrow-array", + "arrow-buffer", "arrow-cast", - "arrow-data 52.2.0", - "arrow-schema 52.2.0", + "arrow-data", + "arrow-schema", "flatbuffers", "lz4_flex", ] [[package]] name = "arrow-json" -version = "52.2.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb22284c5a2a01d73cebfd88a33511a3234ab45d66086b2ca2d1228c3498e445" +checksum = "0471f51260a5309307e5d409c9dc70aede1cd9cf1d4ff0f0a1e8e1a2dd0e0d3c" dependencies = [ - "arrow-array 52.2.0", - "arrow-buffer 52.2.0", + "arrow-array", + "arrow-buffer", "arrow-cast", - "arrow-data 52.2.0", - "arrow-schema 52.2.0", + "arrow-data", + "arrow-schema", "chrono", "half", "indexmap 2.6.0", @@ -419,14 +381,14 @@ dependencies = [ [[package]] name = "arrow-ord" -version = "52.2.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42745f86b1ab99ef96d1c0bcf49180848a64fe2c7a7a0d945bc64fa2b21ba9bc" +checksum = "2883d7035e0b600fb4c30ce1e50e66e53d8656aa729f2bfa4b51d359cf3ded52" dependencies = [ - "arrow-array 52.2.0", - "arrow-buffer 52.2.0", - "arrow-data 52.2.0", - "arrow-schema 52.2.0", + "arrow-array", + "arrow-buffer", + "arrow-data", + "arrow-schema", "arrow-select", "half", "num", @@ -434,24 +396,18 @@ dependencies = [ [[package]] name = "arrow-row" -version = "52.2.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd09a518c602a55bd406bcc291a967b284cfa7a63edfbf8b897ea4748aad23c" +checksum = "552907e8e587a6fde4f8843fd7a27a576a260f65dab6c065741ea79f633fc5be" dependencies = [ "ahash", - "arrow-array 52.2.0", - "arrow-buffer 52.2.0", - "arrow-data 52.2.0", - "arrow-schema 52.2.0", + "arrow-array", + "arrow-buffer", + "arrow-data", + "arrow-schema", "half", ] -[[package]] -name = "arrow-schema" -version = "52.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e972cd1ff4a4ccd22f86d3e53e835c2ed92e0eea6a3e8eadb72b4f1ac802cf8" - [[package]] name = "arrow-schema" version = "53.2.0" @@ -460,28 +416,28 @@ checksum = "539ada65246b949bd99ffa0881a9a15a4a529448af1a07a9838dd78617dafab1" [[package]] name = "arrow-select" -version = "52.2.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "600bae05d43483d216fb3494f8c32fdbefd8aa4e1de237e790dbb3d9f44690a3" +checksum = "6259e566b752da6dceab91766ed8b2e67bf6270eb9ad8a6e07a33c1bede2b125" dependencies = [ "ahash", - "arrow-array 52.2.0", - "arrow-buffer 52.2.0", - "arrow-data 52.2.0", - "arrow-schema 52.2.0", + "arrow-array", + "arrow-buffer", + "arrow-data", + "arrow-schema", "num", ] [[package]] name = "arrow-string" -version = "52.2.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dc1985b67cb45f6606a248ac2b4a288849f196bab8c657ea5589f47cdd55e6" +checksum = "f3179ccbd18ebf04277a095ba7321b93fd1f774f18816bd5f6b3ce2f594edb6c" dependencies = [ - "arrow-array 52.2.0", - "arrow-buffer 52.2.0", - "arrow-data 52.2.0", - "arrow-schema 52.2.0", + "arrow-array", + "arrow-buffer", + "arrow-data", + "arrow-schema", "arrow-select", "memchr", "num", @@ -895,9 +851,9 @@ dependencies = [ [[package]] name = "brotli" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" +checksum = "cc97b8f16f944bba54f0433f07e30be199b6dc2bd25937444bbad560bcea29bd" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -1055,12 +1011,12 @@ dependencies = [ [[package]] name = "chrono-tz" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93698b29de5e97ad0ae26447b344c482a7284c737d9ddc5f9e52b74a336671bb" +checksum = "cd6dd8046d00723a59a2f8c5f295c515b9bb9a331ee4f8f3d4dd49e428acd3b6" dependencies = [ "chrono", - "chrono-tz-build 0.3.0", + "chrono-tz-build 0.4.0", "phf", ] @@ -1077,12 +1033,11 @@ dependencies = [ [[package]] name = "chrono-tz-build" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c088aee841df9c3041febbb73934cfc39708749bf96dc827e3359cd39ef11b1" +checksum = "e94fea34d77a245229e7746bd2beb786cd2a896f306ff491fb8cecb3074b10a7" dependencies = [ "parse-zoneinfo", - "phf", "phf_codegen", ] @@ -1495,19 +1450,6 @@ dependencies = [ "syn 2.0.87", ] -[[package]] -name = "dashmap" -version = "5.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" -dependencies = [ - "cfg-if", - "hashbrown 0.14.5", - "lock_api", - "once_cell", - "parking_lot_core", -] - [[package]] name = "dashmap" version = "6.1.0" @@ -1531,31 +1473,34 @@ checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" [[package]] name = "datafusion" -version = "40.0.0" +version = "42.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab9d55a9cd2634818953809f75ebe5248b00dd43c3227efb2a51a2d5feaad54e" +checksum = "dae5f2abc725737d6e87b6d348a5aa2d0a77e4cf873045f004546da946e6e619" dependencies = [ "ahash", "arrow", - "arrow-array 52.2.0", + "arrow-array", "arrow-ipc", - "arrow-schema 52.2.0", + "arrow-schema", "async-compression", "async-trait", "bytes", "bzip2", "chrono", - "dashmap 5.5.3", + "dashmap", + "datafusion-catalog", "datafusion-common", "datafusion-common-runtime", "datafusion-execution", "datafusion-expr", "datafusion-functions", "datafusion-functions-aggregate", - "datafusion-functions-array", + "datafusion-functions-nested", + "datafusion-functions-window", "datafusion-optimizer", "datafusion-physical-expr", "datafusion-physical-expr-common", + "datafusion-physical-optimizer", "datafusion-physical-plan", "datafusion-sql", "flate2", @@ -1564,7 +1509,7 @@ dependencies = [ "half", "hashbrown 0.14.5", "indexmap 2.6.0", - "itertools 0.12.1", + "itertools 0.13.0", "log", "num_cpus", "object_store", @@ -1573,7 +1518,7 @@ dependencies = [ "paste", "pin-project-lite", "rand", - "sqlparser", + "sqlparser 0.50.0", "tempfile", "tokio", "tokio-util", @@ -1583,17 +1528,32 @@ dependencies = [ "zstd", ] +[[package]] +name = "datafusion-catalog" +version = "42.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "998761705551f11ffa4ee692cc285b44eb1def6e0d28c4eaf5041b9e2810dc1e" +dependencies = [ + "arrow-schema", + "async-trait", + "datafusion-common", + "datafusion-execution", + "datafusion-expr", + "datafusion-physical-plan", + "parking_lot", +] + [[package]] name = "datafusion-common" -version = "40.0.0" +version = "42.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "def66b642959e7f96f5d2da22e1f43d3bd35598f821e5ce351a0553e0f1b7367" +checksum = "11986f191e88d950f10a5cc512a598afba27d92e04a0201215ad60785005115a" dependencies = [ "ahash", "arrow", - "arrow-array 52.2.0", - "arrow-buffer 52.2.0", - "arrow-schema 52.2.0", + "arrow-array", + "arrow-buffer", + "arrow-schema", "chrono", "half", "hashbrown 0.14.5", @@ -1602,27 +1562,30 @@ dependencies = [ "num_cpus", "object_store", "parquet", - "sqlparser", + "paste", + "sqlparser 0.50.0", + "tokio", ] [[package]] name = "datafusion-common-runtime" -version = "40.0.0" +version = "42.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f104bb9cb44c06c9badf8a0d7e0855e5f7fa5e395b887d7f835e8a9457dc1352" +checksum = "694c9d7ea1b82f95768215c4cb5c2d5c613690624e832a7ee64be563139d582f" dependencies = [ + "log", "tokio", ] [[package]] name = "datafusion-execution" -version = "40.0.0" +version = "42.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ac0fd8b5d80bbca3fc3b6f40da4e9f6907354824ec3b18bbd83fee8cf5c3c3e" +checksum = "30b4cedcd98151e0a297f34021b6b232ff0ebc0f2f18ea5e7446b5ebda99b1a1" dependencies = [ "arrow", "chrono", - "dashmap 5.5.3", + "dashmap", "datafusion-common", "datafusion-expr", "futures", @@ -1637,30 +1600,45 @@ dependencies = [ [[package]] name = "datafusion-expr" -version = "40.0.0" +version = "42.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2103d2cc16fb11ef1fa993a6cac57ed5cb028601db4b97566c90e5fa77aa1e68" +checksum = "a8dd114dc0296cacaee98ad3165724529fcca9a65b2875abcd447b9cc02b2b74" dependencies = [ "ahash", "arrow", - "arrow-array 52.2.0", - "arrow-buffer 52.2.0", + "arrow-array", + "arrow-buffer", "chrono", "datafusion-common", + "datafusion-expr-common", + "datafusion-functions-aggregate-common", + "datafusion-physical-expr-common", "paste", "serde_json", - "sqlparser", + "sqlparser 0.50.0", "strum", "strum_macros", ] +[[package]] +name = "datafusion-expr-common" +version = "42.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d1ba2bb018218d9260bbd7de6a46a20f61b93d4911dba8aa07735625004c4fb" +dependencies = [ + "arrow", + "datafusion-common", + "paste", +] + [[package]] name = "datafusion-functions" -version = "40.0.0" +version = "42.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a369332afd0ef5bd565f6db2139fb9f1dfdd0afa75a7f70f000b74208d76994f" +checksum = "547cb780a4ac51fd8e52c0fb9188bc16cea4e35aebf6c454bda0b82a7a417304" dependencies = [ "arrow", + "arrow-buffer", "base64 0.22.1", "blake2", "blake3", @@ -1670,7 +1648,7 @@ dependencies = [ "datafusion-expr", "hashbrown 0.14.5", "hex", - "itertools 0.12.1", + "itertools 0.13.0", "log", "md-5", "rand", @@ -1682,48 +1660,79 @@ dependencies = [ [[package]] name = "datafusion-functions-aggregate" -version = "40.0.0" +version = "42.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92718db1aff70c47e5abf9fc975768530097059e5db7c7b78cd64b5e9a11fc77" +checksum = "e68cf5aa7ebcac08bd04bb709a9a6d4963eafd227da62b628133bc509c40f5a0" dependencies = [ "ahash", "arrow", - "arrow-schema 52.2.0", + "arrow-schema", "datafusion-common", "datafusion-execution", "datafusion-expr", + "datafusion-functions-aggregate-common", + "datafusion-physical-expr", "datafusion-physical-expr-common", + "half", "log", "paste", - "sqlparser", + "sqlparser 0.50.0", +] + +[[package]] +name = "datafusion-functions-aggregate-common" +version = "42.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2285d080dfecdfb8605b0ab2f1a41e2473208dc8e9bd6f5d1dbcfe97f517e6f" +dependencies = [ + "ahash", + "arrow", + "datafusion-common", + "datafusion-expr-common", + "datafusion-physical-expr-common", + "rand", ] [[package]] -name = "datafusion-functions-array" -version = "40.0.0" +name = "datafusion-functions-nested" +version = "42.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30bb80f46ff3dcf4bb4510209c2ba9b8ce1b716ac8b7bf70c6bf7dca6260c831" +checksum = "6b6ffbbb7cf7bf0c0e05eb6207023fef341cac83a593a5365a6fc83803c572a9" dependencies = [ "arrow", - "arrow-array 52.2.0", - "arrow-buffer 52.2.0", + "arrow-array", + "arrow-buffer", "arrow-ord", - "arrow-schema 52.2.0", + "arrow-schema", "datafusion-common", "datafusion-execution", "datafusion-expr", "datafusion-functions", "datafusion-functions-aggregate", - "itertools 0.12.1", + "datafusion-physical-expr-common", + "itertools 0.13.0", "log", "paste", + "rand", +] + +[[package]] +name = "datafusion-functions-window" +version = "42.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e78d30ebd6e9f74d4aeddec32744f5a18b5f9584591bc586fb5259c4848bac5" +dependencies = [ + "datafusion-common", + "datafusion-expr", + "datafusion-physical-expr-common", + "log", ] [[package]] name = "datafusion-optimizer" -version = "40.0.0" +version = "42.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82f34692011bec4fdd6fc18c264bf8037b8625d801e6dd8f5111af15cb6d71d3" +checksum = "be172c44bf344df707e0c041fa3f41e6dc5fb0976f539c68bc442bca150ee58c" dependencies = [ "arrow", "async-trait", @@ -1733,7 +1742,7 @@ dependencies = [ "datafusion-physical-expr", "hashbrown 0.14.5", "indexmap 2.6.0", - "itertools 0.12.1", + "itertools 0.13.0", "log", "paste", "regex-syntax 0.8.5", @@ -1741,28 +1750,30 @@ dependencies = [ [[package]] name = "datafusion-physical-expr" -version = "40.0.0" +version = "42.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45538630defedb553771434a437f7ca8f04b9b3e834344aafacecb27dc65d5e5" +checksum = "43b86b7fa0b8161c49b0f005b0df193fc6d9b65ceec675f155422cda5d1583ca" dependencies = [ "ahash", "arrow", - "arrow-array 52.2.0", - "arrow-buffer 52.2.0", + "arrow-array", + "arrow-buffer", "arrow-ord", - "arrow-schema 52.2.0", + "arrow-schema", "arrow-string", "base64 0.22.1", "chrono", "datafusion-common", "datafusion-execution", "datafusion-expr", + "datafusion-expr-common", + "datafusion-functions-aggregate-common", "datafusion-physical-expr-common", "half", "hashbrown 0.14.5", "hex", "indexmap 2.6.0", - "itertools 0.12.1", + "itertools 0.13.0", "log", "paste", "petgraph", @@ -1771,30 +1782,44 @@ dependencies = [ [[package]] name = "datafusion-physical-expr-common" -version = "40.0.0" +version = "42.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d8a72b0ca908e074aaeca52c14ddf5c28d22361e9cb6bc79bb733cd6661b536" +checksum = "242ba8a26351d9ca16295814c46743b0d1b00ec372174bdfbba991d0953dd596" dependencies = [ "ahash", "arrow", "datafusion-common", - "datafusion-expr", + "datafusion-expr-common", "hashbrown 0.14.5", "rand", ] +[[package]] +name = "datafusion-physical-optimizer" +version = "42.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25ca088eb904bf1cfc9c5e5653110c70a6eaba43164085a9d180b35b77ce3b8b" +dependencies = [ + "arrow-schema", + "datafusion-common", + "datafusion-execution", + "datafusion-physical-expr", + "datafusion-physical-plan", + "itertools 0.13.0", +] + [[package]] name = "datafusion-physical-plan" -version = "40.0.0" +version = "42.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b504eae6107a342775e22e323e9103f7f42db593ec6103b28605b7b7b1405c4a" +checksum = "4989a53b824abc759685eb643f4d604c2fc2fea4e2c309ac3473bea263ecbbeb" dependencies = [ "ahash", "arrow", - "arrow-array 52.2.0", - "arrow-buffer 52.2.0", + "arrow-array", + "arrow-buffer", "arrow-ord", - "arrow-schema 52.2.0", + "arrow-schema", "async-trait", "chrono", "datafusion-common", @@ -1802,13 +1827,14 @@ dependencies = [ "datafusion-execution", "datafusion-expr", "datafusion-functions-aggregate", + "datafusion-functions-aggregate-common", "datafusion-physical-expr", "datafusion-physical-expr-common", "futures", "half", "hashbrown 0.14.5", "indexmap 2.6.0", - "itertools 0.12.1", + "itertools 0.13.0", "log", "once_cell", "parking_lot", @@ -1819,18 +1845,18 @@ dependencies = [ [[package]] name = "datafusion-sql" -version = "40.0.0" +version = "42.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5db33f323f41b95ae201318ba654a9bf11113e58a51a1dff977b1a836d3d889" +checksum = "66b9b75b9da10ed656073ac0553708f17eb8fa5a7b065ef9848914c93150ab9e" dependencies = [ "arrow", - "arrow-array 52.2.0", - "arrow-schema 52.2.0", + "arrow-array", + "arrow-schema", "datafusion-common", "datafusion-expr", "log", "regex", - "sqlparser", + "sqlparser 0.50.0", "strum", ] @@ -1965,12 +1991,6 @@ dependencies = [ "const-random", ] -[[package]] -name = "doc-comment" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" - [[package]] name = "dotenv" version = "0.15.0" @@ -3085,9 +3105,9 @@ checksum = "0c2cdeb66e45e9f36bfad5bbdb4d2384e70936afbee843c6f6543f0c551ebb25" [[package]] name = "lexical-core" -version = "0.8.5" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cde5de06e8d4c2faabc400238f9ae1c74d5412d03a7bd067645ccbc47070e46" +checksum = "0431c65b318a590c1de6b8fd6e72798c92291d27762d94c9e6c37ed7a73d8458" dependencies = [ "lexical-parse-float", "lexical-parse-integer", @@ -3098,9 +3118,9 @@ dependencies = [ [[package]] name = "lexical-parse-float" -version = "0.8.5" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683b3a5ebd0130b8fb52ba0bdc718cc56815b6a097e28ae5a6997d0ad17dc05f" +checksum = "eb17a4bdb9b418051aa59d41d65b1c9be5affab314a872e5ad7f06231fb3b4e0" dependencies = [ "lexical-parse-integer", "lexical-util", @@ -3109,9 +3129,9 @@ dependencies = [ [[package]] name = "lexical-parse-integer" -version = "0.8.6" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d0994485ed0c312f6d965766754ea177d07f9c00c9b82a5ee62ed5b47945ee9" +checksum = "5df98f4a4ab53bf8b175b363a34c7af608fe31f93cc1fb1bf07130622ca4ef61" dependencies = [ "lexical-util", "static_assertions", @@ -3119,18 +3139,18 @@ dependencies = [ [[package]] name = "lexical-util" -version = "0.8.5" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5255b9ff16ff898710eb9eb63cb39248ea8a5bb036bea8085b1a767ff6c4e3fc" +checksum = "85314db53332e5c192b6bca611fb10c114a80d1b831ddac0af1e9be1b9232ca0" dependencies = [ "static_assertions", ] [[package]] name = "lexical-write-float" -version = "0.8.5" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accabaa1c4581f05a3923d1b4cfd124c329352288b7b9da09e766b0668116862" +checksum = "6e7c3ad4e37db81c1cbe7cf34610340adc09c322871972f74877a712abc6c809" dependencies = [ "lexical-util", "lexical-write-integer", @@ -3139,9 +3159,9 @@ dependencies = [ [[package]] name = "lexical-write-integer" -version = "0.8.5" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1b6f3d1f4422866b68192d62f77bc5c700bee84f3069f2469d7bc8c77852446" +checksum = "eb89e9f6958b83258afa3deed90b5de9ef68eef090ad5086c791cd2345610162" dependencies = [ "lexical-util", "static_assertions", @@ -3694,9 +3714,9 @@ dependencies = [ [[package]] name = "object_store" -version = "0.10.2" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6da452820c715ce78221e8202ccc599b4a52f3e1eb3eedb487b680c81a8e3f3" +checksum = "6eb4c22c6154a1e759d7099f9ffad7cc5ef8245f9efbab4a41b92623079c82f3" dependencies = [ "async-trait", "bytes", @@ -3901,20 +3921,20 @@ dependencies = [ [[package]] name = "parquet" -version = "52.2.0" +version = "53.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e977b9066b4d3b03555c22bdc442f3fadebd96a39111249113087d0edb2691cd" +checksum = "dea02606ba6f5e856561d8d507dba8bac060aefca2a6c0f1aa1d361fed91ff3e" dependencies = [ "ahash", - "arrow-array 52.2.0", - "arrow-buffer 52.2.0", + "arrow-array", + "arrow-buffer", "arrow-cast", - "arrow-data 52.2.0", + "arrow-data", "arrow-ipc", - "arrow-schema 52.2.0", + "arrow-schema", "arrow-select", "base64 0.22.1", - "brotli 6.0.0", + "brotli 7.0.0", "bytes", "chrono", "flate2", @@ -4213,10 +4233,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "725b09f2b5ef31279b66e27bbab63c58d49d8f6696b66b1f46c7eaab95e80f75" dependencies = [ "ahash", - "arrow-array 53.2.0", - "arrow-buffer 53.2.0", - "arrow-data 53.2.0", - "arrow-schema 53.2.0", + "arrow-array", + "arrow-buffer", + "arrow-data", + "arrow-schema", "atoi_simd", "bytemuck", "chrono", @@ -4402,6 +4422,38 @@ 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", + "memmap2 0.9.5", + "once_cell", + "parking_lot", + "polars-arrow", + "polars-core", + "polars-io", + "polars-parquet", + "polars-utils", + "pretty_assertions", + "proptest", + "rand", + "raphtory-api", + "rayon", + "serde", + "serde_json", + "strum", + "tempfile", + "thiserror", + "tracing", + "tracing-subscriber", + "twox-hash", +] + [[package]] name = "portable-atomic" version = "1.9.0" @@ -4807,7 +4859,7 @@ dependencies = [ "bzip2", "chrono", "csv", - "dashmap 6.1.0", + "dashmap", "display-error-chain", "dotenv", "either", @@ -4836,7 +4888,7 @@ dependencies = [ "polars-core", "polars-io", "polars-parquet", - "pometry-storage", + "pometry-storage-private", "pretty_assertions", "proptest", "prost", @@ -4872,7 +4924,7 @@ version = "0.13.1" dependencies = [ "bytemuck", "chrono", - "dashmap 6.1.0", + "dashmap", "lock_api", "num-traits", "parking_lot", @@ -4899,7 +4951,7 @@ dependencies = [ "criterion", "csv", "flate2", - "pometry-storage", + "pometry-storage-private", "rand", "raphtory", "raphtory-api", @@ -4914,9 +4966,9 @@ name = "raphtory-cypher" version = "0.13.1" dependencies = [ "arrow", - "arrow-array 52.2.0", - "arrow-buffer 52.2.0", - "arrow-schema 52.2.0", + "arrow-array", + "arrow-buffer", + "arrow-schema", "async-trait", "clap", "datafusion", @@ -4926,14 +4978,14 @@ dependencies = [ "pest", "pest_derive", "polars-arrow", - "pometry-storage", + "pometry-storage-private", "pretty_assertions", "proptest", "raphtory", "rayon", "serde", "serde_json", - "sqlparser", + "sqlparser 0.51.0", "tempfile", "thiserror", "tokio", @@ -5712,24 +5764,23 @@ dependencies = [ [[package]] name = "snafu" -version = "0.7.5" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4de37ad025c587a29e8f3f5605c00f70b98715ef90b9061a815b9e59e9042d6" +checksum = "223891c85e2a29c3fe8fb900c1fae5e69c2e42415e3177752e8718475efa5019" dependencies = [ - "doc-comment", "snafu-derive", ] [[package]] name = "snafu-derive" -version = "0.7.5" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "990079665f075b699031e9c08fd3ab99be5029b96f3b78dc0709e8f77e4efebf" +checksum = "03c3c6b7927ffe7ecaa769ee0e3994da3b8cafc8f444578982c83ecb161af917" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.87", ] [[package]] @@ -5784,14 +5835,23 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "sqlparser" -version = "0.47.0" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "295e9930cd7a97e58ca2a070541a3ca502b17f5d1fa7157376d0fabd85324f25" +checksum = "b2e5b515a2bd5168426033e9efbfd05500114833916f1d5c268f938b4ee130ac" dependencies = [ "log", "sqlparser_derive", ] +[[package]] +name = "sqlparser" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fe11944a61da0da3f592e19a45ebe5ab92dc14a779907ff1f08fbb797bfefc7" +dependencies = [ + "log", +] + [[package]] name = "sqlparser_derive" version = "0.2.2" diff --git a/Cargo.toml b/Cargo.toml index bce47a186a..eb67fa2b0c 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" } 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 @@ -148,12 +148,12 @@ pest = "2.7.8" pest_derive = "2.7.8" minijinja = "2.2.0" minijinja-contrib = { version = "2.2.0", features = ["datetime"] } -sqlparser = "0.47" -datafusion = { version = "40" } +sqlparser = "0.51.0" +datafusion = { version = "42.2.0" } futures = "0.3" -arrow = { version = "52" } -arrow-buffer = { version = "52" } -arrow-schema = { version = "52" } -arrow-data = { version = "52" } -arrow-array = { version = "52" } +arrow = { version = "53.2.0" } +arrow-buffer = { version = "53.2.0" } +arrow-schema = { version = "53.2.0" } +arrow-data = { version = "53.2.0" } +arrow-array = { version = "53.2.0" } moka = { version = "0.12.7", features = ["sync"] } From 1d5f1a64fa4b388e01ec612ecdc4126a38192b76 Mon Sep 17 00:00:00 2001 From: Lucas Jeub Date: Thu, 7 Nov 2024 10:34:36 +0100 Subject: [PATCH 13/17] deactivate storage --- Cargo.lock | 39 +++------------------------------------ Cargo.toml | 4 ++-- 2 files changed, 5 insertions(+), 38 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 439e412425..70679d26ab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -72,7 +72,6 @@ dependencies = [ "const-random", "getrandom", "once_cell", - "serde", "version_check", "zerocopy", ] @@ -4422,38 +4421,6 @@ 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", - "memmap2 0.9.5", - "once_cell", - "parking_lot", - "polars-arrow", - "polars-core", - "polars-io", - "polars-parquet", - "polars-utils", - "pretty_assertions", - "proptest", - "rand", - "raphtory-api", - "rayon", - "serde", - "serde_json", - "strum", - "tempfile", - "thiserror", - "tracing", - "tracing-subscriber", - "twox-hash", -] - [[package]] name = "portable-atomic" version = "1.9.0" @@ -4888,7 +4855,7 @@ dependencies = [ "polars-core", "polars-io", "polars-parquet", - "pometry-storage-private", + "pometry-storage", "pretty_assertions", "proptest", "prost", @@ -4951,7 +4918,7 @@ dependencies = [ "criterion", "csv", "flate2", - "pometry-storage-private", + "pometry-storage", "rand", "raphtory", "raphtory-api", @@ -4978,7 +4945,7 @@ dependencies = [ "pest", "pest_derive", "polars-arrow", - "pometry-storage-private", + "pometry-storage", "pretty_assertions", "proptest", "raphtory", diff --git a/Cargo.toml b/Cargo.toml index eb67fa2b0c..330b1096d5 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" } 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 From 9d97aa2a8fc11b169720f7681864394cdce69517 Mon Sep 17 00:00:00 2001 From: Lucas Jeub Date: Thu, 7 Nov 2024 10:43:20 +0100 Subject: [PATCH 14/17] downgrade sql_parser --- Cargo.lock | 12 ++++++------ Cargo.toml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 70679d26ab..2ffaeb103f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4952,7 +4952,7 @@ dependencies = [ "rayon", "serde", "serde_json", - "sqlparser 0.51.0", + "sqlparser 0.47.0", "tempfile", "thiserror", "tokio", @@ -5802,21 +5802,21 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "sqlparser" -version = "0.50.0" +version = "0.47.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2e5b515a2bd5168426033e9efbfd05500114833916f1d5c268f938b4ee130ac" +checksum = "295e9930cd7a97e58ca2a070541a3ca502b17f5d1fa7157376d0fabd85324f25" dependencies = [ "log", - "sqlparser_derive", ] [[package]] name = "sqlparser" -version = "0.51.0" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fe11944a61da0da3f592e19a45ebe5ab92dc14a779907ff1f08fbb797bfefc7" +checksum = "b2e5b515a2bd5168426033e9efbfd05500114833916f1d5c268f938b4ee130ac" dependencies = [ "log", + "sqlparser_derive", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 330b1096d5..a6b5d0af46 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -148,8 +148,8 @@ pest = "2.7.8" pest_derive = "2.7.8" minijinja = "2.2.0" minijinja-contrib = { version = "2.2.0", features = ["datetime"] } -sqlparser = "0.51.0" datafusion = { version = "42.2.0" } +sqlparser = "0.47" futures = "0.3" arrow = { version = "53.2.0" } arrow-buffer = { version = "53.2.0" } From 118a7b1103936d8b8da5ef9dfc9eefd74c9b1a97 Mon Sep 17 00:00:00 2001 From: Lucas Jeub Date: Thu, 7 Nov 2024 12:09:00 +0100 Subject: [PATCH 15/17] fix cypher --- Cargo.lock | 21 +++------- Cargo.toml | 2 +- .../src/executor/table_provider/edge.rs | 15 +++---- .../src/executor/table_provider/node.rs | 6 +-- raphtory-cypher/src/transpiler/mod.rs | 39 +++++++++++++++---- 5 files changed, 50 insertions(+), 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2ffaeb103f..4ca53d0a6d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1517,7 +1517,7 @@ dependencies = [ "paste", "pin-project-lite", "rand", - "sqlparser 0.50.0", + "sqlparser", "tempfile", "tokio", "tokio-util", @@ -1562,7 +1562,7 @@ dependencies = [ "object_store", "parquet", "paste", - "sqlparser 0.50.0", + "sqlparser", "tokio", ] @@ -1614,7 +1614,7 @@ dependencies = [ "datafusion-physical-expr-common", "paste", "serde_json", - "sqlparser 0.50.0", + "sqlparser", "strum", "strum_macros", ] @@ -1675,7 +1675,7 @@ dependencies = [ "half", "log", "paste", - "sqlparser 0.50.0", + "sqlparser", ] [[package]] @@ -1855,7 +1855,7 @@ dependencies = [ "datafusion-expr", "log", "regex", - "sqlparser 0.50.0", + "sqlparser", "strum", ] @@ -4952,7 +4952,7 @@ dependencies = [ "rayon", "serde", "serde_json", - "sqlparser 0.47.0", + "sqlparser", "tempfile", "thiserror", "tokio", @@ -5800,15 +5800,6 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -[[package]] -name = "sqlparser" -version = "0.47.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "295e9930cd7a97e58ca2a070541a3ca502b17f5d1fa7157376d0fabd85324f25" -dependencies = [ - "log", -] - [[package]] name = "sqlparser" version = "0.50.0" diff --git a/Cargo.toml b/Cargo.toml index a6b5d0af46..40a09b52bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -149,7 +149,7 @@ pest_derive = "2.7.8" minijinja = "2.2.0" minijinja-contrib = { version = "2.2.0", features = ["datetime"] } datafusion = { version = "42.2.0" } -sqlparser = "0.47" +sqlparser = "0.50.0" futures = "0.3" arrow = { version = "53.2.0" } arrow-buffer = { version = "53.2.0" } diff --git a/raphtory-cypher/src/executor/table_provider/edge.rs b/raphtory-cypher/src/executor/table_provider/edge.rs index b8329cdbd5..547f779417 100644 --- a/raphtory-cypher/src/executor/table_provider/edge.rs +++ b/raphtory-cypher/src/executor/table_provider/edge.rs @@ -10,6 +10,7 @@ use datafusion::{ array::RecordBatch, datatypes::{Schema, SchemaRef}, }, + catalog::Session, common::{DFSchema, Statistics}, config::ConfigOptions, datasource::{TableProvider, TableType}, @@ -64,13 +65,13 @@ impl EdgeListTableProvider { .len(); //src - let expr = Expr::Sort(expr::Sort::new(Box::new(col("src")), true, true)); - let df_schema = DFSchema::try_from(schema.as_ref().clone()).unwrap(); + let expr = col("src").sort(true, true); + let df_schema = DFSchema::try_from(schema.as_ref().clone())?; let sort_by_src = create_physical_sort_expr(&expr, &df_schema, &ExecutionProps::new())?; //dst - let expr = Expr::Sort(expr::Sort::new(Box::new(col("dst")), true, true)); - let df_schema = DFSchema::try_from(schema.as_ref().clone()).unwrap(); + let expr = col("dst").sort(true, true); + let df_schema = DFSchema::try_from(schema.as_ref().clone())?; let sort_by_dst = create_physical_sort_expr(&expr, &df_schema, &ExecutionProps::new())?; //time @@ -81,8 +82,8 @@ impl EdgeListTableProvider { .map(|f| f.name.clone()) .unwrap(); - let expr = Expr::Sort(expr::Sort::new(Box::new(col(time_field_name)), true, true)); - let df_schema = DFSchema::try_from(schema.as_ref().clone()).unwrap(); + let expr = col(time_field_name).sort(true, true); + let df_schema = DFSchema::try_from(schema.as_ref().clone())?; let sort_by_time = create_physical_sort_expr(&expr, &df_schema, &ExecutionProps::new())?; Ok(Self { @@ -140,7 +141,7 @@ impl TableProvider for EdgeListTableProvider { async fn scan( &self, - _state: &SessionState, + _state: &dyn Session, projection: Option<&Vec>, _filters: &[Expr], _limit: Option, diff --git a/raphtory-cypher/src/executor/table_provider/node.rs b/raphtory-cypher/src/executor/table_provider/node.rs index ad4fbedebb..09b9135ec1 100644 --- a/raphtory-cypher/src/executor/table_provider/node.rs +++ b/raphtory-cypher/src/executor/table_provider/node.rs @@ -1,3 +1,4 @@ +use super::plan_properties; use crate::{ arrow2::{self, array::to_data, datatypes::ArrowDataType}, executor::ExecError, @@ -9,6 +10,7 @@ use arrow_schema::{DataType, Schema}; use async_trait::async_trait; use datafusion::{ arrow::{array::RecordBatch, datatypes::SchemaRef}, + catalog::Session, common::Statistics, config::ConfigOptions, datasource::{TableProvider, TableType}, @@ -28,8 +30,6 @@ use raphtory::{ }; use std::{any::Any, fmt::Formatter, sync::Arc}; -use super::plan_properties; - // FIXME: review this file, some of the assuptions and mapping between partitions and chunk sizes are not correct pub struct NodeTableProvider { graph: DiskGraphStorage, @@ -113,7 +113,7 @@ impl TableProvider for NodeTableProvider { async fn scan( &self, - _state: &SessionState, + _state: &dyn Session, projection: Option<&Vec>, _filters: &[Expr], _limit: Option, diff --git a/raphtory-cypher/src/transpiler/mod.rs b/raphtory-cypher/src/transpiler/mod.rs index d800aa5d89..2b129d4847 100644 --- a/raphtory-cypher/src/transpiler/mod.rs +++ b/raphtory-cypher/src/transpiler/mod.rs @@ -58,6 +58,8 @@ pub fn to_sql(query: Query, graph: &DiskGraphStorage) -> sql_ast::Statement { // `FOR JSON { AUTO | PATH } [ , INCLUDE_NULL_VALUES ]` // (MSSQL-specific) for_clause: None, + settings: None, + format_clause: None, })) } @@ -177,8 +179,12 @@ fn max_bind_count(query: &Query) -> usize { .unwrap_or(0) } -fn parse_order_by(query: &Query, rel_binds: &[String], node_binds: &[String]) -> Vec { - query +fn parse_order_by( + query: &Query, + rel_binds: &[String], + node_binds: &[String], +) -> Option { + let exprs: Vec<_> = query .clauses() .into_iter() .flat_map(|clause| match clause { @@ -194,12 +200,21 @@ fn parse_order_by(query: &Query, rel_binds: &[String], node_binds: &[String]) -> expr: sql_expr, asc: *asc, nulls_first: None, + with_fill: None, } }) .collect(), _ => vec![], }) - .collect() + .collect(); + if exprs.is_empty() { + None + } else { + Some(sql_ast::OrderBy { + exprs, + interpolate: None, + }) + } } fn scan_edges_as_sql_cte( @@ -290,13 +305,15 @@ fn query_union(q1: Box, q2: Box) -> Box | ALL }` limit: None, // `LIMIT { } BY { ,,... } }` @@ -412,6 +430,8 @@ fn select_query_with_projection( // `FOR JSON { AUTO | PATH } [ , INCLUDE_NULL_VALUES ]` // (MSSQL-specific) for_clause: None, + settings: None, + format_clause: None, }) } @@ -504,9 +524,10 @@ fn parse_select_body( // LATERAL VIEWs lateral_views: vec![], // WHERE + prewhere: None, selection: where_expr(query, rel_uniqueness_filters, &rel_binds, &node_binds), // GROUP BY - group_by: GroupByExpr::Expressions(vec![]), + group_by: GroupByExpr::Expressions(vec![], vec![]), // CLUSTER BY (Hive) cluster_by: vec![], // DISTRIBUTE BY (Hive) @@ -761,6 +782,7 @@ fn make_sql_join( ) -> sql_ast::Join { sql_ast::Join { relation: table_from_name(right_table), + global: false, join_operator: sql_ast::JoinOperator::Inner(sql_ast::JoinConstraint::On( sql_ast::Expr::BinaryOp { left: Box::new(sql_ast::Expr::CompoundIdentifier(vec![ @@ -784,6 +806,7 @@ fn table_from_name(name: &str) -> sql_ast::TableFactor { args: None, with_hints: vec![], version: None, + with_ordinality: false, partitions: vec![], } } @@ -1081,6 +1104,7 @@ fn cypher_to_sql_expr( fn sql_count_all(table: &str, attr: &str) -> sql_ast::Expr { sql_ast::Expr::Function(sql_ast::Function { name: sql_ast::ObjectName(vec![sql_ast::Ident::new("COUNT")]), + parameters: sql_ast::FunctionArguments::None, args: sql_ast::FunctionArguments::List(FunctionArgumentList { args: vec![sql_ast::FunctionArg::Unnamed( sql_ast::FunctionArgExpr::Expr(sql_ast::Expr::CompoundIdentifier( @@ -1124,6 +1148,7 @@ fn sql_function_ast( }); sql_ast::Expr::Function(sql_ast::Function { name: sql_ast::ObjectName(vec![sql_ast::Ident::new(name)]), + parameters: sql_ast::FunctionArguments::None, args, over: None, filter: None, From 14c0fee38f609d493528b8dfb3af8d870aa3a47d Mon Sep 17 00:00:00 2001 From: Lucas Jeub Date: Thu, 7 Nov 2024 14:55:48 +0100 Subject: [PATCH 16/17] update kdam and fix some deprecation warnings --- Cargo.lock | 89 ++++++++++++------- Cargo.toml | 4 +- raphtory-cypher/examples/raphtory_cypher.rs | 6 +- .../src/executor/table_provider/edge.rs | 16 ++-- .../src/executor/table_provider/node.rs | 2 +- raphtory-cypher/src/hop/execution.rs | 29 +++--- raphtory-cypher/src/lib.rs | 51 +++++------ .../storage/graph/nodes/node_storage_ops.rs | 6 +- 8 files changed, 104 insertions(+), 99 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4ca53d0a6d..961ff945e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -508,7 +508,7 @@ dependencies = [ "serde_urlencoded", "static_assertions_next", "tempfile", - "thiserror", + "thiserror 1.0.68", ] [[package]] @@ -525,7 +525,7 @@ dependencies = [ "quote", "strum", "syn 2.0.87", - "thiserror", + "thiserror 1.0.68", ] [[package]] @@ -588,7 +588,7 @@ dependencies = [ "secrecy", "serde", "serde_json", - "thiserror", + "thiserror 1.0.68", "tokio", "tokio-stream", "tokio-util", @@ -2031,7 +2031,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.87", - "thiserror", + "thiserror 1.0.68", ] [[package]] @@ -2418,7 +2418,7 @@ dependencies = [ "pest_derive", "serde", "serde_json", - "thiserror", + "thiserror 1.0.68", ] [[package]] @@ -3082,12 +3082,13 @@ dependencies = [ [[package]] name = "kdam" -version = "0.5.2" -source = "git+https://github.com/ljeub-pometry/kdam.git?branch=pyo3_0_22#b3fc30a21fff97daa7de08f76764a98699e5f505" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0adf504eb0c61c2da8c5d674a1243db8b2320d44686be22a6c7c8aa7d2dbf6bf" dependencies = [ "pyo3", "terminal_size", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3436,7 +3437,7 @@ dependencies = [ "rustc_version", "smallvec", "tagptr", - "thiserror", + "thiserror 1.0.68", "triomphe", "uuid", ] @@ -3528,7 +3529,7 @@ dependencies = [ "rustls-native-certs 0.7.3", "rustls-pemfile 2.2.0", "serde", - "thiserror", + "thiserror 1.0.68", "tokio", "tokio-rustls 0.26.0", "url", @@ -3698,7 +3699,7 @@ dependencies = [ "serde_json", "serde_path_to_error", "sha2", - "thiserror", + "thiserror 1.0.68", "url", ] @@ -3773,7 +3774,7 @@ dependencies = [ "js-sys", "once_cell", "pin-project-lite", - "thiserror", + "thiserror 1.0.68", ] [[package]] @@ -3789,7 +3790,7 @@ dependencies = [ "opentelemetry-proto", "opentelemetry_sdk", "prost", - "thiserror", + "thiserror 1.0.68", "tokio", "tonic", ] @@ -3822,7 +3823,7 @@ dependencies = [ "percent-encoding", "rand", "serde_json", - "thiserror", + "thiserror 1.0.68", "tokio", "tokio-stream", ] @@ -4014,7 +4015,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" dependencies = [ "memchr", - "thiserror", + "thiserror 1.0.68", "ucd-trie", ] @@ -4204,7 +4205,7 @@ dependencies = [ "serde_urlencoded", "smallvec", "sync_wrapper 1.0.1", - "thiserror", + "thiserror 1.0.68", "time", "tokio", "tokio-tungstenite", @@ -4307,7 +4308,7 @@ dependencies = [ "polars-utils", "rayon", "smartstring", - "thiserror", + "thiserror 1.0.68", "version_check", "xxhash-rust", ] @@ -4320,7 +4321,7 @@ checksum = "5224d5d05e6b8a6f78b75951ae1b5f82c8ab1979e11ffaf5fd41941e3d5b0757" dependencies = [ "polars-arrow-format", "simdutf8", - "thiserror", + "thiserror 1.0.68", ] [[package]] @@ -4721,7 +4722,7 @@ dependencies = [ "rustc-hash 2.0.0", "rustls 0.23.16", "socket2", - "thiserror", + "thiserror 1.0.68", "tokio", "tracing", ] @@ -4738,7 +4739,7 @@ dependencies = [ "rustc-hash 2.0.0", "rustls 0.23.16", "slab", - "thiserror", + "thiserror 1.0.68", "tinyvec", "tracing", ] @@ -4879,7 +4880,7 @@ dependencies = [ "streaming-stats", "tantivy", "tempfile", - "thiserror", + "thiserror 2.0.0", "tokio", "tracing", "zip", @@ -4904,7 +4905,7 @@ dependencies = [ "rayon", "rustc-hash 2.0.0", "serde", - "thiserror", + "thiserror 2.0.0", "tracing", "tracing-subscriber", "twox-hash", @@ -4954,7 +4955,7 @@ dependencies = [ "serde_json", "sqlparser", "tempfile", - "thiserror", + "thiserror 2.0.0", "tokio", "tracing", ] @@ -4991,7 +4992,7 @@ dependencies = [ "serde", "serde_json", "tempfile", - "thiserror", + "thiserror 2.0.0", "tokio", "tracing", "tracing-opentelemetry", @@ -5030,7 +5031,7 @@ dependencies = [ "raphtory-graphql", "serde", "serde_json", - "thiserror", + "thiserror 2.0.0", "tokio", ] @@ -5233,7 +5234,7 @@ dependencies = [ "nom", "pin-project-lite", "reqwest 0.12.9", - "thiserror", + "thiserror 1.0.68", ] [[package]] @@ -5684,7 +5685,7 @@ checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" dependencies = [ "num-bigint", "num-traits", - "thiserror", + "thiserror 1.0.68", "time", ] @@ -6036,7 +6037,7 @@ dependencies = [ "tantivy-stacker", "tantivy-tokenizer-api", "tempfile", - "thiserror", + "thiserror 1.0.68", "time", "uuid", "winapi", @@ -6159,12 +6160,12 @@ dependencies = [ [[package]] name = "terminal_size" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" +checksum = "4f599bd7ca042cfdf8f4512b277c02ba102247820f9d9d4a9f521f496751a6ef" dependencies = [ "rustix", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] @@ -6173,7 +6174,16 @@ version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02dd99dc800bbb97186339685293e1cc5d9df1f8fae2d0aecd9ff1c77efea892" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.68", +] + +[[package]] +name = "thiserror" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15291287e9bff1bc6f9ff3409ed9af665bec7a5fc8ac079ea96be07bca0e2668" +dependencies = [ + "thiserror-impl 2.0.0", ] [[package]] @@ -6187,6 +6197,17 @@ dependencies = [ "syn 2.0.87", ] +[[package]] +name = "thiserror-impl" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22efd00f33f93fa62848a7cab956c3d38c8d43095efda1decfc2b3a5dc0b8972" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "thread_local" version = "1.1.8" @@ -6597,7 +6618,7 @@ dependencies = [ "log", "rand", "sha1", - "thiserror", + "thiserror 1.0.68", "url", "utf-8", ] @@ -7351,7 +7372,7 @@ dependencies = [ "pbkdf2", "rand", "sha1", - "thiserror", + "thiserror 1.0.68", "time", "zeroize", "zopfli", diff --git a/Cargo.toml b/Cargo.toml index 40a09b52bd..8b4d5d0287 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -75,7 +75,7 @@ ordered-float = "4.2.0" chrono = { version = "0.4.38", features = ["serde"] } tempfile = "3.10.0" futures-util = "0.3.30" -thiserror = "1.0.57" +thiserror = "2.0.0" dotenv = "0.15.0" csv = "1.3.0" flate2 = "1.0.28" @@ -105,7 +105,7 @@ polars-parquet = "0.39.2" polars-core = "0.39.2" polars-io = "0.39.2" polars-utils = "0.39.2" -kdam = { git = "https://github.com/ljeub-pometry/kdam.git", branch = "pyo3_0_22" } +kdam = "0.6.0" hashbrown = "0.15.1" pretty_assertions = "1.4.0" quickcheck = "1.0.3" diff --git a/raphtory-cypher/examples/raphtory_cypher.rs b/raphtory-cypher/examples/raphtory_cypher.rs index 2d93d5ccf6..90d1259e8c 100644 --- a/raphtory-cypher/examples/raphtory_cypher.rs +++ b/raphtory-cypher/examples/raphtory_cypher.rs @@ -1,6 +1,3 @@ -#[cfg(feature = "storage")] -pub use cypher::*; - #[cfg(not(feature = "storage"))] fn main() {} @@ -12,8 +9,6 @@ async fn main() { #[cfg(feature = "storage")] mod cypher { - use std::{error::Error, str::FromStr}; - use arrow::util::pretty::print_batches; use clap::Parser; use futures::{stream, StreamExt}; @@ -23,6 +18,7 @@ mod cypher { }; use raphtory_cypher::{run_cypher, run_cypher_to_streams, run_sql}; use serde::{de::DeserializeOwned, Deserialize}; + use std::{error::Error, str::FromStr}; use tracing::info; /// Query graph with cypher diff --git a/raphtory-cypher/src/executor/table_provider/edge.rs b/raphtory-cypher/src/executor/table_provider/edge.rs index 547f779417..a980874c63 100644 --- a/raphtory-cypher/src/executor/table_provider/edge.rs +++ b/raphtory-cypher/src/executor/table_provider/edge.rs @@ -1,5 +1,5 @@ -use std::{any::Any, fmt::Formatter, sync::Arc}; - +use super::plan_properties; +use crate::executor::{arrow2_to_arrow_buf, ExecError}; use arrow::datatypes::*; use arrow_array::{make_array, Array, PrimitiveArray}; use arrow_buffer::{OffsetBuffer, ScalarBuffer}; @@ -15,11 +15,8 @@ use datafusion::{ config::ConfigOptions, datasource::{TableProvider, TableType}, error::DataFusionError, - execution::{ - context::{ExecutionProps, SessionState}, - SendableRecordBatchStream, TaskContext, - }, - logical_expr::{col, expr, Expr}, + execution::{context::ExecutionProps, SendableRecordBatchStream, TaskContext}, + logical_expr::{col, Expr}, physical_expr::PhysicalSortExpr, physical_plan::{ metrics::MetricsSet, stream::RecordBatchStreamAdapter, DisplayAs, DisplayFormatType, @@ -30,10 +27,7 @@ use datafusion::{ use futures::Stream; use pometry_storage::prelude::*; use raphtory::disk_graph::DiskGraphStorage; - -use crate::executor::{arrow2_to_arrow_buf, ExecError}; - -use super::plan_properties; +use std::{any::Any, fmt::Formatter, sync::Arc}; pub struct EdgeListTableProvider { layer_id: usize, diff --git a/raphtory-cypher/src/executor/table_provider/node.rs b/raphtory-cypher/src/executor/table_provider/node.rs index 09b9135ec1..36c4e62173 100644 --- a/raphtory-cypher/src/executor/table_provider/node.rs +++ b/raphtory-cypher/src/executor/table_provider/node.rs @@ -15,7 +15,7 @@ use datafusion::{ config::ConfigOptions, datasource::{TableProvider, TableType}, error::DataFusionError, - execution::{context::SessionState, SendableRecordBatchStream, TaskContext}, + execution::{SendableRecordBatchStream, TaskContext}, logical_expr::Expr, physical_plan::{ metrics::MetricsSet, stream::RecordBatchStreamAdapter, DisplayAs, DisplayFormatType, diff --git a/raphtory-cypher/src/hop/execution.rs b/raphtory-cypher/src/hop/execution.rs index 40a8a693cb..ebc8bd34ac 100644 --- a/raphtory-cypher/src/hop/execution.rs +++ b/raphtory-cypher/src/hop/execution.rs @@ -1,18 +1,9 @@ -use std::{ - any::Any, - collections::HashSet, - fmt, - ops::Range, - pin::Pin, - sync::Arc, - task::{Context, Poll}, -}; - +use super::operator::HopPlan; use crate::{ arrow2::{offset::Offset, types::NativeType}, executor::table_provider::plan_properties, + take_record_batch, }; -// use disk_graph::compute::take_record_batch; use arrow_array::{ builder::{ make_builder, ArrayBuilder, Float32Builder, Float64Builder, GenericStringBuilder, @@ -23,7 +14,6 @@ use arrow_array::{ }; use arrow_schema::{DataType, Schema, SchemaRef}; use async_trait::async_trait; -// use datafusion::physical_plan::ExecutionPlanProperties; use datafusion::{ common::DFSchemaRef, error::DataFusionError, @@ -33,11 +23,7 @@ use datafusion::{ SendableRecordBatchStream, }, }; -// use datafusion::physical_plan::ExecutionPlanProperties; -use datafusion::physical_expr::Partitioning; use futures::{Stream, StreamExt}; - -use crate::take_record_batch; use pometry_storage::graph_fragment::TempColGraphFragment; use raphtory::{ core::{entities::VID, Direction}, @@ -46,8 +32,15 @@ use raphtory::{ DiskGraphStorage, }, }; - -use super::operator::HopPlan; +use std::{ + any::Any, + collections::HashSet, + fmt, + ops::Range, + pin::Pin, + sync::Arc, + task::{Context, Poll}, +}; #[derive(Debug)] pub struct HopExec { diff --git a/raphtory-cypher/src/lib.rs b/raphtory-cypher/src/lib.rs index 2ec96ec1a7..5d42f52ee3 100644 --- a/raphtory-cypher/src/lib.rs +++ b/raphtory-cypher/src/lib.rs @@ -12,9 +12,15 @@ pub mod transpiler; #[cfg(feature = "storage")] mod cypher { + use super::{ + executor::{table_provider::edge::EdgeListTableProvider, ExecError}, + *, + }; + use crate::{ + executor::table_provider::node::NodeTableProvider, + hop::rule::{HopQueryPlanner, HopRule}, + }; use arrow::compute::take; - use std::sync::Arc; - use arrow_array::{builder, Array, RecordBatch, UInt64Array}; use arrow_schema::{ArrowError, DataType}; use datafusion::{ @@ -22,23 +28,15 @@ mod cypher { error::DataFusionError, execution::{ config::SessionConfig, - context::{SQLOptions, SessionContext, SessionState}, + context::{SQLOptions, SessionContext}, runtime_env::RuntimeEnv, + SessionStateBuilder, }, logical_expr::{create_udf, ColumnarValue, LogicalPlan, Volatility}, physical_plan::SendableRecordBatchStream, }; - - use super::{ - executor::{table_provider::edge::EdgeListTableProvider, ExecError}, - *, - }; use raphtory::disk_graph::DiskGraphStorage; - - use crate::{ - executor::table_provider::node::NodeTableProvider, - hop::rule::{HopQueryPlanner, HopRule}, - }; + use std::sync::Arc; pub use polars_arrow as arrow2; @@ -66,11 +64,17 @@ mod cypher { let runtime = Arc::new(RuntimeEnv::default()); let state = if enable_hop_optim { - SessionState::new_with_config_rt(config, runtime) + SessionStateBuilder::new() + .with_config(config) + .with_runtime_env(runtime) .with_query_planner(Arc::new(HopQueryPlanner {})) - .add_optimizer_rule(Arc::new(HopRule::new(g.clone()))) + .with_optimizer_rule(Arc::new(HopRule::new(g.clone()))) + .build() } else { - SessionState::new_with_config_rt(config, runtime) + SessionStateBuilder::new() + .with_config(config) + .with_runtime_env(runtime) + .build() }; let ctx = SessionContext::new_with_state(state); @@ -166,19 +170,12 @@ mod cypher { #[cfg(test)] mod test { - use arrow::compute::concat_batches; - use datafusion::physical_plan::coalesce_batches::CoalesceBatchesExec; - use std::path::Path; - - // FIXME: actually assert the tests below - // use pretty_assertions::assert_eq; - use arrow::util::pretty::print_batches; + use crate::run_cypher; + use arrow::{compute::concat_batches, util::pretty::print_batches}; use arrow_array::RecordBatch; - use tempfile::tempdir; - use raphtory::{disk_graph::DiskGraphStorage, prelude::*}; - - use crate::{run_cypher, run_sql}; + use std::path::Path; + use tempfile::tempdir; lazy_static::lazy_static! { static ref EDGES: Vec<(u64, u64, i64, f64)> = vec![ diff --git a/raphtory/src/db/api/storage/graph/nodes/node_storage_ops.rs b/raphtory/src/db/api/storage/graph/nodes/node_storage_ops.rs index fe6cda4dd4..6ec6ec5efa 100644 --- a/raphtory/src/db/api/storage/graph/nodes/node_storage_ops.rs +++ b/raphtory/src/db/api/storage/graph/nodes/node_storage_ops.rs @@ -23,7 +23,11 @@ pub trait NodeStorageOps<'a>: Sized { fn prop(self, prop_id: usize) -> Option; - fn edges_iter(self, layers: &LayerIds, dir: Direction) -> impl Iterator + 'a; + fn edges_iter( + self, + layers: &LayerIds, + dir: Direction, + ) -> impl Iterator + Send + 'a; fn node_type_id(self) -> usize; From 5862d1898020514a4f76b727debb7cbded568324 Mon Sep 17 00:00:00 2001 From: Lucas Jeub Date: Thu, 7 Nov 2024 16:58:50 +0100 Subject: [PATCH 17/17] add back the default features --- raphtory-cypher/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/raphtory-cypher/src/lib.rs b/raphtory-cypher/src/lib.rs index 5d42f52ee3..f1ff97ee78 100644 --- a/raphtory-cypher/src/lib.rs +++ b/raphtory-cypher/src/lib.rs @@ -67,12 +67,14 @@ mod cypher { SessionStateBuilder::new() .with_config(config) .with_runtime_env(runtime) + .with_default_features() .with_query_planner(Arc::new(HopQueryPlanner {})) .with_optimizer_rule(Arc::new(HopRule::new(g.clone()))) .build() } else { SessionStateBuilder::new() .with_config(config) + .with_default_features() .with_runtime_env(runtime) .build() };