Repository navigation
feat: expose graph_diff in public API + add worked example to README - #164
Open
Koushik-Salammagari wants to merge 1 commit into
Open
Koushik-Salammagari wants to merge 1 commit into
Koushik-Salammagari wants to merge 1 commit into
Conversation
- Add `graph_diff` to the lazy-import map in `__init__.py` so callers can do `import graphify; graphify.graph_diff(G_old, G_new)` without importing from the internal `analyze` module directly. - Add 2 tests verifying the public API is callable and returns the expected schema (new_nodes, removed_nodes, new_edges, removed_edges, summary). - Add a "What it looks like" section to README with a worked example showing god nodes, surprising connections, and community output from running graphify on httpx. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Author
|
Hi! Just checking in on this PR — happy to make any changes if needed. Let me know if there's anything blocking review. |
phreakocious
added a commit
to phreakocious/graphify
that referenced
this pull request
May 6, 2026
Adds graph_diff to graphify's lazy __getattr__ map so it's accessible as graphify.graph_diff() without importing graphify.analyze. The underlying function and graphify diff CLI verb already exist; this just promotes it to the public surface. Adapted from upstream PR Graphify-Labs#164 by Koushik-Salammagari. Co-Authored-By: Claude Opus 4.7 <[email protected]>
Closed
1 task done
This branch has not been deployed
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
graph_diffis now accessible asgraphify.graph_diff()via the lazy-import map in__init__.py— no need to import from the internalgraphify.analyzemodule.new_nodes,removed_nodes,new_edges,removed_edges,summary).Motivation
god_nodes,surprising_connections, andsuggest_questionswere already in the public API —graph_diff(added recently) was the only analyze function missing from__init__.py. This closes the gap and makes the diff workflow scriptable without internal imports.The README example closes issues #12 and #160 (requests for a visual/output demo).
Test plan
pytest tests/test_analyze.py -q— all tests pass (including 2 new public API tests)