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

MAINT: Fix deprecated seaborn function calls #171

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jhlegarreta
Copy link
Collaborator

@jhlegarreta jhlegarreta commented Feb 18, 2025

Fix deprecated seaborn function calls: use displot or histplot where applicable instead of distplot, since the latter will be removed in seaborn v0.14.0.

Adapt the corresponding calls where necessary adding reasonable keyword argument values.

Fixes:

This function has been deprecated and will be removed in seaborn v0.14.0.
It has been replaced by :func:`histplot` and :func:`displot`,
two functions with a modern API and many more capabilities.

Documentation:
https://gist.github.com/mwaskom/de44147ed2974457ad6372750bbe5751

Copy link

codecov bot commented Feb 18, 2025

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 66.38%. Comparing base (7320552) to head (59c1b4d).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
nireports/reportlets/nuisance.py 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #171      +/-   ##
==========================================
+ Coverage   66.04%   66.38%   +0.33%     
==========================================
  Files          25       25              
  Lines        2677     2677              
  Branches      421      421              
==========================================
+ Hits         1768     1777       +9     
+ Misses        793      788       -5     
+ Partials      116      112       -4     
Flag Coverage Δ
unittests 61.33% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Member

@effigies effigies left a comment

Choose a reason for hiding this comment

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

Following the guidance in the gist you linked, I think we want to use histplot for a couple of these.

@jhlegarreta jhlegarreta force-pushed the FixDeprecatedSnsFunctionCalls branch from faa8a3f to e69a319 Compare February 19, 2025 23:37
Fix deprecated `seaborn` function calls: use `displot` or `histplot`
where applicable instead of `distplot`, since the latter will be removed
in `seaborn` v0.14.0.

Adapt the corresponding calls where necessary adding reasonable keyword
argument values.

Fixes:
```
This function has been deprecated and will be removed in seaborn v0.14.0.
It has been replaced by :func:`histplot` and :func:`displot`,
two functions with a modern API and many more capabilities.
```

Documentation:
https://gist.github.com/mwaskom/de44147ed2974457ad6372750bbe5751

Co-authored-by: Chris Markiewicz <[email protected]>
@jhlegarreta jhlegarreta force-pushed the FixDeprecatedSnsFunctionCalls branch from e69a319 to 59c1b4d Compare February 19, 2025 23:41
@jhlegarreta
Copy link
Collaborator Author

@effigies If the requested changes have been addressed, can we please merge this?

@effigies
Copy link
Member

It looks right, but this is untested code, and as far as I can tell, not used anywhere. I'm concerned that we will make changes and only discover bugs when someone starts trying to use it.

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