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

MRG: deprecated ConcatenateChannels and renamed EpochVectorizer #2361

Merged
merged 10 commits into from Jul 30, 2015

Conversation

trachelr
Copy link
Contributor

@agramfort @dengemann This PR addresses issue #2313
Is it fine to import ConcatenateChannels as EpochVectorizer in the init ??
or I should copy the code of ConcatenateChannels and name it class EpochVectorizer?

@trachelr
Copy link
Contributor Author

doc test don't pass because of deprecated call in the init...
so I'm gonna copy paste and rename ConcatenateChannels

@@ -45,6 +45,8 @@ Changelog

- Add support to append new channels to an object from a list of other objects by `Chris Holdgraf`_

- Deprecated :class: ConcatenateChannels and replaced by :class: EpochVectorizer by `Romain Trachel`_
Copy link
Member

Choose a reason for hiding this comment

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

EpochVectorizer -> EpochsVectorizer

Copy link
Member

Choose a reason for hiding this comment

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

It also needs to be in backticks to render properly

@agramfort
Copy link
Member

besides LGTM

@dengemann
Copy link
Member

Oops. Sorry guys, I merged to quick.

On Wed, Jul 29, 2015 at 1:50 PM, Alexandre Gramfort <
notifications@github.com> wrote:

besides LGTM


Reply to this email directly or view it on GitHub
#2361 (comment)
.

class ConcatenateChannels(TransformerMixin):
"""Concatenates data from different channels into a single feature vector

Parameters
----------
info : instance of Info
The measurement info.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

it didn't pass doc tests because of the call to deprecated function.
I found that removing parameters doc fix this issue

Copy link
Member

Choose a reason for hiding this comment

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

Don't fix it this way, fix it by adding the function or class name here:

https://github.com/mne-tools/mne-python/blob/master/mne/tests/test_docstring_parameters.py#L64

@trachelr
Copy link
Contributor Author

ready to merge, if doc test and travis are happy

@trachelr trachelr changed the title ENH: deprecated ConcatenateChannels and renamed EpochVectorizer MRG: deprecated ConcatenateChannels and renamed EpochVectorizer Jul 29, 2015
@agramfort
Copy link
Member

ping me when you addressed @Eric89GXL comments

@trachelr
Copy link
Contributor Author

done! thanks @Eric89GXL

@trachelr
Copy link
Contributor Author

Yep because I get this error from test_docstring_parameters
AssertionError:
mne.utils.ConcatenateChannels.init arg mismatch: ['info']

@@ -147,6 +147,8 @@ def inverse_transform(self, epochs_data, y=None):
return X


@deprecated("Class 'ConcatenateChannels' has been renamed to "
"'EpochsVectorizer' and will be removed in release 0.11.")
class ConcatenateChannels(TransformerMixin):
Copy link
Member

Choose a reason for hiding this comment

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

can't you just do:

@deprecated("Class 'ConcatenateChannels' has been renamed to  ...")
class ConcatenateChannels(EpochsVectorizer):
     pass

in order to remove the old code of ConcatenateChannels?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, @Eric89GXL fix removed.
It seems to pass docstring test.
Thanks @agramfort !

@agramfort
Copy link
Member

perfect !

let's merge when travis is happy !

@larsoner
Copy link
Member

@trachelr for future reference you could have just added ConcatenateChannels to the list of excludes and it would have worked, too (it matches substrings)

@trachelr
Copy link
Contributor Author

Got it @Eric89GXL !
Thanks

agramfort added a commit that referenced this pull request Jul 30, 2015
MRG: deprecated ConcatenateChannels and renamed EpochVectorizer
@agramfort agramfort merged commit e84700a into mne-tools:master Jul 30, 2015
@agramfort
Copy link
Member

thanks @trachelr

@mainakjas
Copy link
Contributor

@trachelr the deprecations must go to the API section of whats_new. I just noticed this while rebasing. I'll make a fix in my PR but just so that you know for the future :)

@trachelr
Copy link
Contributor Author

trachelr commented Aug 1, 2015

Ok! thanks @mainakjas

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.

None yet

5 participants