Skip to content

Commit afdae06

Browse files
authored
MAINT: Remove tomli, tomlsort, and ruff from test group (#13809)
1 parent 472855d commit afdae06

5 files changed

Lines changed: 19 additions & 12 deletions

File tree

examples/inverse/multi_dipole_model.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
cov_fname = meg_path / "sample_audvis-shrunk-cov.fif"
4646
bem_dir = data_path / "subjects" / "sample" / "bem"
4747
bem_fname = bem_dir / "sample-5120-5120-5120-bem-sol.fif"
48+
trans_fname = meg_path / "sample_audvis_raw-trans.fif"
4849

4950
###############################################################################
5051
# Read the MEG data from the audvis experiment. Make epochs and evokeds for the
@@ -102,8 +103,9 @@
102103
cov_fit_right["projs"] = evoked_fit_right.info["projs"]
103104

104105
# Fit the dipoles with the subset of sensors.
105-
dip_left, _ = mne.fit_dipole(evoked_fit_left, cov_fit_left, bem)
106-
dip_right, _ = mne.fit_dipole(evoked_fit_right, cov_fit_right, bem)
106+
kwargs = dict(bem=bem, trans=trans_fname)
107+
dip_left, _ = mne.fit_dipole(evoked_fit_left, cov_fit_left, **kwargs)
108+
dip_right, _ = mne.fit_dipole(evoked_fit_right, cov_fit_right, **kwargs)
107109

108110
###############################################################################
109111
# Now that we have the location and orientations of the dipoles, compute the

examples/stats/r_interop.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"""
22
.. _r-interop:
33
4-
============================
5-
Integrating with R via rpy2
6-
============================
4+
===============================
5+
Integrating with R via ``rpy2``
6+
===============================
77
88
This example shows how to run a mass-univariate 2-sample t-test on
99
:class:`~mne.Epochs` data in Python using :func:`scipy.stats.ttest_ind`,

pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ doc = [
2424
"pyvistaqt >= 0.11", # released 2023-06-30, no newer version available
2525
"pyxdf",
2626
"pyzmq != 24.0.0",
27-
"rpy2",
2827
"scikit-learn >= 1.4", # released 2024-01-18, will become 1.5 on 2026-05-21
2928
"seaborn >= 0.5, != 0.11.2",
3029
"selenium >= 4.27.1",
@@ -36,6 +35,7 @@ doc = [
3635
"sphinxcontrib-towncrier >= 0.5.0a0",
3736
"sphinxcontrib-youtube",
3837
]
38+
doc-full = ["rpy2", {include-group = "doc"}]
3939
# Dependencies in a separate group for uv lockfile generation, currently only used for
4040
# the 'old' environment CI test run
4141
lockfile_extras = [
@@ -55,8 +55,6 @@ test = [
5555
"pytest-rerunfailures",
5656
"pytest-timeout >= 2.2",
5757
"ruff >= 0.1",
58-
"toml-sort",
59-
"tomli; python_version < '3.11'",
6058
"twine",
6159
"vulture",
6260
"wheel >= 0.21",

tools/circleci_dependencies.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ ONLY_BINARY="--only-binary \"numpy,dipy,scipy,matplotlib,pandas,statsmodels,netC
44

55
set -x
66
python -m pip install --upgrade "pip>=25.1" build
7+
# rpy2 3.6.7 (or its deps) cause problems with our installed R version, so pin them
78
python -m pip install --upgrade --progress-bar off $ONLY_BINARY \
89
-ve .[full] \
910
--group=test \
10-
--group=doc \
11+
--group=doc-full \
12+
"rpy2==3.6.6" "rpy2-rinterface==3.6.5" "rpy2-robjects==3.6.4" \
1113
-r doc/sphinxext/related_software.txt \
1214
"git+https://github.com/mne-tools/mne-bids.git" \
1315
"git+https://github.com/mne-tools/mne-qt-browser.git" \

tutorials/preprocessing/90_eyetracking_data.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
In this tutorial we will explore simultaneously recorded eye-tracking and EEG data from
99
a pupillary light reflex task. We will combine the eye-tracking and EEG data, and plot
1010
the ERP and pupil response to the light flashes (i.e. the pupillary light reflex).
11-
1211
"""
1312

1413
# Authors: Scott Huberty <seh33@uw.edu>
@@ -230,7 +229,13 @@
230229

231230
# Skip baseline correction for now. We will apply baseline correction later.
232231
epochs = mne.Epochs(
233-
raw_et, events=et_events, event_id=event_dict, tmin=-0.3, tmax=3, baseline=None
232+
raw_et,
233+
events=et_events,
234+
event_id=event_dict,
235+
tmin=-0.3,
236+
tmax=3,
237+
baseline=None,
238+
picks="all", # include eyetracking channels in the epochs
234239
)
235240
del raw_et # free up some memory
236241
epochs[:8].plot(
@@ -251,4 +256,4 @@
251256
# Finally, let's plot the evoked responses to the light flashes to get a sense of the
252257
# average pupillary light response, and the associated ERP in the EEG data.
253258

254-
epochs.apply_baseline().average().plot(picks=occipital + pupil)
259+
epochs.apply_baseline().average(picks="all").plot(picks=occipital + pupil)

0 commit comments

Comments
 (0)