eegbci api: allow downloading multiple subjects#12918
Merged
larsoner merged 7 commits intomne-tools:mainfrom Oct 28, 2024
Merged
eegbci api: allow downloading multiple subjects#12918larsoner merged 7 commits intomne-tools:mainfrom
larsoner merged 7 commits intomne-tools:mainfrom
Conversation
larsoner
reviewed
Oct 24, 2024
mne/datasets/eegbci/eegbci.py
Outdated
Comment on lines
+97
to
+99
| subjects, | ||
| runs, | ||
| *, |
Member
There was a problem hiding this comment.
For this I'd be tempted just to live with the misnomer subject=[...] rather than switch to subjects=[...] but the deprecation also won't be so terrible:
def load_data(
subjects=None,
runs=None,
*,
subject=None,
...
):
if subject is not None:
subjects = subjects
warn(..., FutureWarning)
del subject
And then you'll need to ensure that subjects and runs are not None, i.e., the user has actually supplied values for them (raise an error if None). Then once deprecation is complete we can remove the =None defaults safely.
larsoner
approved these changes
Oct 28, 2024
Member
larsoner
left a comment
There was a problem hiding this comment.
Looks good, thanks @sappelhoff !
larsoner
added a commit
to larsoner/mne-python
that referenced
this pull request
Oct 28, 2024
* upstream/main: eegbci api: allow downloading multiple subjects (mne-tools#12918) DOC: Document Linux desktop workaround (mne-tools#12900) Allow exporting edf where a channel contains only constant values (mne-tools#12911) Autogenerate environment.yml file from pyproject.toml (mne-tools#12914)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I would be happy to receive some guidance on how to properly deprecate the
subjectparameter, the situation seems a bit tricky to me, given the mixture of positional parameters.