-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
base: main
Are you sure you want to change the base?
Conversation
Hello! 👋 Thanks for opening your first pull request here! ❤️ We will try to get back to you soon. 🚴 |
for more information, see https://pre-commit.ci
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, | ||
) |
There was a problem hiding this comment.
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?
mne/report/report.py
Outdated
@@ -831,6 +831,7 @@ def __init__( | |||
collapse=(), | |||
verbose=None, | |||
): | |||
self.projs = projs # Initialize self.projs |
There was a problem hiding this comment.
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.
mne/report/tests/test_report.py
Outdated
There was a problem hiding this comment.
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.
mne/report/report.py
Outdated
@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. |
There was a problem hiding this comment.
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
addopts = """--durations=20 --doctest-modules -rfEXs --tb=short \ | ||
--cov=mne --cov-report=term --cov-branch \ | ||
--doctest-ignore-import-errors --junit-xml=junit-results.xml \ |
There was a problem hiding this comment.
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.
mne/report/report.py
Outdated
@@ -1,4 +1,4 @@ | |||
"""Generate self-contained HTML reports from MNE objects.""" | |||
"Generate self-contained HTML reports from MNE objects." |
There was a problem hiding this comment.
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
1975021
to
e48aee8
Compare
d34e418
to
320d949
Compare
4366a55
to
080ed31
Compare
63693b2
to
12e1416
Compare
f8fb354
to
c217577
Compare
c3a1917
to
9fcc510
Compare
d751649
to
933bb6a
Compare
for more information, see https://pre-commit.ci
Reference issue (if any)
What does this implement/fix?
Additional information