Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scipy.integrate.simps deprecation #4330

Merged
merged 1 commit into from
Nov 4, 2023

Conversation

IAlibay
Copy link
Member

@IAlibay IAlibay commented Nov 3, 2023

Context

2023-11-03T03:16:21.1314426Z /home/runner/work/mdanalysis/mdanalysis/package/MDAnalysis/analysis/pca.py:750: DeprecationWarning: 'scipy.integrate.simps' is deprecated in favour of 'scipy.integrate.simpson' and will be removed in SciPy 1.14.0

In this PR

Switch to scipy.integrate.simpson - note that the even keyword now defaults to Simpson's rule compared to avg in scipy.integrate.simps.

As the even keyword is deprecated and soon to be removed, I think the aim would be to just use this new behaviour going forward.

PR Checklist

  • Tests?
  • Docs?
  • CHANGELOG updated?
  • Issue raised/referenced?

Developers certificate of origin


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

Switch to scipy.integrate.simpson - note that the `even` keyword now defaults to Simpson's rule compared to `avg` in scipy.integrate.simps.
Copy link

github-actions bot commented Nov 3, 2023

Linter Bot Results:

Hi @IAlibay! Thanks for making this PR. We linted your code and found the following:

Some issues were found with the formatting of your code.

Code Location Outcome
main package ⚠️ Possible failure
testsuite ✅ Passed

Please have a look at the darker-main-code and darker-test-code steps here for more details: https://github.com/MDAnalysis/mdanalysis/actions/runs/6744609040/job/18334790314


Please note: The black linter is purely informational, you can safely ignore these outcomes if there are no flake8 failures!

Copy link

codecov bot commented Nov 3, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4b8b924) 93.37% compared to head (e1e10e7) 93.37%.

Additional details and impacted files
@@            Coverage Diff             @@
##           develop    #4330     +/-   ##
==========================================
  Coverage    93.37%   93.37%             
==========================================
  Files          170      184     +14     
  Lines        22295    23403   +1108     
  Branches      4075     4075             
==========================================
+ Hits         20818    21853   +1035     
- Misses         962     1035     +73     
  Partials       515      515             
Files Coverage Δ
package/MDAnalysis/analysis/pca.py 99.49% <100.00%> (ø)

... and 14 files with indirect coverage changes

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

Copy link
Member

@tylerjereddy tylerjereddy left a comment

Choose a reason for hiding this comment

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

LGTM

The deprecation happened because the original short name could be used/interpreted as a slur, and then we wanted to avoid maintaining two interfaces to the same thing. I agree with your interpretation, the even keyword is going away but the new default should almost always be better anyway.

@tylerjereddy tylerjereddy merged commit 5fa0d27 into develop Nov 4, 2023
25 checks passed
@tylerjereddy tylerjereddy deleted the integrate-simpson-deprecation branch November 4, 2023 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants