-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
DOC: interpolate: deduplicate docstrings in _fitpack_py and _fitpack_impl #18387
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
Conversation
Close/reopen to rerun tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ev-br.
In general I am not sure though about dynamic docs. It does not play well with IDEs usually at it would just present an empty box and not follow the redefinition of __doc__
.
Hmmmm. This is baffling, I've to admit. The manipulation basically happens on import, so should be safe. Anyway. |
IDEs do the analysis on the source code. If you import something then they go and fetch the imported func docstring. So this is an annoyance only if you are directly working on the SciPy codebase itself with bare functions. Otherwise users will see the full docstring. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM once CI is green(er). The IDE issue is an unrelated generic problem and shouldn't block merging this - best to move that to a separate follow-up issue. Probably not much that can be done about that within SciPy though, so it's probably a wontfix.
I am not blocking the PR. Just pointing out that this has consequences for IDE users.
I don't think we have made a public decision about going one route or the other. Not using any overwrite for |
This is unfortunate indeed. I guess I wouldn't be surprised if it's a wontfix for pycharm as well, importing stuff online is a big can of worms. So, to proceed here there are three options:
|
My preference would be option 3 (moving the doc to the public facing API) as to me private functions can then have more maintainers' oriented docs. |
OK, updated to keep all docstrings in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you Evgeni 😃 Diff is also simpler to parse, I don't see anything we should wait for in CI before we merge, I will go ahead.
What does this implement/fix?
Functions in _fitpack_py are nothing but thin wrappers which dispatch to either BSpline methods or _fitpack_impl FITPACK Fortran wrappers. Previously, the docstrings were duplicated, and were slightly diverging over time.
So merge the docstrings and deduplicate: move all docstrings to _fitpack_impl/* and attach to _fitpack_py/*.