Skip to content

Conversation

@hoechenberger
Copy link
Member

No description provided.

Copy link
Member

@agramfort agramfort left a comment

Choose a reason for hiding this comment

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

LGTM

can you use add a line in what API section in what's new?

thx @hoechenberger

@hoechenberger
Copy link
Member Author

I'm not sure if we should have a deprecation cycle though, WDYT?

@agramfort
Copy link
Member

agramfort commented Apr 11, 2021 via email

@hoechenberger hoechenberger changed the title Return empty list of SSP projectors if no ECG, EOG cannot be found Return empty list of SSP projectors if no ECG, EOG events were found Apr 12, 2021
@hoechenberger hoechenberger marked this pull request as ready for review April 12, 2021 09:04
@hoechenberger hoechenberger changed the title Return empty list of SSP projectors if no ECG, EOG events were found MRG: Return empty list of SSP projectors if no ECG, EOG events were found Apr 12, 2021
Copy link
Member

@agramfort agramfort 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 nitpick


- Fitting `~mne.preprocessing.ICA` on baseline-corrected `~mne.Epochs`, and / or applying it on baseline-corrected `~mne.Epochs` or `~mne.Evoked` data will now display a warning. Users are advised to only baseline correct their data after cleaning is completed (:gh:`9033` by `Richard Höchenberger`_)

- `mne.preprocessing.compute_proj_eog` and `mne.preprocessing.compute_proj_ecg` now return empty lists if no EOG or ECG events, respectively, could be found. Previously, we'd return ``None`` in these situations, which does not match the documented behavior of returning a list of projectors (:gh:`9277` 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.

Suggested change
- `mne.preprocessing.compute_proj_eog` and `mne.preprocessing.compute_proj_ecg` now return empty lists if no EOG or ECG events, respectively, could be found. Previously, we'd return ``None`` in these situations, which does not match the documented behavior of returning a list of projectors (:gh:`9277` by `Richard Höchenberger`_)
- :func:`mne.preprocessing.compute_proj_eog` and :func:`mne.preprocessing.compute_proj_ecg` now return empty lists if no EOG or ECG events, respectively, could be found. Previously, we'd return ``None`` in these situations, which does not match the documented behavior of returning a list of projectors (:gh:`9277` by `Richard Höchenberger`_)

Copy link
Member Author

Choose a reason for hiding this comment

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

That's actually not required anymore since to some changes @drammock made to our doc building process a while ago :)

Copy link
Member

Choose a reason for hiding this comment

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

I think this should go in BUG rather than API because it's a backward-incompatible change with no deprecation cycle

Copy link
Member Author

Choose a reason for hiding this comment

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

because it's a backward-incompatible change with no deprecation cycle

Yeah that's specifically why I put it into the API section …

Copy link
Member

Choose a reason for hiding this comment

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

I think we went through this a bit already in #9027 (comment) and #8870 (comment) but just to be more specific I think our current practice is:

  1. "Enhancements": new, non-breaking code changes
  2. "Bug": bugfixes, can immediately break existing code without any warning or deprecation cycle, but for a good reason (i.e., the existing code probably did not work correctly)
  3. "API": changes to the API that do not break code right away but will probably do so in the next release, and almost always emit a deprecation warning to tell you

Should we add this to the developer guide so that it's explicitly written somewhere?

Copy link
Member Author

@hoechenberger hoechenberger Apr 12, 2021

Choose a reason for hiding this comment

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

Ok I will move this to "Bug", even though I believe since this behavior has been present for so long it's expected behavior now that we're changing, so as a user I would expect this in the "API" section – also considering that the bug section is so long that it's impossible to read it in its entirety …

Copy link
Member

Choose a reason for hiding this comment

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

for so long it's expected behavior now that we're changing

The point is not about the duration the bug has existed, but rather there is a release cycle to change your code (API) or if it breaks immediately (BUG)

as a user I would expect this in the "API" section – also considering that the bug section is so long that it's impossible to read it in its entirety …

Again please open an issue about this

Copy link
Member Author

Choose a reason for hiding this comment

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

The point is not about the duration the bug has existed, but rather there is a release cycle to change your code (API) or if it breaks immediately (BUG)

Ok, got it!

@hoechenberger
Copy link
Member Author

ECG tests are failing – of course they are, I only took care of EOG tests. Will fix this ASAP.

@hoechenberger
Copy link
Member Author

@larsoner I think this should be good to merge now!

Copy link
Member

@agramfort agramfort left a comment

Choose a reason for hiding this comment

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

@larsoner merge if happy

@larsoner larsoner merged commit eaeef19 into mne-tools:main Apr 12, 2021
@larsoner
Copy link
Member

Thanks @hoechenberger !

larsoner added a commit to agramfort/mne-python that referenced this pull request Apr 12, 2021
* upstream/main:
  MRG: Return empty list of SSP projectors if no ECG, EOG events were found (mne-tools#9277)
  Better warning message for EDF files with annotations only (mne-tools#9283)
  FIX: Link [ci skip]
  FIX: Prepare for PyVista 0.30.0 (mne-tools#9274)
  Use info for checking more NIRS metadata, not raw (mne-tools#9282)
  MRG: Use info for checking NIRS metadata, not raw (mne-tools#9280)
  Fix issue where set ylim parameter gets swapped across channel types in plot_evoked_topo (mne-tools#9207)
@hoechenberger hoechenberger deleted the ssp branch April 13, 2021 06:02
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.

3 participants