Skip to content

ENH: Add param to report.add_epochs to report reject/flat #12396 #13186

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

positiveonly
Copy link

Reference issue (if any)

What does this implement/fix?

Additional information

Copy link

welcome bot commented Apr 3, 2025

Hello! 👋 Thanks for opening your first pull request here! ❤️ We will try to get back to you soon. 🚴

Comment on lines +1254 to +1272
add_projs = self.projs if projs is None else projs

if epochs._bad_dropped:
reject_info = f"<p><strong>Rejection Thresholds:</strong> {epochs.reject}</p>"
flat_info = f"<p><strong>Flat Thresholds:</strong> {epochs.flat}</p>"
self.add_html(reject_info + flat_info)

self._add_epochs(
epochs=epochs,
psd=psd,
add_projs=add_projs,
image_kwargs=image_kwargs,
topomap_kwargs=topomap_kwargs,
drop_log_ignore=drop_log_ignore,
section=title,
tags=tags,
image_format=self.image_format,
replace=replace,
)
Copy link
Member

Choose a reason for hiding this comment

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

this looks wrong, why is it unindented to be outside the method?

@@ -831,6 +831,7 @@ def __init__(
collapse=(),
verbose=None,
):
self.projs = projs # Initialize self.projs
Copy link
Member

Choose a reason for hiding this comment

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

did this line need to move up? Please avoid purely cosmetic changes, it makes the important changes harder to focus on when viewing the diff.

Copy link
Member

Choose a reason for hiding this comment

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

you've commented out an entire test file. Not OK, revert.

Comment on lines 2215 to 2217
@fill_doc
def _add_or_replace(self, *, title, section, tags, html_partial, replace=False):
"""Append HTML content report, or replace it if it already exists.
Copy link
Member

Choose a reason for hiding this comment

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

why is this method being removed? it's used a bunch of times later in the file. Revert.

pyproject.toml Outdated
Comment on lines 265 to 267
addopts = """--durations=20 --doctest-modules -rfEXs --tb=short \
--cov=mne --cov-report=term --cov-branch \
--doctest-ignore-import-errors --junit-xml=junit-results.xml \
Copy link
Member

Choose a reason for hiding this comment

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

it's fine to change this locally if you want to see coverage results in your terminal, but don't commit those changes please. Revert.

@@ -1,4 +1,4 @@
"""Generate self-contained HTML reports from MNE objects."""
"Generate self-contained HTML reports from MNE objects."
Copy link
Member

Choose a reason for hiding this comment

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

We do want the triple-quotes here

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