Skip to content

Commit 57611ae

Browse files
cbrnrdrammock
andauthored
Remove jinja2 and pooch from sys_info (#12411)
Co-authored-by: Daniel McCloy <[email protected]>
1 parent 78e840d commit 57611ae

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

mne/utils/config.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,8 +649,6 @@ def sys_info(
649649
"numpy",
650650
"scipy",
651651
"matplotlib",
652-
"pooch",
653-
"jinja2",
654652
"",
655653
"# Numerical (optional)",
656654
"sklearn",
@@ -701,6 +699,14 @@ def sys_info(
701699
"sphinx-gallery",
702700
"pydata-sphinx-theme",
703701
"",
702+
"# Infrastructure",
703+
"decorator",
704+
"jinja2",
705+
# "lazy-loader",
706+
"packaging",
707+
"pooch",
708+
"tqdm",
709+
"",
704710
)
705711
try:
706712
unicode = unicode and (sys.stdout.encoding.lower().startswith("utf"))

mne/utils/docs.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3332,7 +3332,7 @@ def _reflow_param_docstring(docstring, has_first_line=True, width=75):
33323332
difference will be preserved.
33333333
"""
33343334

3335-
docdict["reject_drop_bad"] = """
3335+
docdict["reject_drop_bad"] = """\
33363336
reject : dict | str | None
33373337
Reject epochs based on **maximum** peak-to-peak signal amplitude (PTP)
33383338
or custom functions. Peak-to-peak signal amplitude is defined as
@@ -3354,10 +3354,17 @@ def _reflow_param_docstring(docstring, has_first_line=True, width=75):
33543354
33553355
Custom rejection criteria can be also be used by passing a callable,
33563356
e.g., to check for 99th percentile of absolute values of any channel
3357-
across time being bigger than 1mV. The callable must return a good, reason tuple.
3358-
Where good must be bool and reason must be str, list, or tuple where each entry is a str.::
3359-
3360-
reject = dict(eeg=lambda x: ((np.percentile(np.abs(x), 99, axis=1) > 1e-3).any(), "> 1mV somewhere"))
3357+
across time being bigger than :unit:`1 mV`. The callable must return a
3358+
``(good, reason)`` tuple: ``good`` must be :class:`bool` and ``reason``
3359+
must be :class:`str`, :class:`list`, or :class:`tuple` where each entry
3360+
is a :class:`str`::
3361+
3362+
reject = dict(
3363+
eeg=lambda x: (
3364+
(np.percentile(np.abs(x), 99, axis=1) > 1e-3).any(),
3365+
"signal > 1 mV somewhere",
3366+
)
3367+
)
33613368
33623369
.. note:: If rejection is based on a signal **difference**
33633370
calculated for each channel separately, applying baseline

0 commit comments

Comments
 (0)