Skip to content

Commit

Permalink
add deps
Browse files Browse the repository at this point in the history
  • Loading branch information
shivamka1 committed Jun 20, 2024
1 parent 96267dc commit 1323b32
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
10 changes: 6 additions & 4 deletions raphtory/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,11 @@ io = [
# Enables generating the pyo3 python bindings
python = [
"io",
"arrow",
"dep:pyo3",
"dep:num",
"dep:display-error-chain",
"dep:polars-arrow",
"polars-arrow?/compute",
"dep:polars-parquet",
"dep:kdam",
"dep:rpds",
]
Expand All @@ -119,10 +118,9 @@ search = ["dep:tantivy"]
vectors = ["dep:futures-util", "dep:async-trait", "dep:async-openai"]
# storage
storage = [
"arrow",
"pometry-storage",
"dep:polars-arrow",
"dep:polars-utils",
"dep:polars-parquet",
"dep:memmap2",
"dep:ahash",
"dep:tempfile",
Expand All @@ -133,3 +131,7 @@ storage = [
"polars-arrow?/arrow_rs",
"polars-parquet?/compression",
]
arrow = [
"dep:polars-arrow",
"dep:polars-parquet",
]
2 changes: 2 additions & 0 deletions raphtory/src/core/utils/errors.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crate::core::{utils::time::error::ParseTimeError, ArcStr, Prop, PropType};
#[cfg(feature = "arrow")]
use polars_arrow::legacy::error;
#[cfg(feature = "search")]
use tantivy;
Expand All @@ -7,6 +8,7 @@ use tantivy::query::QueryParserError;

#[derive(thiserror::Error, Debug)]
pub enum GraphError {
#[cfg(feature = "arrow")]
#[error("Arrow error: {0}")]
Arrow(#[from] error::PolarsError),
#[error("Graph error occurred")]
Expand Down
3 changes: 1 addition & 2 deletions raphtory/src/python/graph/io/parquet_loaders.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{
core::{entities::graph::tgraph::InternalGraph, utils::errors::GraphError, Prop},
python::graph::io::{dataframe::*, df_loaders::*, panda_loaders::process_pandas_py_df},
python::graph::io::{dataframe::*, df_loaders::*},
};
use itertools::Itertools;
use polars_arrow::{
Expand All @@ -13,7 +13,6 @@ use polars_parquet::{
read,
read::{read_metadata, FileMetaData, FileReader},
};
use pyo3::{types::IntoPyDict, PyAny, PyErr, Python};
use std::{collections::HashMap, path::Path};

pub fn load_nodes_from_parquet(
Expand Down

0 comments on commit 1323b32

Please sign in to comment.