Replace deprecated assert_almost_equal with assert_allclose in GNM tests#5290
Replace deprecated assert_almost_equal with assert_allclose in GNM tests#5290SRASHTI2004 wants to merge 1 commit intoMDAnalysis:developfrom
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #5290 +/- ##
===========================================
+ Coverage 93.83% 93.84% +0.01%
===========================================
Files 182 182
Lines 22501 22501
Branches 3195 3195
===========================================
+ Hits 21113 21116 +3
- Misses 925 928 +3
+ Partials 463 457 -6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| import MDAnalysis.analysis.gnm | ||
| import numpy as np | ||
| import pytest | ||
| from numpy.testing import assert_almost_equal |
There was a problem hiding this comment.
Given we previously did from numpy.testing import assert_almost_equal, I suggest you keep that pattern and import assert_allclose as well.
There was a problem hiding this comment.
Thanks for the suggestion!
I’ll keep the same import pattern and add assert_allclose alongside it to maintain consistency with the existing style. I’ll push the update shortly.
There was a problem hiding this comment.
Don't know if we should be adding these - at the very least please add descriptions about what is being ignored & why like the rest of the file.
There was a problem hiding this comment.
Thanks for pointing that out!
I'll add proper descriptions explaining what is being ignored and why, to match the style used in the rest of the .gitignore file. I'll update the PR shortly.
There was a problem hiding this comment.
There are 300 file changes (well, 299) in this PR, which I think are from a different linter that is not black~=24 (see docs and docs)? I would highly recommend fixing those and not including those changes here (esp. since the CI linter is throwing errors).
Again, it's making it really difficult tracking what you actually implemented, just like your previous PR.
Fixes #3743
Changes made in this Pull Request:
LLM / AI generated code disclosure
LLMs or other AI-powered tools (beyond simple IDE use cases) were used in this contribution: no
PR Checklist
Developers Certificate of Origin
I certify that I can submit this code contribution as described in the Developer Certificate of Origin, under the MDAnalysis LICENSE.
📚 Documentation preview 📚: https://mdanalysis--5290.org.readthedocs.build/en/5290/