Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Add subgraph_view and reverse_view to nx namespace directly through graphviews #6689

Merged
merged 1 commit into from
May 19, 2023

Conversation

MridulS
Copy link
Member

@MridulS MridulS commented May 15, 2023

Currently subgraph_view and reverse_view are available in the global nx namespace but they are exposed via a redirect in functions.py. This was added in #3627 and I'm not a 100% sure why it is done this way.
Also made changes to some other places where subgraph_view and reverse_view where being imported via networkx.graphviews and not via the nx namespace.

@MridulS MridulS requested a review from dschult May 15, 2023 10:11
Copy link
Member

@dschult dschult left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know any reason that these should not be imported directly into the base namespace from nx.graphviews. And I'm fairly sure they were imported via the functions.py due to the focus on the functions module already including an outright code copy of reverse_view.

I like this approach better.

Copy link
Contributor

@rossbar rossbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice cleanup, thanks @MridulS !

@rossbar rossbar merged commit 51347f7 into networkx:main May 19, 2023
@MridulS MridulS deleted the remove_view_from_functions branch May 26, 2023 17:37
@jarrodmillman jarrodmillman added this to the 3.2 milestone Jun 4, 2023
Alex-Markham pushed a commit to Alex-Markham/networkx that referenced this pull request Oct 13, 2023
…rough graphviews (networkx#6689)

Add subgraph_view and reverse_view to nx namespace directly
dschult pushed a commit to BrunoBaldissera/networkx that referenced this pull request Oct 23, 2023
…rough graphviews (networkx#6689)

Add subgraph_view and reverse_view to nx namespace directly
cvanelteren pushed a commit to cvanelteren/networkx that referenced this pull request Apr 22, 2024
…rough graphviews (networkx#6689)

Add subgraph_view and reverse_view to nx namespace directly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants