Repository navigation
Update test suite to handle when scipy is not installed - #7388
Merged
Merged
Conversation
dschult
approved these changes
Apr 3, 2024
dschult
left a comment
Member
There was a problem hiding this comment.
This looks like a good action that tests with default libraries but without scipy. It adds about a 2m action to the total test time.
All the additions look good -- and the test doesn't show that any others exist.
I approve this PR
Thanks!
jarrodmillman
approved these changes
Apr 3, 2024
cvanelteren
pushed a commit
to cvanelteren/networkx
that referenced
this pull request
Apr 22, 2024
* Skip cycle independence check with scipy not present. * importorskip scipy for resistance_distance tests. * importorskip scipy kemeny_constant tests. * importorskip scipy for effective_graph_resistance. * importorskip scipy to number_of_spanning_trees tests. * Add modules to ignore for doctest when scipy not installed. * Update test_draw to catch scipy not installed case. * Update importorskip in current_flow_betweenness_partition. * Add CI job for default deps without scipy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7383, or at least the actionable part of that issue.
These changes don't really affect user code/experience at all, the main motivation is to make it more visible when functions are added/changed that depend on scipy. Though we don't generally expect to have users with environments where only some of the default dependencies are installed, it's useful during review to automatically catch these cases and can be useful at a high-level to get a sense of just how much of the codebase depends on the default dependencies, with numpy and scipy being "special" in that they both provide data structures (arrays and sparse arrays, respectively) that are used quite a bit throughout NX.