MRG: Issue warning when exporting with unapplied projectors and improve docstring#9994
MRG: Issue warning when exporting with unapplied projectors and improve docstring#9994larsoner merged 14 commits intomne-tools:mainfrom mscheltienne:warning_export_unapplied_proj
Conversation
|
I don't know how to fix this style issue.. any idea is welcome. |
…. [skip azp] [skip actions]
| Notes | ||
| ----- | ||
| .. versionadded:: 0.24 | ||
| %(export_warning_note_evoked)s |
There was a problem hiding this comment.
Not sure if it's here or above, but:
E mne.export._egimff.export_evokeds_mff : GL03 : Double line break found; please use only one blank line to separate sections or paragraphs, and do not leave blank lines at the end of docstrings
There was a problem hiding this comment.
Yes, same as before this additional change... I'm sorry, but I don't get why this one is being raised. Is it because the docstring starts with a 'summary' line and does not have a 'description' before the warning?
There was a problem hiding this comment.
the multi-line string export_warning_note starts and ends with a newline. Probably you need to remove one or both of those. I'd guess it's the trailing newline.
There was a problem hiding this comment.
Looks like that's not it.. or I missed something.
| Notes | ||
| ----- | ||
| .. versionadded:: 0.24 | ||
| %(export_warning_note_evoked)s |
There was a problem hiding this comment.
the multi-line string export_warning_note starts and ends with a newline. Probably you need to remove one or both of those. I'd guess it's the trailing newline.
|
@cbrnr Ahah, I didn't notice I put one in the title again! |
|
@drammock Let's see if this fixes it. I thought the |
And in commit messages... 😄 |
|
@mscheltienne here's how I found/fixed the problems: in ipython REPL, our rendered docstrings are visible in plaintext via |
|
...of course even that was apparently not enough, because I forgot (for the hundredth time) that subsequent |
|
FWIW I usually find it easiest not to have a newline at the beginning or end in the replacement string. Then the newlines you use in the doc will be the only newlines (at the beginning and end) that you get, so it generally simplifies things |
|
Thanks for the tip with IPython and |
|
Thanks @mscheltienne @drammock ! |
…ve docstring (#9994) * Add a warning when exporting with unapplied projectors. * Add test for raw and epochs. * Fix for evoked. * Fix typo in docstring + add additional warning for unapplied projs. * Add entry to changelog [ci skip] * add pr id. * Fix style. * Revert. * Move common docstring to docdict. Add to Raw.export and Epochs.export. [skip azp] [skip actions] * Move warnings to note section. [skip azp] [skip actions] * attempt to fix style. [skip azp] [skip actions] * attempt 2 [skip azp] [skip actions] * fix whitespace [skip actions][skip azp] * more whitespace fixes [skip actions][skip azp] Co-authored-by: Daniel McCloy <dan@mccloy.info>
I added a warning when exporting with unapplied projectors to all 4 export functions:
I added this warning in their docstrings:
Test for warning when exporting evoked with unapplied proj is missing because I didn't have any good idea on how to add a projector to the EGI evoked instance loaded.