Batch operation refactoring#297
Draft
yfukai wants to merge 1 commit into
Draft
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #297 +/- ##
==========================================
- Coverage 87.75% 86.55% -1.20%
==========================================
Files 57 57
Lines 4947 5131 +184
Branches 872 920 +48
==========================================
+ Hits 4341 4441 +100
- Misses 381 442 +61
- Partials 225 248 +23 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Human summary
batch_remove_*bulk_add_...insideadd_...Copilot Summary
This pull request introduces bulk mutation operations and refactors node and edge addition/removal logic across the graph array and graph view classes. The changes improve efficiency, ensure atomic validation, and unify signal emission for both single and bulk operations. The most important updates are summarized below.
Bulk mutation API additions
bulk_remove_nodesandbulk_remove_edgesmethods toBaseGraph,RustWorkXGraph, andGraphView, enabling efficient removal of multiple nodes or edges at once with atomic validation and proper signal emission. [1] [2] [3] [4] [5]_bulk_add_nodes_local,_bulk_remove_nodes_local,_bulk_add_edges_local,_bulk_remove_edges_local) inRustWorkXGraphto centralize and optimize node/edge manipulation logic.Signal emission and event handling improvements
emit_node_added_events,emit_node_updated_events), ensuring consistent and efficient signal handling for both single and bulk operations. [1] [2] [3] [4] [5]GraphArrayevent handlers to support bulk node add/update events by iterating over event sequences, improving compatibility with the new bulk APIs. [1] [2]Codebase and API consistency