Skip to content

Improving connected module docs - #8267

Merged
MridulS merged 3 commits into
networkx:mainfrom
amcandio:connected_docs
Oct 18, 2025
Merged

MridulS merged 3 commits into
networkx:mainfrom
amcandio:connected_docs

Conversation

@amcandio

Copy link
Copy Markdown
Contributor

Improving docus for connected module. I focused on including definition, corner cases and time-complexity of implementation.

@rossbar rossbar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A few high-level comments/suggestions from a quick pass - LMK what you think!

@Peiffap Peiffap left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1 for updating these docstrings!

-------
connected : bool
True if the graph is connected, false otherwise.
True if the graph is connected, False otherwise.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Might be a good opportunity to standardize indentation in these docstrings too. I personally like 4 everywhere for consistency with the code but if 3 is less churn I guess that works too.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'd prefer to avoid indentation changes in this PR but I can do it if people feel strongly about it!

@amcandio

amcandio commented Oct 4, 2025

Copy link
Copy Markdown
Contributor Author

Comments addressed here!

@dschult dschult left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me!
Thanks @amcandio

@rossbar rossbar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

General LGTM, just one final nit about preferring "node/nodes" instead of "vertex/vertices"!

@amcandio

Copy link
Copy Markdown
Contributor Author

General LGTM, just one final nit about preferring "node/nodes" instead of "vertex/vertices"!

Good point, addressed!

@MridulS
MridulS merged commit 417fb44 into networkx:main Oct 18, 2025
@dschult dschult added this to the 3.6 milestone Oct 18, 2025
@amcandio
amcandio deleted the connected_docs branch October 18, 2025 21:11
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.

5 participants