Skip to content

Remove some networkx dependencies #264

@iciclejj

Description

@iciclejj

Outside of dhlab.legacy, networkx is currently used only for the purpose of converting an nx-compatible "edge list" to an nx graph object, immediately before returning it to the user:

G = nx.Graph()
G.add_weighted_edges_from(edges)
return G

G.add_weighted_edges_from(edgelist)
return G

As the library stands right now, there is no particular need for it to be reworked. However, if the legacy part of the library will end up getting deprecated or lazily imported, then these two pieces of code will be the only remaining nx dependencies.

If dhlab.legacy does get removed, I suggest we instead just return the computed edge lists, and let the user do the G.add_weighted_edges_from(edges) step themselves, if desired.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesPull requests that update a dependency file

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions