Skip to content

Remove structuralholes.py from needs_(num|sci)py#8088

Merged
dschult merged 1 commit into
networkx:mainfrom
Peiffap:test-sh
Jun 2, 2025
Merged

Remove structuralholes.py from needs_(num|sci)py#8088
dschult merged 1 commit into
networkx:mainfrom
Peiffap:test-sh

Conversation

@Peiffap
Copy link
Copy Markdown
Member

@Peiffap Peiffap commented Jun 2, 2025

While reading the PR that recently updated structuralholes.py to understand #8087, I saw it added that file to the needs_numpy and needs_scipy lists in conftest.py. This excludes them from being tested when scipy (or numpy) is not available (strictly, this isn't the case, as the nodes argument is also considered in the if—but afaik there's no good reason to exclude these from the tests). However, the functions with a scipy implementation explicitly wrap import scipy in a try ... except using scipy where possible. As a result, the vanilla implementation does not get tested properly: when running the default tests (with scipy), the scipy implementation gets tested, and when running default-without-scipy, the file gets skipped.

@dschult dschult merged commit d1c41f8 into networkx:main Jun 2, 2025
39 of 40 checks passed
@Peiffap Peiffap deleted the test-sh branch June 2, 2025 22:15
amcandio pushed a commit to amcandio/networkx that referenced this pull request Jul 20, 2025
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.

2 participants