Skip to content

Commit 29ccfd2

Browse files
authored
Merge branch 'main' into website-timestamp-24h
2 parents 2ce7399 + 17c7929 commit 29ccfd2

File tree

6 files changed

+22
-8
lines changed

6 files changed

+22
-8
lines changed

doc/_templates/sidebar-quicklinks.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ <h5 class="card-header font-weight-bold">Version {{ release }}</h5>
44
<ul class="list-group list-group-flush list-unstyled quicklinks">
55
<li><a href="{{ pathto('auto_tutorials/index.html', 1) }}"><i class="fas fa-book fa-fw"></i> Tutorials</a></li>
66
<li><a href="{{ pathto('development/whats_new.html', 1) }}"><i class="fas fa-newspaper fa-fw"></i> Changelog</a></li>
7-
<li><a href="{{ pathto('help/index.html', 1) }}"><i class="fas fa-circle-question fa-fw"></i> Get help</a></li>
7+
<li><a href="{{ pathto('help/index.html', 1) }}"><i class="fas fa-circle-question fa-fw"></i> Get Help</a></li>
88
<li><a href="{{ pathto('documentation/cite.html', 1) }}"><i class="fas fa-quote-left fa-fw"></i> Cite</a></li>
99
<li><a href="{{ pathto('development/contributing.html', 1) }}"><i class="fas fa-code-branch fa-fw"></i> Contribute</a></li>
1010
<li><a href="{{ pathto('credit.html', 1) }}"><i class="fas fa-hands-clapping fa-fw"></i> Contributors</a></li>

doc/changes/devel/13341.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix bug with :func:`mne.open_report` not working with old saved files, by `Eric Larson`_.

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ def fix_sklearn_inherited_docstrings(app, what, name, obj, options, lines):
787787
# Theme options are theme-specific and customize the look and feel of a theme
788788
# further. For a list of options available for each theme, see the
789789
# documentation.
790-
switcher_version_match = "dev" if ".dev" in version else version
790+
switcher_version_match = "dev" if ".dev" in release else version
791791
html_theme_options = {
792792
"icon_links": [
793793
dict(

mne/report/report.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -714,12 +714,11 @@ def open_report(fname, **params):
714714
# Check **params with the loaded report
715715
read_hdf5, _ = _import_h5io_funcs()
716716
state = read_hdf5(fname, title="mnepython")
717+
for param, default in _backward_compat_map.items():
718+
state.setdefault(param, default)
717719
for param in params:
718720
if param not in state:
719-
if param in _backward_compat_map:
720-
state[param] = _backward_compat_map[param]
721-
else:
722-
raise ValueError(f"The loaded report has no attribute {param}")
721+
raise ValueError(f"The loaded report has no attribute {param}")
723722
if params[param] != state[param]:
724723
raise ValueError(
725724
f"Attribute '{param}' of loaded report ({params[param]}) does not "

mne/report/tests/test_report.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,6 +1172,21 @@ def test_report_tweaks(tmp_path, monkeypatch):
11721172
assert img.shape == (2000, 2000, 3) # figure.figsize * figure.dpi
11731173

11741174

1175+
def test_report_backward_compat(tmp_path):
1176+
"""Ensure our options are still backward compatible."""
1177+
h5io = pytest.importorskip("h5io")
1178+
fname = tmp_path / "report.h5"
1179+
r = Report()
1180+
r.img_max_width = 600
1181+
r.save(fname)
1182+
h = h5io.read_hdf5(fname, title="mnepython")
1183+
assert h["img_max_width"] == 600
1184+
del h["img_max_width"]
1185+
h5io.write_hdf5(fname, h, title="mnepython", overwrite=True)
1186+
with open_report(fname) as r2:
1187+
assert r2.img_max_width == 850
1188+
1189+
11751190
@pytest.mark.slowtest # 30 s on Azure
11761191
@testing.requires_testing_data
11771192
def test_manual_report_3d(tmp_path, renderer):

tools/install_pre_requirements.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@ python -m pip install $STD_ARGS --only-binary ":all:" --default-timeout=60 \
3131
"dipy>=1.10.0.dev0" \
3232
"pyarrow>=20.0.0.dev0" \
3333
"tables>=3.10.3.dev0" \
34+
"statsmodels>=0.15.0.dev697" \
3435
"h5py>=3.13.0"
35-
# TODO: should have above: "statsmodels>=0.15.0.dev0"
36-
# https://github.com/statsmodels/statsmodels/issues/9572
3736
echo "::endgroup::"
3837

3938
# No Numba because it forces an old NumPy version

0 commit comments

Comments
 (0)