Skip to content

add deprecation warning to resample function #180

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

Closed
wants to merge 3 commits into from

Conversation

alisnwu
Copy link

@alisnwu alisnwu commented Nov 24, 2024

closes #139

Only adding a deprecation warning as per discussion with @Sparks29032 in #145

Warning looks like this:
Screenshot 2024-11-23 at 11 27 53 PM

@sbillinge ready for review

Copy link

codecov bot commented Nov 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.97%. Comparing base (b31135d) to head (02a2c70).
Report is 36 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (b31135d) and HEAD (02a2c70). Click for more details.

HEAD has 14 uploads less than BASE
Flag BASE (b31135d) HEAD (02a2c70)
15 1
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #180      +/-   ##
==========================================
- Coverage   99.56%   93.97%   -5.59%     
==========================================
  Files           7        8       +1     
  Lines         230      299      +69     
==========================================
+ Hits          229      281      +52     
- Misses          1       18      +17     

see 13 files with indirect coverage changes

@Sparks29032
Copy link
Collaborator

Sparks29032 commented Nov 24, 2024

We could also consider using @deprecated per https://typing.readthedocs.io/en/latest/spec/directives.html#deprecated

I think we should also phase the message in a way that indicates why we are deprecating: resample has been renamed wsinterp to better reflect functionalty smth smth

@sbillinge
Copy link
Contributor

Yes, I agree with @Sparks29032 . Also please specify the future version where it will be removed. Normally two mid-level version bumps later.

@alisnwu alisnwu closed this Dec 6, 2024
"The 'resample' function is deprecated and will be removed in a future release 3.6.3. \n"
"'resample' has been renamed 'wsinterp' to better reflect functionality. \n"
"Please use 'wsinterp' instead."
)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is good. Does this decorator also work in Python 3.12 and 3.11 without failing the test?

Copy link
Author

Choose a reason for hiding this comment

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

I'll test on that and make a new PR based on the new structure

Copy link
Author

Choose a reason for hiding this comment

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

@bobleesj this deprecated decorator actually is only released for 3.13 so should I use warnings.warn instead? @Sparks29032

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, it's a new feature for 3.13.

If it doesn't work for 3.11 and 3.12, then I suggest we should not use this decorator since then 3.11 and 3.12 users won't be able to read this warning msg. tagging @sbillinge for his opinion too.

@bobleesj
Copy link
Contributor

bobleesj commented Dec 6, 2024

Also, since this is a public facing PR, why is it being closed?

@alisnwu
Copy link
Author

alisnwu commented Dec 6, 2024

@bobleesj I wanted to make a new PR since this was before the major reconstruction simon made

@bobleesj
Copy link
Contributor

bobleesj commented Dec 7, 2024

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.

deprecate legacy resampler?
4 participants