Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 13 additions & 56 deletions Cargo.lock

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

4 changes: 0 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,11 @@ bytemuck = { version = "1.25.0", features = ["derive"] }
ouroboros = "0.18.5"
url = "2.5"
base64-compat = { package = "base64-compat", version = "1.0.0" }
prost = "0.13.5"
prost-types = "0.13.5"
prost-build = "0.13.5"
lazy_static = "1.5.0"
pest = "2.8.6"
pest_derive = "2.8.6"
minijinja = "2.18.0"
minijinja-contrib = { version = "2.18.0", features = ["datetime"] }

lancedb = { version = "0.27.2", features = [] }
heed = "0.22.0"
sqlparser = "0.59.0"
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ RUN cargo chef prepare --recipe-path recipe.json

FROM chef AS builder
ARG RAPHTORY_PROFILE
RUN apt-get update && apt-get install -y protobuf-compiler
COPY --from=planner /app/recipe.json recipe.json
RUN cargo chef cook --profile=${RAPHTORY_PROFILE} --recipe-path recipe.json
COPY . .
Expand Down
1 change: 0 additions & 1 deletion python.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ WORKDIR /app
ENV HOME=/root
ENV PYENV_ROOT=$HOME/.pyenv
ENV PATH=$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
RUN apt-get update && apt-get install -y protobuf-compiler
RUN curl -fsSL https://pyenv.run | bash
RUN PYTHON_VERSION=$(echo ${BASE_PYTHON_IMAGE_TAG} | cut -d'-' -f1) && \
pyenv install ${PYTHON_VERSION} && \
Expand Down
1 change: 0 additions & 1 deletion python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ clam-core = { workspace = true, features = ["python"] }
[features]
extension-module = ["pyo3/extension-module"]
search = ["raphtory/search", "raphtory-graphql/search"]
proto = ["raphtory/proto"]


[build-dependencies]
Expand Down
3 changes: 2 additions & 1 deletion python/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pass_env =
DISK_TEST_MARK

[testenv:.pkg]
set_env = MATURIN_PEP517_ARGS="--profile=build-fast"
pass_env = MATURIN_PEP517_ARGS

[testenv:search]
Expand All @@ -25,7 +26,7 @@ commands = pytest {posargs} {tty:--color=yes} tests/test_search

[testenv:.pkg_search]
set_env =
MATURIN_PEP517_ARGS="--features=search,extension-module"
MATURIN_PEP517_ARGS="--features=search,extension-module --profile=build-fast"


[testenv:export]
Expand Down
1 change: 0 additions & 1 deletion raphtory-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ python = [
"dep:pyo3", "dep:pyo3-arrow", "dep:display-error-chain", "dep:numpy"
]

proto = []
vectors = []
template = ["dep:minijinja"]
search = []
Expand Down
7 changes: 2 additions & 5 deletions raphtory-benchmark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,12 @@ name = "materialise"
harness = false

[[bench]]
name = "proto_encode"
name = "encode"
harness = false
required-features = ["proto"]

[[bench]]
name = "proto_decode"
name = "decode"
harness = false
required-features = ["proto"]

[[bench]]
name = "search_bench"
Expand All @@ -87,5 +85,4 @@ harness = false

[features]
search = ["raphtory/search"]
proto = ["raphtory/proto"]
vectors = ["raphtory/vectors"]
12 changes: 6 additions & 6 deletions raphtory-benchmark/benches/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use criterion::{criterion_group, criterion_main, Criterion, Throughput};
use raphtory::{graph_loader::lotr_graph::lotr_graph, prelude::*};
use raphtory_api::core::storage::timeindex::AsTime;
use raphtory_benchmark::common::{
bootstrap_graph, run_graph_ops_benches, run_large_ingestion_benchmarks,
run_proto_decode_benchmark, run_proto_encode_benchmark,
bootstrap_graph, run_decode_benchmark, run_encode_benchmark, run_graph_ops_benches,
run_large_ingestion_benchmarks,
};

pub fn base(c: &mut Criterion) {
Expand Down Expand Up @@ -50,10 +50,10 @@ pub fn base(c: &mut Criterion) {
}

run_graph_ops_benches(c, "lotr_graph", graph.clone(), layered_graph);
let mut proto_group = c.benchmark_group("lotr_graph");
run_proto_decode_benchmark(&mut proto_group, graph.clone());
run_proto_encode_benchmark(&mut proto_group, graph.clone());
proto_group.finish();
let mut encode_decode_group = c.benchmark_group("lotr_graph");
run_decode_benchmark(&mut encode_decode_group, graph.clone());
run_encode_benchmark(&mut encode_decode_group, graph.clone());
encode_decode_group.finish();
}

criterion_group!(benches, base);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
use criterion::{criterion_group, criterion_main, Criterion};
use raphtory::graph_loader::{lotr_graph::lotr_graph, sx_superuser_graph::sx_superuser_graph};
use raphtory_benchmark::common::run_proto_decode_benchmark;
use raphtory_benchmark::common::run_decode_benchmark;

fn bench(c: &mut Criterion) {
let graph = sx_superuser_graph().unwrap();
let mut group = c.benchmark_group("proto_sx_superuser");
let mut group = c.benchmark_group("decode_sx_superuser");
group.sample_size(10);
run_proto_decode_benchmark(&mut group, graph);
run_decode_benchmark(&mut group, graph);
group.finish();

let mut group = c.benchmark_group("proto_lotr");
let mut group = c.benchmark_group("decode_lotr");
let graph = lotr_graph();
group.sample_size(100);
run_proto_decode_benchmark(&mut group, graph);
run_decode_benchmark(&mut group, graph);
group.finish();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use criterion::{criterion_group, criterion_main, Criterion};
use raphtory::graph_loader::sx_superuser_graph::sx_superuser_graph;
use raphtory_benchmark::common::run_proto_encode_benchmark;
use raphtory_benchmark::common::run_encode_benchmark;

fn bench(c: &mut Criterion) {
let graph = sx_superuser_graph().unwrap();
let mut group = c.benchmark_group("proto_sx_superuser");
let mut group = c.benchmark_group("encode_sx_superuser");
group.sample_size(10);
run_proto_encode_benchmark(&mut group, graph);
run_encode_benchmark(&mut group, graph);
group.finish();
}

Expand Down
8 changes: 4 additions & 4 deletions raphtory-benchmark/src/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -603,8 +603,8 @@ pub fn run_graph_ops_benches(
);
}

pub fn run_proto_encode_benchmark(group: &mut BenchmarkGroup<WallTime>, graph: Graph) {
bench(group, "proto_encode", None, |b: &mut Bencher| {
pub fn run_encode_benchmark(group: &mut BenchmarkGroup<WallTime>, graph: Graph) {
bench(group, "encode", None, |b: &mut Bencher| {
b.iter_batched(
|| TempDir::new().unwrap(),
|f| graph.encode(f.path()).unwrap(),
Expand All @@ -613,10 +613,10 @@ pub fn run_proto_encode_benchmark(group: &mut BenchmarkGroup<WallTime>, graph: G
});
}

pub fn run_proto_decode_benchmark(group: &mut BenchmarkGroup<WallTime>, graph: Graph) {
pub fn run_decode_benchmark(group: &mut BenchmarkGroup<WallTime>, graph: Graph) {
let f = TempDir::new().unwrap();
graph.encode(f.path()).unwrap();
bench(group, "proto_decode", None, |b| {
bench(group, "decode", None, |b| {
b.iter(|| Graph::decode(f.path()).unwrap())
})
}
Expand Down
21 changes: 4 additions & 17 deletions raphtory-tests/tests/db_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ use bigdecimal::BigDecimal;
use chrono::NaiveDateTime;
use itertools::Itertools;
use proptest::{arbitrary::any, prop_assert, prop_assert_eq, proptest, sample::subsequence};
#[cfg(feature = "proto")]
use raphtory::serialise::StableDecode;
use raphtory::{
algorithms::{
centrality::{degree_centrality::degree_centrality, pagerank::unweighted_page_rank},
Expand Down Expand Up @@ -52,10 +50,11 @@ use std::{
ops::{Deref, Range},
sync::Arc,
};
#[cfg(feature = "proto")]
use tempfile::TempDir;
use tracing::{error, info};

#[cfg(feature = "io")]
use {raphtory::serialise::StableDecode, tempfile::TempDir};

#[test]
fn edge_metadata() -> Result<(), GraphError> {
let g = Graph::new();
Expand Down Expand Up @@ -759,7 +758,7 @@ fn props_with_layers() {
}

#[test]
#[cfg(feature = "proto")]
#[cfg(feature = "io")]
fn graph_save_to_load_from_file() {
let vs = vec![
(1, 1, 2),
Expand Down Expand Up @@ -2962,18 +2961,6 @@ fn test_node_state_merge() {
assert_eq!(m2.values().num_rows(), graph.count_nodes());
}

#[test]
#[cfg(feature = "proto")]
fn save_load_serial() {
let g = Graph::new();
g.add_edge(0, 0, 1, NO_PROPS, None).unwrap();
let dir = tempfile::tempdir().unwrap();
let file_path = dir.path().join("abcd11");
g.encode(&file_path).unwrap();
let gg = Graph::decode(&file_path).unwrap();
assert_graph_equal(&g, &gg);
}

#[test]
fn test_node_type_changes() {
let g = Graph::new();
Expand Down
Loading
Loading