Skip to content

tests: modernize deprecated numpy assertions in test_gnm.py (ref #3743)#5178

Merged
orbeckst merged 6 commits intoMDAnalysis:developfrom
shubhammittal2241:develop
Apr 21, 2026
Merged

tests: modernize deprecated numpy assertions in test_gnm.py (ref #3743)#5178
orbeckst merged 6 commits intoMDAnalysis:developfrom
shubhammittal2241:develop

Conversation

@shubhammittal2241
Copy link
Copy Markdown
Contributor

@shubhammittal2241 shubhammittal2241 commented Dec 13, 2025

Contributes to issue #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

Added myself to package/AUTHORS as a first-time contributor.


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

@shubhammittal2241
Copy link
Copy Markdown
Contributor Author

This PR is ready for review.
All tests pass locally, and the only CI failure was a cancelled job due to duplicate workflow runs by GitHub.
@orbeckst @RMeli @marinegor — Please let me know if anything else is needed. Thanks!

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.84%. Comparing base (379d296) to head (f546a91).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #5178   +/-   ##
========================================
  Coverage    93.84%   93.84%           
========================================
  Files          182      182           
  Lines        22497    22497           
  Branches      3200     3200           
========================================
  Hits         21113    21113           
  Misses         922      922           
  Partials       462      462           

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

@orbeckst orbeckst enabled auto-merge (squash) April 21, 2026 22:54
Copy link
Copy Markdown
Member

@orbeckst orbeckst left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thank you.

@orbeckst orbeckst merged commit 9269430 into MDAnalysis:develop Apr 21, 2026
14 of 22 checks passed
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.

2 participants