-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
DOC: Clarify that get_data includes bad channels by default #13543
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
base: main
Are you sure you want to change the base?
Conversation
mne/io/base.py
Outdated
| ['MEG0111', 'MEG2623']) will pick the given channels. Can also be the | ||
| string values "all" to pick all channels, or "data" to pick data | ||
| channels. None (default) will pick all channels. Note that channels in | ||
| ``info['bads']`` *will be included* by default. |
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.
maybe the docdict in docs.py should rather be updated. Can you check?
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 @agramfort! That makes sense. I have updated the global template in mne/utils/docs.py to include the warning, and I reverted the local change in base.py. The changes are pushed now.
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.
I am getting a block-unregistered-user error on CircleCI. I tried to sign up to fix it, but the login page is not showing the GitHub option for me. Could a maintainer please manually approve the workflow run? Thanks!
|
Can you get |
|
@larsoner I have fixed the docstring issues. I ran pytest mne/tests/test_docstring_parameters.py locally as requested, and it is now passing (Green). I pushed the fixes, so the CI should be happy now! |
|
The diff currently shows no files changed, can you make sure the Files tab looks like you want? https://github.com/mne-tools/mne-python/pull/13543/changes |
|
Hi @larsoner, I sincerely apologize for the confusion with the previous commits. As a beginner, I got mixed up while trying to fix the local build errors and accidentally reset the file content, resulting in an empty PR. I have now verified the fix locally:
I just pushed the correct changes. Thank you for your patience! |
| {_picks_desc} {_picks_int} {_picks_str}""" | ||
| picks_base_notypes = f"""picks : list of int | list of str | slice | None | ||
| {_picks_desc} {_picks_int} {_picks_str_notypes}""" | ||
| docdict["picks_all"] = _reflow_param_docstring(f"{picks_base} all channels. {reminder}") |
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.
The old code had a space between the period and the {reminder}, yours does not. I suspect this will lead to something like "end of sentence.Nospace before next", but it's possible we had it wrong before and what you now have is correct. Can you check?
|
Thanks for catching that! I checked locally and confirmed the space was missing. I've pushed a fix. |
Reference Issues/PRs
Fixes #12197
What does this implement/fix?
This PR updates the docstring of
get_datainmne/io/base.py.It explicitly states that bad channels are included by default when
picks=None, as requested in the issue. This prevents user confusion about the default behavior.Any other comments?
I replaced the
%(picks_all)ssubstitution with the explicit text to add the warning note.