Skip to content

Commit 1c30141

Browse files
authored
MAINT: Use VTK prerelease wheels in pre jobs (#11629)
1 parent fc981bd commit 1c30141

File tree

7 files changed

+21
-15
lines changed

7 files changed

+21
-15
lines changed

Diff for: examples/preprocessing/locate_ieeg_micro.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import numpy as np
2020
import nibabel as nib
2121
import mne
22+
import mne_gui_addons
2223

2324
# path to sample sEEG
2425
misc_path = mne.datasets.misc.data_path()
@@ -55,7 +56,7 @@
5556
# launch the viewer with only the CT (note, we won't be able to use
5657
# the MR in this case to help determine which brain area the contact is
5758
# in), and use the user interface to find the locations of the contacts
58-
gui = mne.gui.locate_ieeg(raw.info, head_ct_t, CT_orig)
59+
gui = mne_gui_addons.locate_ieeg(raw.info, head_ct_t, CT_orig)
5960

6061
# we'll programmatically mark all the contacts on one electrode shaft
6162
for i, pos in enumerate([(-52.66, -40.84, -26.99), (-55.47, -38.03, -27.92),

Diff for: mne/tests/test_surface.py

+12-6
Original file line numberDiff line numberDiff line change
@@ -164,22 +164,26 @@ def test_read_curv():
164164
assert np.logical_or(bin_curv == 0, bin_curv == 1).all()
165165

166166

167-
def test_decimate_surface_vtk():
167+
@pytest.mark.parametrize('n_tri', (4, 3, 2))
168+
def test_decimate_surface_vtk(n_tri):
168169
"""Test triangular surface decimation."""
169170
pytest.importorskip('pyvista')
170171
points = np.array([[-0.00686118, -0.10369860, 0.02615170],
171172
[-0.00713948, -0.10370162, 0.02614874],
172173
[-0.00686208, -0.10368247, 0.02588313],
173174
[-0.00713987, -0.10368724, 0.02587745]])
174175
tris = np.array([[0, 1, 2], [1, 2, 3], [0, 3, 1], [1, 2, 0]])
175-
for n_tri in [4, 3, 2]: # quadric decimation creates even numbered output.
176-
_, this_tris = decimate_surface(points, tris, n_tri)
177-
assert len(this_tris) == n_tri if not n_tri % 2 else 2
176+
_, this_tris = decimate_surface(points, tris, n_tri)
177+
want = (n_tri, n_tri - 1)
178+
if n_tri == 3:
179+
want = want + (1,)
180+
assert len(this_tris) in want
178181
with pytest.raises(ValueError, match='exceeds number of original'):
179182
decimate_surface(points, tris, len(tris) + 1)
180183
nirvana = 5
181184
tris = np.array([[0, 1, 2], [1, 2, 3], [0, 3, 1], [1, 2, nirvana]])
182-
pytest.raises(ValueError, decimate_surface, points, tris, n_tri)
185+
with pytest.raises(ValueError, match='undefined points'):
186+
decimate_surface(points, tris, n_tri)
183187

184188

185189
@requires_freesurfer('mris_sphere')
@@ -238,7 +242,9 @@ def test_marching_cubes(dtype, value, smooth):
238242
# verts and faces are rather large so use checksum
239243
rtol = 1e-2 if smooth else 1e-9
240244
assert_allclose(verts.sum(axis=0), [14700, 14700, 14700], rtol=rtol)
241-
assert_allclose(triangles.sum(axis=0), [363402, 360865, 350588])
245+
tri_sum = triangles.sum(axis=0).tolist()
246+
# old VTK (9.2.6), new VTK
247+
assert tri_sum in [[363402, 360865, 350588], [364089, 359867, 350408]]
242248
# test fill holes
243249
data[24:27, 24:27, 24:27] = 0
244250
verts, triangles = _marching_cubes(data, level, smooth=smooth,

Diff for: requirements.txt

-1
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,3 @@ mne-qt-browser
4343
darkdetect
4444
qdarkstyle
4545
threadpoolctl
46-
mne-gui-addons

Diff for: requirements_doc.txt

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
# requirements for building docs
22
sphinx!=4.1.0,<6
3-
https://github.com/numpy/numpydoc/archive/main.zip
3+
git+https://github.com/numpy/numpydoc.git@main
44
pydata_sphinx_theme==0.13.1
5-
https://github.com/sphinx-gallery/sphinx-gallery/archive/master.zip
5+
git+https://github.com/sphinx-gallery/sphinx-gallery@master
66
sphinxcontrib-bibtex>=2.5
77
memory_profiler
88
neo
99
seaborn!=0.11.2
1010
sphinx_copybutton
1111
sphinx-design
1212
sphinxcontrib-youtube
13-
https://github.com/mne-tools/mne-bids/archive/main.zip
13+
git+https://github.com/mne-tools/mne-bids@main
1414
pyxdf
15-
https://github.com/mne-tools/mne-connectivity/archive/main.zip
15+
git+https://github.com/mne-tools/mne-connectivity.git@main
16+
git+https://github.com/mne-tools/mne-gui-addons.git@main
1617
pygments>=2.13
1718
pytest
1819
graphviz

Diff for: tools/azure_dependencies.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ elif [ "${TEST_MODE}" == "pip-pre" ]; then
1818
python -m pip install --progress-bar off --upgrade --pre --only-binary ":all:" --no-deps -i "https://pypi.anaconda.org/scipy-wheels-nightly/simple" scipy statsmodels pandas scikit-learn dipy matplotlib
1919
python -m pip install --progress-bar off --upgrade --pre --only-binary ":all:" --no-deps -f "https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com" h5py
2020
python -m pip install --progress-bar off --upgrade --pre --only-binary ":all:" --no-deps -i "https://test.pypi.org/simple" openmeeg
21-
python -m pip install --progress-bar off --upgrade --pre --only-binary ":all:" --no-deps vtk
21+
python -m pip install --progress-bar off --upgrade --pre --only-binary ":all:" --no-deps -i "https://wheels.vtk.org" vtk
2222
python -m pip install --progress-bar off git+https://github.com/pyvista/pyvista
2323
python -m pip install --progress-bar off git+https://github.com/pyvista/pyvistaqt
2424
python -m pip install --progress-bar off --upgrade --pre imageio-ffmpeg xlrd mffpy python-picard patsy pillow

Diff for: tools/github_actions_dependencies.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ else
2929
pip install $STD_ARGS --pre git+https://github.com/nilearn/nilearn
3030
pip install $STD_ARGS --pre --only-binary ":all:" -i "https://test.pypi.org/simple" openmeeg
3131
echo "VTK"
32-
pip install $STD_ARGS --pre --only-binary ":all:" vtk
32+
pip install $STD_ARGS --pre --only-binary ":all:" -i "https://wheels.vtk.org" vtk
3333
python -c "import vtk"
3434
echo "PyVista"
3535
pip install --progress-bar off git+https://github.com/pyvista/pyvista

Diff for: tutorials/clinical/10_ieeg_localize.py

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
use this module in your analysis to support the addition of new projects to
2727
MNE.
2828
"""
29-
3029
# Authors: Alex Rockhill <aprockhill@mailbox.org>
3130
# Eric Larson <larson.eric.d@gmail.com>
3231
#

0 commit comments

Comments
 (0)