Skip to content

Commit 07f8451

Browse files
adelavegajdkent
andauthored
Update Nilearn API _check_same_fov (neurostuff#873)
* Revert "Revert "use public check_same_fov"" This reverts commit c053fd7. * Update nimare/meta/ibma.py Co-authored-by: James Kent <[email protected]> * skip 0.10.3 * fix style issue * fix codecov --------- Co-authored-by: James Kent <[email protected]>
1 parent bf7df33 commit 07f8451

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

.github/workflows/testing.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,8 @@ jobs:
232232
- name: Download artifacts
233233
uses: actions/download-artifact@v2
234234
- name: Upload to CodeCov
235-
uses: codecov/codecov-action@v2
235+
uses: codecov/codecov-action@v3
236236
with:
237237
fail_ci_if_error: true
238+
env:
239+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

nimare/meta/ibma.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@
99
import pandas as pd
1010
import pymare
1111
from joblib import Memory
12-
from nilearn._utils.niimg_conversions import _check_same_fov
12+
13+
try:
14+
# nilearn>0.10.3
15+
from nilearn._utils.niimg_conversions import check_same_fov
16+
except ImportError:
17+
# nilearn < 0.10.3
18+
from nilearn._utils.niimg_conversions import _check_same_fov as check_same_fov
19+
1320
from nilearn.image import concat_imgs, resample_to_img
1421
from nilearn.input_data import NiftiMasker
1522
from nilearn.mass_univariate import permuted_ols
@@ -105,7 +112,7 @@ def _preprocess_input(self, dataset):
105112
imgs = [
106113
(
107114
nib.load(img)
108-
if _check_same_fov(nib.load(img), reference_masker=mask_img)
115+
if check_same_fov(nib.load(img), reference_masker=mask_img)
109116
else resample_to_img(nib.load(img), mask_img, **self._resample_kwargs)
110117
)
111118
for img in self.inputs_[name]

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ install_requires =
4444
joblib>=1.3.0 # parallelization
4545
matplotlib>=3.5.2 # this is for nilearn, which doesn't include it in its reqs
4646
nibabel>=3.2.0 # I/O of niftis
47-
nilearn>=0.10.1,<0.10.3 # until https://github.com/nilearn/nilearn/pull/4256 is resolved
47+
nilearn>=0.10.1,!=0.10.3 # https://github.com/nilearn/nilearn/pull/4256 0.10.3 is broken
4848
numba>=0.57.0 # used by sparse
4949
numpy>=1.22 # numba needs NumPy 1.22 or greater
5050
pandas>=2.0.0

0 commit comments

Comments
 (0)