DEV: Extend deprecated decorator
Checklist
-
I have read the contribution guidelines. -
Unit tests have been added for any new or changed code, and the test suite passes. Note: Your request will likely not be merged without the appropriate tests. -
"closes #XXXX" is in the body of the MR description to link the related issue, if applicable.
This MR extends the ase.utils.deprecated
decorator so that one can
- conditionally omit deprecation warnings based on the context of the calling function and
- adjust the arguments of deprecated function.
Use cases include when one might want to deprecate calling a function with positional arguments or normalize constructor arguments prior to assigning object attributes.
I think these changes will be useful given the number of API changes made since the last release.
Edited by Ugo Nwosu