Skip to content

Improved documentation for boundary_expansion function - #7905

Merged
dschult merged 3 commits into
networkx:mainfrom
gustavo-ataide:doc-boundary-expansion
Jul 13, 2025
Merged

dschult merged 3 commits into
networkx:mainfrom
gustavo-ataide:doc-boundary-expansion

Conversation

@gustavo-ataide

Copy link
Copy Markdown
Contributor

This PR improves the documentation for the boundary_expansion function by:

  • Adding practical examples.
  • Clarifying the calculation and the concept of node boundary.
  • Adding a note about the potential generalization for two sets (related to the TODO).
  • Formatting the documentation to follow NetworkX standards.

Comment thread networkx/algorithms/cuts.py Resolved
@rossbar
rossbar force-pushed the doc-boundary-expansion branch from 9b84677 to 3146171 Compare July 9, 2025 17:40

@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.

This one had been stale for a while so I took the liberty of pushing up the changes from the previous round of review, rebasing on main, and fixing the doctests (among other minor formatting tweaks).

Generally the docstring improvements LGTM, thanks @gustavo-ataide !

@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.

Why did the TODO get removed? Is it not relevant?

Comment thread networkx/algorithms/cuts.py Resolved
Comment thread networkx/algorithms/cuts.py Resolved
Comment thread networkx/algorithms/cuts.py Resolved
Comment thread networkx/algorithms/cuts.py Resolved
@rossbar

rossbar commented Jul 11, 2025

Copy link
Copy Markdown
Contributor

Why did the TODO get removed? Is it not relevant?

I'm personally fine with removing it. It's essentially a feature request rather than anything that has to do with future compatibility. If it's something folks really want/need, it'd be better to track it somewhere visible like github issues. Given that it's been there for 10 years with no activity, that's a pretty strong indication that no one has a practical use-case for it!

@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.

Makes sense to remove the TODO, then! Thanks! :)

@dschult
dschult merged commit cf8d78b into networkx:main Jul 13, 2025
amcandio pushed a commit to amcandio/networkx that referenced this pull request Jul 20, 2025
* Improved documentation for boundary_expansion function

* Touchups and test corrections.

* Apply suggestions from code review

Co-authored-by: Gilles Peiffer <[email protected]>

---------

Co-authored-by: Ross Barnowski <[email protected]>
Co-authored-by: Gilles Peiffer <[email protected]>
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.

4 participants