Skip to content

Conversation

@shubhammittal2241
Copy link

@shubhammittal2241 shubhammittal2241 commented Dec 9, 2025

Modernize deprecated NumPy assertions in test_gnm.py (ref #3743)

This PR updates deprecated NumPy testing functions in test_gnm.py:

  • Replaces assert_almost_equal and assert_array_almost_equal
    with numpy.testing.assert_allclose
  • Uses pytest.approx for scalar floating point comparisons
  • Preserves existing tolerances and test behavior

All tests pass locally.

Contributes to issue #3743.


📚 Documentation preview 📚: https://mdanalysis--5174.org.readthedocs.build/en/5174/

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hello there first time contributor! Welcome to the MDAnalysis community! We ask that all contributors abide by our Code of Conduct and that first time contributors introduce themselves on GitHub Discussions so we can get to know you. You can learn more about participating here. Please also add yourself to package/AUTHORS as part of this PR.

@codecov
Copy link

codecov bot commented Dec 9, 2025

Codecov Report

❌ Patch coverage is 93.28108% with 60 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.70%. Comparing base (bbcef1b) to head (74cefc3).

Files with missing lines Patch % Lines
package/MDAnalysis/coordinates/TRZ.py 89.69% 9 Missing and 1 partial ⚠️
package/MDAnalysis/converters/ParmEd.py 0.00% 8 Missing ⚠️
package/MDAnalysis/visualization/streamlines_3D.py 64.70% 6 Missing ⚠️
package/MDAnalysis/analysis/align.py 50.00% 4 Missing ⚠️
package/MDAnalysis/coordinates/base.py 93.44% 4 Missing ⚠️
package/MDAnalysis/lib/transformations.py 42.85% 4 Missing ⚠️
...ckage/MDAnalysis/analysis/encore/confdistmatrix.py 62.50% 2 Missing and 1 partial ⚠️
package/MDAnalysis/analysis/encore/utils.py 33.33% 1 Missing and 1 partial ⚠️
package/MDAnalysis/topology/tpr/utils.py 92.59% 1 Missing and 1 partial ⚠️
...e/MDAnalysis/analysis/encore/clustering/cluster.py 75.00% 0 Missing and 1 partial ⚠️
... and 16 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5174      +/-   ##
===========================================
- Coverage    92.72%   92.70%   -0.02%     
===========================================
  Files          180      180              
  Lines        22472    22472              
  Branches      3188     3188              
===========================================
- Hits         20837    20833       -4     
- Misses        1177     1184       +7     
+ Partials       458      455       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant