Skip to content
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

API: Deprecate ordered=False and legacy some functions #11665

Merged
merged 14 commits into from
May 1, 2023

Conversation

larsoner
Copy link
Member

Closes #11546
Closes #11531

I think this is probably good enough to close #11531. @drammock you had slight differences / a bit more stuff in #11531 (comment) . For example, I left out the new forward instance method as I think picking channels for forward is very rare for users so the cost of having to use pick_channels_forward is low (same with cov), and hence not worth the code churn to replace it. I did add an ordered=None to those functions, though, in order to minimize the risk of problems for people, which I think is the most critical thing end-user-safety-wise.

I also did not @legacy the mne.pick_types function for now because 1) there is no straightforward replacement that allows you to get the indices of given channel types, and 2) we would have to alias all of our internal uses to a private _pick_types to avoid the legacy print (and there are a lot of them). I did @legacy the instance method inst.pick_types, though, which seems reasonable. Same goes for mne.pick_channels and inst.pick_channels.

If/when this is reviewed and approved and I've fixed all the tests (I'm sure some will have broken!) I'll push a [circle full] before merge so we can find out now about any broken examples/tutorials rather than this evening.

@larsoner larsoner added this to the 1.4 milestone Apr 28, 2023
Copy link
Member

@drammock drammock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a few comments, thanks for tackling this @larsoner

mne/io/pick.py Outdated Show resolved Hide resolved
mne/utils/docs.py Outdated Show resolved Hide resolved
@larsoner larsoner enabled auto-merge (squash) May 1, 2023 16:32
@larsoner
Copy link
Member Author

larsoner commented May 1, 2023

Okay ran the [circle full] and modified the examples that failed. Two approvals so I'm marking for merge-when-green!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants