-
Notifications
You must be signed in to change notification settings - Fork 160
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
Nowcast refactoring #291
Nowcast refactoring #291
Conversation
hey @pulkkins, I just tried to build the documentation, which failed (logs here) because we renamed many positional arguments in the nowcasting methods... These represent breaking changes (and indeed, they broke our documentation ...). Since most of them are only "aesthetic changes" (naming conventions), I wonder whether they're justified. So what do we do? Should we just revert those changes (when they concern input arguments) and keep only renaming of internal variables? |
…PS/pysteps into nowcast-refactoring-master
Another possibility is to deprecate the old names in favor of the new ones - this can e.g. be achieved as: I would also consider making most of the arguments keyword-only e.g. def func(a, b, c, *args, d=5, e="param"):
if args:
raise TypeError("Only three positional arguments allowed") For context @leabeusch told me to have a look at pysteps so I did ;-) |
Hello @mathause and welcome to pysteps! Many thanks for your comments, see my answers below.
Very good point, yes, we could raise a future deprecation warning for the old argument names. I think I'll give this a try, if you don't mind @pulkkins ? edit: done in c81c848, any feedback is appreciated!
I think we loosely follow this convention in most of our methods (I should check...), but I like the idea of enforcing it. Maybe material for a separate issue?
Then thanks @leabeusch for sending you this way! 😄 |
I have not yet done extensive refactoring of the nowcasts.sseps module. @dnerini would you like to work on that or should we merge this pull request? |
No I think that should not be in scope for this PR. Anyway, it is my intention to deprecate sseps (for sure in v2), since linda provides a better implementation of the localisation mechanism. so yes, please go ahead and merge this PR! |
This pull request contains major refactoring and polishing of the nowcasts module.
Refactoring
Minor fixes