Rename undirected option to add reverse edges#9
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR renames the “undirected” option to an explicit reverse-edge expansion option (add_reverse_edges / --add-reverse-edges), keeping graphs directed by default while allowing symmetric adjacency when requested, and updates documentation + tests accordingly.
Changes:
- Rename the public API/CLI flag from
undirectedtoadd_reverse_edges/--add-reverse-edges. - Update CSR conversion logic and validations to treat reverse-edge expansion as an explicit opt-in.
- Update docs/spec and tests, including a new parquet metadata assertion for
icebug_disk_version.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_memory.py | Updates in-memory API tests to use add_reverse_edges. |
| tests/test_cli.py | Updates CLI conversion tests for new flag; adds parquet metadata assertion. |
| README.md | Updates examples and narrative to describe reverse-edge expansion instead of “undirected”. |
| icebug_format/memory.py | Renames parameter and updates docs/error messaging for reverse-edge expansion. |
| icebug_format/graphar.py | Renames flag and adds reverse-edge expansion + homogeneous-type validation. |
| icebug_format/cli.py | Renames CLI flag and internal parameter; updates help text and messages. |
| doc/spec.md | Updates CLI/spec wording from directed/undirected to direction + reverse edges. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Copilot stopped work on behalf of
adsharma due to an error
May 27, 2026 02:28
Contributor
|
there's another problem with providing |
adsharma
commented
May 27, 2026
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
Why
Some input relationships are naturally directed, for example:
That input may be directed, but callers may still want to add reverse edges for algorithms that expect symmetric adjacency, such as community detection, or for databases that prefer this denormalization to answer reverse queries efficiently.
The new name describes the actual behavior: the converter keeps the graph directed by default and only adds reverse edges when explicitly requested.
Validation