Skip to content

Preserve directed multigraphs in NetworkX edge exports - #1546

Merged
SkBlaz merged 1 commit into
masterfrom
fix/result-networkx-multidigraph-direction
Oct 6, 2026
Merged

SkBlaz merged 1 commit into
masterfrom
fix/result-networkx-multidigraph-direction

Conversation

@SkBlaz

@SkBlaz SkBlaz commented Oct 6, 2026

Copy link
Copy Markdown
Owner

NetworkX export converted a supplied MultiDiGraph into an undirected MultiGraph, making one-way edges traversable in reverse. The generic multigraph type check matched directed multigraphs first.

Choose MultiDiGraph before MultiGraph when constructing the selected-edge graph. Preserve graph direction, attributes, and source immutability; document the behavior.

Validation: 15 original regression failures and 47 passing controls; all 62 new cases pass after the fix. After rebasing onto current master, 134 related tests pass on Python 3.12. Prior Python 3.9 validation passed 128 cases with 6 optional Arrow skips. Tests cover all four NetworkX graph types, empty and partial selections, reciprocal edges, weights, node attributes, and multilayer edge queries.

@SkBlaz
SkBlaz merged commit 173b34d into master Oct 6, 2026
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant