Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions mne/export/tests/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,9 @@ def test_export_raw_edf_does_not_fail_on_empty_header_fields(tmp_path):
raw.export(tmp_path / "test.edf", add_ch_type=True)


@pytest.mark.skipif(not check_version("eeglabio", "0.1.2"), reason="fixed by 0.1.2")
@pytest.mark.skipif(
not check_version("eeglabio", "0.1.2"), reason="fixed by eeglabio 0.1.2"
)
@pytest.mark.parametrize("preload", (True, False))
def test_export_epochs_eeglab(tmp_path, preload):
"""Test saving an Epochs instance to EEGLAB's set format."""
Expand Down Expand Up @@ -581,7 +583,6 @@ def test_export_epochs_eeglab(tmp_path, preload):
epochs.export(Path(temp_fname), overwrite=True)


@pytest.mark.filterwarnings("ignore::FutureWarning")
@testing.requires_testing_data
@pytest.mark.parametrize("fmt", ("auto", "mff"))
@pytest.mark.parametrize("do_history", (True, False))
Expand Down Expand Up @@ -640,7 +641,6 @@ def test_export_evokeds_to_mff(tmp_path, fmt, do_history):
evoked[0].export(export_fname, overwrite=True)


@pytest.mark.filterwarnings("ignore::FutureWarning")
@testing.requires_testing_data
def test_export_to_mff_no_device():
"""Test no device type throws ValueError."""
Expand All @@ -652,7 +652,6 @@ def test_export_to_mff_no_device():
export_evokeds("output.mff", evoked)


@pytest.mark.filterwarnings("ignore::FutureWarning")
def test_export_to_mff_incompatible_sfreq():
"""Test non-whole number sampling frequency throws ValueError."""
pytest.importorskip("mffpy", "0.5.7")
Expand Down
15 changes: 3 additions & 12 deletions mne/forward/_field_interpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from ..fixes import _safe_svd
from ..surface import get_head_surf, get_meg_helmet_surf
from ..transforms import _find_trans, transform_surface_to
from ..utils import _check_fname, _check_option, _pl, _reg_pinv, logger, verbose, warn
from ..utils import _check_fname, _check_option, _pl, _reg_pinv, logger, verbose
from ._lead_dots import (
_do_cross_dots,
_do_self_dots,
Expand Down Expand Up @@ -444,11 +444,11 @@ def make_field_map(
subject=None,
subjects_dir=None,
ch_type=None,
*,
mode="fast",
meg_surf="helmet",
origin=None,
origin="auto",
n_jobs=None,
*,
upsampling=1,
head_source=("bem", "head"),
verbose=None,
Expand Down Expand Up @@ -504,15 +504,6 @@ def make_field_map(
The surface maps to be used for field plots. The list contains
separate ones for MEG and EEG (if both MEG and EEG are present).
"""
if origin is None:
warn_message = (
'Default value for origin is "(0.0, 0.0, 0.04)" in version 1.11 '
'but will be changed to "auto" in 1.12. Set the origin parameter '
"explicitly to avoid this warning."
)
warn(warn_message, FutureWarning)
origin = (0.0, 0.0, 0.04)

info = evoked.info

if ch_type is None:
Expand Down
4 changes: 2 additions & 2 deletions mne/report/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
_import_nibabel,
_path_like,
_pl,
_record_warnings,
_safe_input,
_validate_type,
_verbose_safe_false,
Expand Down Expand Up @@ -3501,9 +3502,8 @@ def _add_raw(
init_kwargs, plot_kwargs = _split_psd_kwargs(kwargs=add_psd)
init_kwargs.setdefault("fmax", fmax)
plot_kwargs.setdefault("show", False)
with warnings.catch_warnings():
with _record_warnings():
# SciPy warning about too short a data segment given the window size
warnings.simplefilter(action="ignore", category=FutureWarning)
fig = raw.compute_psd(**init_kwargs).plot(**plot_kwargs)
self._add_figure(
fig=fig,
Expand Down
2 changes: 1 addition & 1 deletion mne/source_space/_source_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -2824,7 +2824,7 @@ def _do_src_distances(con, vertno, run_inds, limit):
return d, min_idx, min_dist


# XXX this should probably be deprecated because it returns surface Labels,
# XXX this should probably be removed because it returns surface Labels,
# and probably isn't the way to go moving forward
# XXX this also assumes that the first two source spaces are surf without
# checking, which might not be the case (could be all volumes)
Expand Down
2 changes: 1 addition & 1 deletion tools/dev/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ clean:
@rm bug-reports-12-to-2-months-old.json || true

dep:
cd ../../ && git grep -iI "\(deprecat\|futurewarning\)" -- ':!*.js' ':!*/conftest.py' ':!*/docs.py' ':!*/test_docs.py' ':!*/utils/__init__.pyi' mne/
cd ../../ && git grep -iI "\(deprecat\|futurewarning\|TODO VERSION\)" -- ':!*.js' ':!*/conftest.py' ':!*/docs.py' ':!*/test_docs.py' ':!*/utils/__init__.pyi' mne/