Skip to content

Commit 30ef40a

Browse files
authored
MAINT: Tweak versions for doc builds (#7880)
1 parent 3008def commit 30ef40a

File tree

16 files changed

+42
-19
lines changed

16 files changed

+42
-19
lines changed

doc/_static/style.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ blockquote {
8585
margin-bottom: 5px;
8686
}
8787

88+
.devbar a {
89+
color: #fff;
90+
font-weight: bold;
91+
}
92+
8893
#navbar a:hover {
8994
color: rgb(242, 80, 80);
9095
}

doc/_templates/layout.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
{% block extrahead %}
44

5+
<link rel="canonical" href="https://mne.tools/stable/index.html" />
56
<script type="text/javascript" src="{{ pathto('_static/copybutton.js', 1) }}"></script>
67

78
{% if use_google_analytics|tobool %}
@@ -52,7 +53,10 @@
5253
{% block relbar1 %}
5354
{% if build_dev_html|tobool %}
5455
<div class="d-block devbar alert alert-danger">
55-
This documentation is for <strong>development version {{ release }}</strong>.
56+
This is documentation for the <em>unstable development version</em> of MNE-Python,
57+
<a href="https://mne.tools/dev/install/advanced.html#using-the-development-version-of-mne-python-latest-master">available here</a>.
58+
Or, switch to documentation for the <a href="https://mne.tools/stable">current stable version</a>.
59+
5660
</div>
5761
{% endif %}
5862

@@ -101,4 +105,5 @@
101105
<p>&copy; Copyright {{ copyright }}.</p>
102106
</div>
103107
</footer>
108+
<script src="https://mne.tools/versionwarning.js"></script>
104109
{%- endblock %}

environment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ dependencies:
3333
- pip:
3434
- mne
3535
- https://github.com/numpy/numpydoc/archive/master.zip
36-
- pyvista>=0.24
37-
- mayavi
36+
- pyvista==0.24
37+
- https://github.com/enthought/mayavi/archive/master.zip
3838
- PySurfer[save_movie]
3939
- dipy --only-binary dipy
4040
- nibabel

mne/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def pytest_configure(config):
7979
ignore:scipy\.gradient is deprecated.*:DeprecationWarning
8080
ignore:sklearn\.externals\.joblib is deprecated.*:FutureWarning
8181
ignore:The sklearn.*module.*deprecated.*:FutureWarning
82-
ignore:.*TraitTuple.*trait.*handler.*deprecated.*:DeprecationWarning
82+
ignore:.*trait.*handler.*deprecated.*:DeprecationWarning
8383
ignore:.*rich_compare.*metadata.*deprecated.*:DeprecationWarning
8484
ignore:.*In future, it will be an error for 'np.bool_'.*:DeprecationWarning
8585
ignore:.*Converting `np\.character` to a dtype is deprecated.*:DeprecationWarning

mne/decoding/transformer.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,12 @@ def __init__(self, info=None, scalings=None, with_mean=True,
123123
self._scaler = _ConstantScaler(info, scalings, self.with_std)
124124
elif scalings == 'mean':
125125
from sklearn.preprocessing import StandardScaler
126-
self._scaler = StandardScaler(self.with_mean, self.with_std)
126+
self._scaler = StandardScaler(
127+
with_mean=self.with_mean, with_std=self.with_std)
127128
else: # scalings == 'median':
128129
from sklearn.preprocessing import RobustScaler
129-
self._scaler = RobustScaler(self.with_mean, self.with_std)
130+
self._scaler = RobustScaler(
131+
with_centering=self.with_mean, with_scaling=self.with_std)
130132

131133
def fit(self, epochs_data, y=None):
132134
"""Standardize data across channels.

mne/gui/_coreg_gui.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
FileDialog, GUI)
7474
from traits.api import (Bool, Button, cached_property, DelegatesTo, Directory,
7575
Enum, Float, HasTraits, HasPrivateTraits, Instance,
76-
Int, on_trait_change, Property, Str, List, RGBColor)
76+
Int, on_trait_change, Property, Str, List)
7777
from traitsui.api import (View, Item, Group, HGroup, VGroup, VGrid, EnumEditor,
7878
Handler, Label, Spring, InstanceEditor, StatusItem,
7979
UIInfo)
@@ -101,6 +101,11 @@
101101
laggy_float_editor_scale, laggy_float_editor_deg,
102102
laggy_float_editor_mm, laggy_float_editor_weight)
103103

104+
try:
105+
from traitsui.api import RGBColor
106+
except ImportError:
107+
from traits.api import RGBColor
108+
104109
defaults = DEFAULTS['coreg']
105110

106111

mne/gui/_viewer.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,16 @@
1414
from mayavi.tools.mlab_scene_model import MlabSceneModel
1515
from traits.api import (HasTraits, HasPrivateTraits, on_trait_change,
1616
Instance, Array, Bool, Button, Enum, Float, Int, List,
17-
Range, Str, RGBColor, Property, cached_property,
18-
ArrayOrNone)
17+
Range, Str, Property, cached_property, ArrayOrNone)
1918
from traitsui.api import (View, Item, HGroup, VGrid, VGroup, Spring,
2019
TextEditor)
2120
from tvtk.api import tvtk
2221

22+
try:
23+
from traitsui.api import RGBColor
24+
except ImportError:
25+
from traits.api import RGBColor
26+
2327
from ..defaults import DEFAULTS
2428
from ..surface import _CheckInside, _DistanceQuery
2529
from ..transforms import apply_trans

mne/inverse_sparse/tests/test_gamma_map.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def test_gamma_map():
7070

7171
stc = gamma_map(evoked, forward, cov, alpha, tol=1e-4,
7272
xyz_same_gamma=False, update_mode=1)
73-
_check_stc(stc, evoked, 82010, 'lh', fwd=forward)
73+
_check_stc(stc, evoked, 82010, 'lh', fwd=forward, dist_limit=4., ratio=20.)
7474

7575
dips = gamma_map(evoked, forward, cov, alpha, tol=1e-4,
7676
xyz_same_gamma=False, update_mode=1,

mne/io/ctf/tests/test_ctf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ def test_read_ctf_annotations():
346346
378391, 380800, 382859, 385161, 387093, 389434, 391624, 393785, # noqa
347347
396093, 398214, 400198, 402166, 404104, 406047, 408372, 410686, # noqa
348348
413029, 414975, 416850, 418797, 420824, 422959, 425026, 427215, # noqa
349-
429278, 431668
349+
429278, 431668 # noqa
350350
]) - 1 # Fieldtrip has 1 sample difference with MNE
351351

352352
raw = RawArray(

mne/preprocessing/ica.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def _check_for_unsupported_ica_channels(picks, info, allow_ref_meg=False):
117117
if not check:
118118
raise ValueError('Invalid channel type%s passed for ICA: %s.'
119119
'Only the following types are supported: %s'
120-
.format(_pl(chs), chs, types))
120+
% (_pl(chs), chs, types))
121121

122122

123123
@fill_doc

0 commit comments

Comments
 (0)