Graph Snapshot Feature: Store & Retrieve Graph History#600
Open
Susmita331 wants to merge 61 commits intocodezonediitj:mainfrom
Open
Graph Snapshot Feature: Store & Retrieve Graph History#600Susmita331 wants to merge 61 commits intocodezonediitj:mainfrom
Susmita331 wants to merge 61 commits intocodezonediitj:mainfrom
Conversation
…ng real-time timestamps.
Implemented list_snapshots() and attached snapshot methods to Graph, ensuring timestamp-based snapshots across all graph types.
…uture possibilities
Author
|
@czgdp1807 @Kishan-Ved Please review the code and give feedback |
…transcript, and educational modal
…h aligned descriptions
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.
This PR introduces timestamped graph snapshots, allowing users to store, retrieve, and track historical graph states for debugging, fraud detection, and network analysis.
Instead of relying on cached data (pycache), this implementation ensures explicit snapshot storage, making graph versioning deterministic and retrievable across sessions.
##Key Features
Snapshot Storage & Retrieval
Saves graph states with real-time timestamps (add_snapshot()).
Restores a past state with get_snapshot(timestamp).
Lists all stored timestamps via list_snapshots().
Why This Over pycache?
pycache is for Python bytecode compilation, not structured historical tracking.
This approach persists meaningful snapshots, independent of runtime cache invalidation.
Ensures predictable retrieval of graph states, even after code modifications.
Edge & Adjacency List Fixes
Ensures edge weights and relationships persist across snapshots.
Fixes deep-copy issues with GraphEdge.
Tests & Validation
Added test_snapshot_creation, test_snapshot_retrieval, and test_invalid_snapshot.
All tests pass successfully with pytest --cov=./.
##Documentation
Added timestamped_graph.md detailing:
Feature usage & API methods
Real-world applications
Future improvements (e.g., matrix support, optimized storage).