Skip to content

Conversation

@hoechenberger
Copy link
Member

@hoechenberger hoechenberger commented Feb 13, 2021

Fixes #8865

@larsoner There is a bug in deprecated_alias:

/Users/hoechenberger/Development/mne-python/mne/utils/docs.py:2551: DeprecationWarning: Function 
read_neuromag_selection is deprecated; read_selection has been deprecated in favor of
read_neuromag_selection and will be removed in 0.24

In the sentence before the semicolon, it refers to the new function name, not to the deprecated one.

Additional information

I moved the API section of the changelog up above the bugs section, and added a new section
"Deprecations" directly below, now placing "Bugs" last. I think this is better for most users as the
number of API changes and deprecations is typically small, compared to the endless number
of bugs we fix. If API changes & deprecations are listed after the bugs, I think they're easy to miss.
Of course, totally up for discussion.

@hoechenberger hoechenberger force-pushed the hoechenberger/issue8865 branch 2 times, most recently from 7cf259a to c4aadb2 Compare February 13, 2021 19:10
@hoechenberger hoechenberger changed the title Move read_selection() to channels.read_neuromag_selection() MRG: Move read_selection() to channels.read_neuromag_selection() Feb 13, 2021
@agramfort
Copy link
Member

maybe vectorview is a better name than neuromag ?

@hoechenberger
Copy link
Member Author

Sure, why not!

@hoechenberger
Copy link
Member Author

Closed & reopened to restart CI.

@hoechenberger hoechenberger force-pushed the hoechenberger/issue8865 branch from d674d63 to 8c878a9 Compare February 14, 2021 10:13
@hoechenberger hoechenberger changed the title MRG: Move read_selection() to channels.read_neuromag_selection() MRG: selection.read_selection() ➡️ channels.read_vectorview_selection() Feb 14, 2021

- Static type checkers like Pylance (comes with VS Code) now display the parameters of many more functions correctly, largely improving overall usability for VS Code users (:gh:`8862` by `Richard Höchenberger`_)

- Add ``match_alias`` parameter to :meth:`mne.io.Raw.set_montage` and related functions to match unrecognized channel location names to known aliases (:gh`8799` **by new contributor** |Zhi Zhang|_)
Copy link
Member

Choose a reason for hiding this comment

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

New contributor line needs to be at the top of the section

~~~~~~~~~~~
- None

Deprecations
Copy link
Member

@larsoner larsoner Feb 16, 2021

Choose a reason for hiding this comment

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

Did we decide to make a new section called Deprecations? Usually this is what API changes is for I think -- ENH/BUG/API has been the standard section naming and order for all our releases. Let's not reorganize/rename/reorder in this PR, but if this important to you we can discuss and then redo all of the lists in a separate PR.

Copy link
Member

Choose a reason for hiding this comment

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

Yes we only have API section

Copy link
Member Author

Choose a reason for hiding this comment

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

Did we decide to make a new section called Deprecations?

Nope, this is a new proposal here :)

Let's not reorganize/rename/reorder in this PR, but if this important to you we can discuss and then redo all of the lists in a separate PR.

Will revert this here and make a new proposal in a separate PR

@hoechenberger hoechenberger force-pushed the hoechenberger/issue8865 branch from d361252 to c8f6c00 Compare February 16, 2021 20:04
@hoechenberger
Copy link
Member Author

I believe all comments have been addressed.

Comment on lines 1854 to 1859
The ``name`` parameter can be a string or a list of string. The returned
selection will be the combination of all selections in the file where
(at least) one element in name is a substring of the selection name in
the file. For example, ``name=['temporal', 'Right-frontal']`` will produce
a combination of ``'Left-temporal'``, ``'Right-temporal'``, and
``'Right-frontal'``.
Copy link
Member

Choose a reason for hiding this comment

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

This belongs with the parameter description or in Notes

hoechenberger and others added 2 commits February 17, 2021 18:10
Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
Comment on lines 83 to 86
API changes
~~~~~~~~~~~
- ``mne.read_selection`` has been deprecated in favor of `mne.read_vectorview_selection`. ``mne.read_selection`` will be removed in MNE-Python 0.24 (:gh:`8870` by `Richard Höchenberger`_)

Copy link
Member

Choose a reason for hiding this comment

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

Still not quire right, see previous comment:

ENH/BUG/API has been the standard section naming and order for all our releases. Let's not reorganize/rename/reorder in this PR

Copy link
Member

Choose a reason for hiding this comment

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

Oh wait I think it's okay, I must have been looking at an old commit!

Comment on lines 83 to 86
API changes
~~~~~~~~~~~
- ``mne.read_selection`` has been deprecated in favor of `mne.read_vectorview_selection`. ``mne.read_selection`` will be removed in MNE-Python 0.24 (:gh:`8870` by `Richard Höchenberger`_)

Copy link
Member

Choose a reason for hiding this comment

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

Actually no it's still in the wrong spot

Copy link
Member Author

Choose a reason for hiding this comment

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

OUCH! Arrgh, sorry about that, will fix.

Copy link
Member Author

Choose a reason for hiding this comment

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

Should be good now.

@larsoner larsoner merged commit 53f1b85 into mne-tools:main Feb 18, 2021
@larsoner
Copy link
Member

thanks @hoechenberger !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mne.read_selection() returning funny channels

4 participants