Skip to content

Updates to docs and imports for classic.py#4424

Merged
jarrodmillman merged 4 commits intonetworkx:masterfrom
dschult:doc_classic
Dec 7, 2020
Merged

Updates to docs and imports for classic.py#4424
jarrodmillman merged 4 commits intonetworkx:masterfrom
dschult:doc_classic

Conversation

@dschult
Copy link
Copy Markdown
Member

@dschult dschult commented Dec 5, 2020

Minimal document updates... it snowballed from what I intended.
I don't think it conflicts with #4401

@dschult dschult added this to the networkx-2.6 milestone Dec 5, 2020
dschult and others added 2 commits December 6, 2020 10:34
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
@jarrodmillman
Copy link
Copy Markdown
Member

See dschult#13.

@jarrodmillman
Copy link
Copy Markdown
Member

I think we should avoid changing imports in this PR. I am not sure how we should do the imports and I think we need to do more research. The discussion on dschult#13 is getting long (mostly b/c of me). The other changes here seem good and should land quickly.

We should have a separate PR (perhaps a brief NXEP even) sorting out how we do imports. In particular, we need to figure out how to stop our circular imports; currently

import networkx

gives us

networkx
networkx.networkx
networkx.nx
...
networkx.nx.networkx.nx
...

And

import networkx as nx

gives us

nx
nx.networkx
nx.nx
...
nx.nx.networkx.nx
...

We should do some experiments to see exactly what gets imported in what order, when.

Also, whether that changes when you use absolute vs relative imports.

@rossbar
Copy link
Copy Markdown
Contributor

rossbar commented Dec 6, 2020

I think @jarrodmillman 's suggestion is a good one - my approval stands for the doc changes.

@jarrodmillman jarrodmillman merged commit 06d4925 into networkx:master Dec 7, 2020
@dschult dschult deleted the doc_classic branch December 15, 2020 17:18
MridulS pushed a commit to MridulS/networkx that referenced this pull request Feb 4, 2023
* Minimal document updates.. snowballed from what I intended.

* Update networkx/generators/classic.py

Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>

* Update networkx/generators/classic.py

Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>

* Remove internal import changes

Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants