feat: library usability improvements, hierarchy support, and cleanup#4
Merged
randomvariable merged 6 commits intomainfrom Mar 8, 2026
Merged
feat: library usability improvements, hierarchy support, and cleanup#4randomvariable merged 6 commits intomainfrom
randomvariable merged 6 commits intomainfrom
Conversation
…t, RunConfiguration These types were superseded by GraphSource, RunConfig, and RunMode in core::config/backend but never removed. Since there is no published release, drop them without deprecation period. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The refinement_gamma parameter was accepted but unused (prefixed with _) in refine_singleton_merge. Remove it from RunConfig, multilevel_leiden, refine_singleton_merge, CLI, and all test call sites. Incorporates the intent of PR #3 with additional missed call sites fixed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add conditional serde derives behind "serde" feature flag - Make graph_source Optional in RunConfig (library users don't need it) - Add builder methods: with_mode, with_resolution, with_max_iterations, with_quality_tolerance - Add run_simple() entry point for edges-in, partition-out usage - Re-export PartitionResult, PartitionState, CommunityRelation, CommunityState from crate root - Gate CLI module behind "cli" feature Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CommunityState wraps PartitionState to provide a persistent, serializable community detection state that supports incremental graph updates via delta edge lists. Key features: - initial() runs full Leiden and captures hierarchy levels - update() applies delta edges incrementally, updating level 0 - hierarchy_levels() exposes the multi-level community structure - community_tree() derives parent-child relationships via majority vote - into_parts()/from_parts() for decomposed storage and restoration Hierarchy support enables DRIFT search (top-down traversal of community tree for progressive query refinement). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests cover: - hierarchy_levels populated after initial() - hierarchy_levels preserved and extended after update() - community_tree() returns valid parent-child relations - into_parts/from_parts roundtrip preserves hierarchy - incremental update works after restore from parts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add Quick Start sections covering: - Simple edges-in/partition-out usage with run_simple() - Configured runs with RunConfig builders - Weighted edges and dataset identifiers - Incremental updates with CommunityState - Hierarchy access for DRIFT search - CLI usage Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GraphFormat,GraphSourceType,GraphDataset,RunConfiguration— superseded by types incore::config/core::backendwith no published release to maintain compatibility forrefinement_gamma: Parameter was accepted but ignored (_refinement_gamma). Removed fromRunConfig,multilevel_leiden,refine_singleton_merge, CLI, and all test call sites. Subsumes PR remove unusedrefinement_gamma#3 with additional missed sites fixedOptional<GraphSource>inRunConfig, builder methods (with_mode,with_resolution, etc.),run_simple()entry point, crate-root re-exports, CLI gated behind feature flagCommunityStatetype for persistent incremental community detection with full hierarchy support —hierarchy_levels(),community_tree()for parent-child derivation via majority vote,into_parts()/from_parts()for decomposed storageTest Plan
cargo test— all 27 tests + 3 doc-tests pass🤖 Generated with Claude Code