You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should reduce code dup without hurting readability much. I actually think it will help readability in the long run since you 1) immediately know it's a standard MNE param and 2) there is less docstring to skip through / ignore to see the actual code.
If it seems worthwhile, I can make a quick PR to do this for verbose, and then incorporate it in #4511 for picks. Eventually it could also help with n_jobs (two flavors probably: cuda-allowed and cpu-only) and probably other params, too. It seems like it would cut down on a lot of otherwise unnecessary code (docstring) dup in the long run, and probably wouldn't make too much rebase difficulty in the meantime.
having bugs in docstrings is not commonly reported and it creates some
magic and yet another thing to learn from contributors.
I am not too enthusiastic about this
Have you looked at #4511? It shows why it would be advantageous. (The PR would basically be done instead of a ton of copy pastes pending review.)
In the future, if we want to improve this docstring, without this proposal we have to change something in 50 or so places instead of one. Same with our verbose docstring; I would be very hesitant to improve its wording even if it needs it because replacing them all correctly would be a huge pain. And reviewing it properly similarly annoying.
In the SciPy code, it seems very simple to infer that the docstring is being filled, so the extra developer learning overhead should be very small.
But if you insist that I wear out my Ctrl and V keys I will do it. :)
I think this would benefit a lot of lazy developers. For example, I recently discovered that in the documentation of spatio_temporal_cluster_test, the tail parameter says: "See permutation_cluster_test". No link or anything. Nobody is going to complain because there is nothing technically wrong here -- just that it increases the barrier for people to understand the function and use it.
Activity
mmagnuski commentedon Nov 28, 2018
looks cool :)
jasmainak commentedon Nov 28, 2018
Indeed, great idea !
agramfort commentedon Nov 29, 2018
larsoner commentedon Nov 29, 2018
Have you looked at #4511? It shows why it would be advantageous. (The PR would basically be done instead of a ton of copy pastes pending review.)
In the future, if we want to improve this docstring, without this proposal we have to change something in 50 or so places instead of one. Same with our verbose docstring; I would be very hesitant to improve its wording even if it needs it because replacing them all correctly would be a huge pain. And reviewing it properly similarly annoying.
In the SciPy code, it seems very simple to infer that the docstring is being filled, so the extra developer learning overhead should be very small.
But if you insist that I wear out my Ctrl and V keys I will do it. :)
jasmainak commentedon Nov 29, 2018
I think this would benefit a lot of lazy developers. For example, I recently discovered that in the documentation of spatio_temporal_cluster_test, the
tailparameter says: "See permutation_cluster_test". No link or anything. Nobody is going to complain because there is nothing technically wrong here -- just that it increases the barrier for people to understand the function and use it.massich commentedon Jan 18, 2019
I've no idea how this one skipped my radar. But yes +1 to this one. And it would be even better if we can link them somehow to the sphinx terms.