omerwe / polyfun

PolyFun (POLYgenic FUNctionally-informed fine-mapping)
MIT License
89 stars 22 forks source link

Add backcompatibility for old arguments #95

Closed bschilder closed 2 years ago

bschilder commented 2 years ago

It would be nice for PolyFun functions to be be backwards compatible in their argument names.

This came up recently with extract_snpvar.py: https://github.com/RajLabMSSM/echolocatoR/issues/78

Would you be able to add a deprecation warning when users try to use old args? I find this helpful when trying to distinguish my own coding bugs from version changes.

omerwe commented 2 years ago

@bschilder I will do that from now on!

If I understand correctly, you already adjusted echoLocatoR to the current version of PolyFun?

I don't expect any compatability-breaking changes from now on, but will be sure to let you know if I change anything in the future. Sorry for the mess this caused, I'll be more careful about these in the future.

bschilder commented 2 years ago

Yes, anyone who installs the latest version of echolocatoR won't have these issues because I adjusted the internal code.

No worries at all, I've had to change arguments myself a couple times. For those, I use the lifecycle package to produce a warning to users without causing an error if they use the old args. Not sure what the equivalent would be in Python. https://lifecycle.r-lib.org/reference/deprecate_soft.html