MAINT: Replace deprecated numpy assertions in coordinates/base.py
Contributes to #3743
Changes made in this Pull Request:
- Replaced deprecated
assert_almost_equalandassert_array_almost_equalwithassert_allcloseintestsuite/MDAnalysisTests/coordinates/base.py. - Converted decimal precision to
atol=10**(-decimal)andrtol=0to maintain original test strictness. - Added contributor name to
package/AUTHORS.
PR Checklist
- [x] Issue raised/referenced?
- [ ] Tests updated/added?
- [ ] Documentation updated/added?
- [x]
package/CHANGELOGfile updated? - [x] Is your name in
package/AUTHORS?
Documentation preview : https://mdanalysis--5156.org.readthedocs.build/en/5156/
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 92.72%. Comparing base (5c11b50) to head (b35276c).
:warning: Report is 5 commits behind head on develop.
Additional details and impacted files
@@ Coverage Diff @@
## develop #5156 +/- ##
========================================
Coverage 92.72% 92.72%
========================================
Files 180 180
Lines 22457 22472 +15
Branches 3186 3188 +2
========================================
+ Hits 20823 20837 +14
Misses 1177 1177
- Partials 457 458 +1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Hi! The Windows test failed in test_density.py with a MaybeEncodingError (unrelated to my changes). Could you please trigger a re-run?
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
@IAlibay Hi, if you get some free time please review this PR and if there are any other changes that you would like please let me know!
@marinegor Thanks for the review!
I have applied all your suggested commits (reverting ref.prec in those spots and fixing the 0.01 tolerance).
Regarding the other places where I used 1e-3—do you want me to do a bulk revert of all those back to ref.prec as well, or are the remaining ones acceptable as they are?
Since the issue you're solving doesn't assume changing test logic at all, I'd suggest you revert the ref.spec wherever it was used.
@marinegor Done! I've reverted the remaining 19 instances of the hardcoded 1e-3 tolerance back to the dynamic ref.prec (or self.prec where appropriate) throughout the file, as requested. Ready for final review. Thanks for your patience!
@marinegor Thanks for the final pass! I've accepted and committed all your latest suggestions and fixed all the remaining logic/precision details.
The code is now exactly as you've requested. I'd appreciate your final approval! Thank you for the detailed review.
If they are passing, I'd appreciate your final approval
could you clarify on that? I feel like the CI status is publicly available, and hence don't understand what you mean by that.
Sorry for the miscommunication from my side. I confirmed all 22 core tests are green, and the only failure is on the Labeler job, I think we're good to go.
Thank you for reviewing @marinegor . I assigned the PR to you for merging, I hope that's ok!