Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ updates:
- package-ecosystem: "cargo"
directory: "/" # Location of package manifests
schedule:
interval: "daily"
interval: "monthly"
18 changes: 1 addition & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI

on:
pull_request:
types: [ready_for_review, synchronize]
types: [opened, ready_for_review, synchronize]
push:
branches:
- main
Expand Down Expand Up @@ -34,19 +34,3 @@ jobs:

- name: docs
run: cargo doc --document-private-items --no-deps

- name: fmt rig_versioned_memory example
run: cargo fmt --all -- --check
working-directory: examples/rig_versioned_memory

- name: build rig_versioned_memory example
run: cargo build --verbose
working-directory: examples/rig_versioned_memory

- name: test rig_versioned_memory example
run: cargo test --verbose
working-directory: examples/rig_versioned_memory

- name: clippy rig_versioned_memory example
run: cargo clippy
working-directory: examples/rig_versioned_memory
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build Python Package

on:
pull_request:
types: [ready_for_review, synchronize]
types: [opened, ready_for_review, synchronize]
paths:
- 'python/**'
push:
Expand Down
32 changes: 16 additions & 16 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ tempfile = "3.0"
tokio = { version = "1.0", features = ["full"] }

[features]
default = ["digest_base64", "prolly_balance_max_nodes", "git", "sql", "rocksdb_storage"]
default = ["digest_base64", "prolly_balance_max_nodes", "git", "sql"]
tracing = ["dep:tracing"]
digest_base64 = ["dep:base64"]
prolly_balance_max_nodes = []
Expand All @@ -67,46 +67,46 @@ path = "src/bin/git-prolly.rs"
required-features = ["git", "sql"]

[[bench]]
name = "prollytree_bench"
name = "tree"
harness = false

[[bench]]
name = "sql_bench"
name = "sql"
harness = false
required-features = ["sql"]

[[bench]]
name = "git_prolly_bench"
name = "git_prolly"
harness = false
required-features = ["git", "sql"]

[[bench]]
name = "storage_bench"
name = "storage"
harness = false

[[example]]
name = "proof_visualization"
path = "examples/proof_visualization.rs"
name = "proof"
path = "examples/proof.rs"

[[example]]
name = "git_sql"
path = "examples/git_sql.rs"
name = "sql"
path = "examples/sql.rs"
required-features = ["sql"]

[[example]]
name = "git_diff"
path = "examples/git_diff.rs"
name = "diff"
path = "examples/diff.rs"
required-features = ["git"]

[[example]]
name = "git_merge"
path = "examples/git_merge.rs"
name = "merge"
path = "examples/merge.rs"
required-features = ["git"]

[[example]]
name = "rocksdb_storage"
path = "examples/rocksdb_storage.rs"
name = "torage"
path = "examples/storage.rs"
required-features = ["rocksdb_storage"]

[workspace]
members = ["examples/rig_versioned_memory", "examples/financial_advisor"]
members = ["examples/financial_advisor"]
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,27 +206,28 @@ For detailed documentation and examples, please visit [docs.rs/prollytree](https
## Roadmap

The following features are for Prolly tree library for Version 0.1.0:
- [X] Implement basic Prolly Tree structure
- [X] Implement insertion and deletion operations
- [X] Implement tree traversal and search
- [X] Implement tree size and depth calculation
- [X] Implement tree configuration and tree meta data handling
- [X] Implement proof generation and verification
- [X] Batch insertion and deletion
- [X] implement basic Prolly Tree structure
- [X] implement insertion and deletion operations
- [X] implement tree traversal and search
- [X] implement tree size and depth calculation
- [X] implement tree configuration and tree meta data handling
- [X] implement proof generation and verification
- [X] batch insertion and deletion

The following features are for Prolly tree library for Version 0.2.0:
- [X] Arrow block encoding and decoding
- [X] Parquet/Avro block encoding and decoding

The following features are for Prolly tree library for Version 0.2.1:
- [X] tree diffing and merging examples
- [X] show history of changes of the Prolly tree (git logs style) using `gitoxide` crate
- [X] show history of changes of the Prolly tree
- [X] support python bindings for Prolly Tree
- [X] support sql query based on gluesql as a query engine
- [X] add usage examples for git-prolly use cases
- [X] add usage examples for ai agent memory use cases
- [X] add usage examples for AI agent memory use cases
- [X] support rocksdb as storage backend
- [ ] support ipdl as storage backend
- [ ] support IPDL as storage backend
- [X] generic storage backend support for VersionedKvStore

## Contributing

Expand Down
30 changes: 27 additions & 3 deletions benches/git_prolly_bench.rs → benches/git_prolly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use prollytree::config::TreeConfig;
#[cfg(all(feature = "git", feature = "sql"))]
use prollytree::git::GitNodeStorage;
#[cfg(all(feature = "git", feature = "sql"))]
use prollytree::git::VersionedKvStore;
use prollytree::git::GitVersionedKvStore;
#[cfg(all(feature = "git", feature = "sql"))]
use prollytree::sql::ProllyStorage;
#[cfg(all(feature = "git", feature = "sql"))]
Expand Down Expand Up @@ -60,7 +60,19 @@ fn bench_git_versioned_commits(c: &mut Criterion) {
b.iter_batched(
|| {
let temp_dir = TempDir::new().unwrap();
let store = VersionedKvStore::<32>::init(temp_dir.path()).unwrap();

// Initialize git repository first
std::process::Command::new("git")
.args(&["init"])
.current_dir(temp_dir.path())
.output()
.unwrap();

// Create dataset subdirectory
let dataset_dir = temp_dir.path().join("dataset");
std::fs::create_dir_all(&dataset_dir).unwrap();

let store = GitVersionedKvStore::<32>::init(&dataset_dir).unwrap();
(store, temp_dir, generate_versioned_data(5, size))
},
|(mut store, _temp_dir, data)| {
Expand Down Expand Up @@ -190,7 +202,19 @@ fn bench_git_branch_operations(c: &mut Criterion) {
b.iter_batched(
|| {
let temp_dir = TempDir::new().unwrap();
let mut store = VersionedKvStore::<32>::init(temp_dir.path()).unwrap();

// Initialize git repository first
std::process::Command::new("git")
.args(&["init"])
.current_dir(temp_dir.path())
.output()
.unwrap();

// Create dataset subdirectory
let dataset_dir = temp_dir.path().join("dataset");
std::fs::create_dir_all(&dataset_dir).unwrap();

let mut store = GitVersionedKvStore::<32>::init(&dataset_dir).unwrap();

// Initialize with some data
for i in 0..size {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions examples/financial_advisor/src/memory/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use anyhow::Result;
use chrono::{DateTime, Utc};
use gluesql_core::prelude::{Glue, Payload};
use gluesql_core::store::Transaction;
use prollytree::git::{GitKvError, VersionedKvStore};
use prollytree::git::{GitKvError, GitVersionedKvStore};
use prollytree::sql::ProllyStorage;
use std::any::Any;
use std::path::Path;
Expand Down Expand Up @@ -68,7 +68,7 @@ pub trait Storable: serde::Serialize + serde::de::DeserializeOwned + Clone {
/// Core memory store with versioning capabilities
pub struct MemoryStore {
store_path: String,
versioned_store: VersionedKvStore<32>,
versioned_store: GitVersionedKvStore<32>,
audit_enabled: bool,
}

Expand All @@ -91,10 +91,10 @@ impl MemoryStore {
// Initialize VersionedKvStore in dataset subdirectory
// Check if prolly tree config exists to determine if we should init or open
let versioned_store = if current_dir.join(PROLLY_CONFIG_FILE).exists() {
VersionedKvStore::<32>::open(&current_dir)
GitVersionedKvStore::<32>::open(&current_dir)
.map_err(|e| anyhow::anyhow!("Failed to open versioned store: {:?}", e))?
} else {
VersionedKvStore::<32>::init(&current_dir)
GitVersionedKvStore::<32>::init(&current_dir)
.map_err(|e| anyhow::anyhow!("Failed to init versioned store: {:?}", e))?
};

Expand Down
File renamed without changes.
File renamed without changes.
5 changes: 0 additions & 5 deletions examples/rig_versioned_memory/.env.example

This file was deleted.

17 changes: 0 additions & 17 deletions examples/rig_versioned_memory/.gitignore

This file was deleted.

23 changes: 0 additions & 23 deletions examples/rig_versioned_memory/Cargo.toml

This file was deleted.

Loading