From 79a3eb26c7812417c5d9197460d163d183719d76 Mon Sep 17 00:00:00 2001 From: Synchon Mandal Date: Wed, 12 Jun 2024 13:07:33 +0200 Subject: [PATCH 1/6] chore: update deps and docs deps in pyproject.toml --- pyproject.toml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e318016b7..5002518db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,13 +37,13 @@ classifiers = [ ] dependencies = [ "click>=8.1.3,<8.2", - "numpy>=1.24,<1.27", - "scipy>=1.9.0,<=1.11.4", - "datalad>=0.15.4,<0.20", - "pandas>=1.4.0,<2.2", - "nibabel>=3.2.0,<5.11", - "nilearn>=0.9.0,<=0.10.2", - "sqlalchemy>=1.4.27,<=2.1.0", + "numpy>=1.26.3,<2.0.0", + "scipy>=1.12.0,<=1.14.0", + "datalad>=1.0.0,<1.2.0", + "pandas>=2.1.0,<2.3.0", + "nibabel>=5.2.0,<5.3.0", + "nilearn>=0.10.3,<=0.10.4", + "sqlalchemy>=2.0.25,<=2.1.0", "ruamel.yaml>=0.17,<0.18", "h5py>=3.10", "httpx[http2]==0.26.0", @@ -76,14 +76,14 @@ onthefly = [ neurokit2 = ["neurokit2>=0.1.7"] dev = ["tox", "pre-commit"] docs = [ - "seaborn>=0.11.2,<0.13", - "sphinx>=5.3.0,<7.3", - "sphinx-gallery>=0.11.0,<0.15.0", - "furo>=2022.9.29,<2023.10.0", - "numpydoc>=1.5.0,<1.6", - "julearn>=0.3.0,<0.4", + "seaborn>=0.13.0,<0.14.0", + "sphinx>=7.3.0,<7.4.0", + "sphinx-gallery>=0.15.0,<0.17.0", + "furo>=2024.4.27,<2024.6.0", + "numpydoc>=1.6.0,<1.8.0", + "julearn==0.3.3", "sphinx-copybutton>=0.5.1,<0.5.3", - "towncrier>=22.12.0,<23.7", + "towncrier>=23.10.0,<23.12.0", "sphinxcontrib-mermaid>=0.8.1,<0.10", ] -- 2.52.0 From 28bef5b5f02ba6661ae709ae7481f03229c0b36d Mon Sep 17 00:00:00 2001 From: Synchon Mandal Date: Wed, 12 Jun 2024 14:51:26 +0200 Subject: [PATCH 2/6] update: correct nilearn imports for JuniferNiftiSpheresMasker --- .../nilearn/junifer_nifti_spheres_masker.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/junifer/external/nilearn/junifer_nifti_spheres_masker.py b/junifer/external/nilearn/junifer_nifti_spheres_masker.py index 8f00448f9..36fd7d9b8 100644 --- a/junifer/external/nilearn/junifer_nifti_spheres_masker.py +++ b/junifer/external/nilearn/junifer_nifti_spheres_masker.py @@ -10,9 +10,9 @@ from nilearn import image, masking from nilearn._utils.class_inspect import get_params from nilearn._utils.niimg import img_data_dtype from nilearn._utils.niimg_conversions import ( - _safe_get_data, check_niimg_3d, check_niimg_4d, + safe_get_data, ) from nilearn.maskers import NiftiSpheresMasker from nilearn.maskers.base_masker import _filter_and_extract @@ -104,7 +104,7 @@ def _apply_mask_and_get_affinity( # Compute world coordinates of all in-mask voxels. if niimg is None: - mask, affine = masking._load_mask_img(mask_img) + mask, affine = masking.load_mask_img(mask_img) # Get coordinate for all voxels inside of mask mask_coords = np.asarray(np.nonzero(mask)).T.tolist() X = None @@ -118,21 +118,21 @@ def _apply_mask_and_get_affinity( target_shape=niimg.shape[:3], interpolation="nearest", ) - mask, _ = masking._load_mask_img(mask_img) + mask, _ = masking.load_mask_img(mask_img) mask_coords = list(zip(*np.where(mask != 0))) - X = masking._apply_mask_fmri(niimg, mask_img) + X = masking.apply_mask_fmri(niimg, mask_img) elif niimg is not None: affine = niimg.affine - if np.isnan(np.sum(_safe_get_data(niimg))): + if np.isnan(np.sum(safe_get_data(niimg))): warn_with_log( "The imgs you have fed into fit_transform() contains NaN " "values which will be converted to zeroes." ) - X = _safe_get_data(niimg, True).reshape([-1, niimg.shape[3]]).T + X = safe_get_data(niimg, True).reshape([-1, niimg.shape[3]]).T else: - X = _safe_get_data(niimg).reshape([-1, niimg.shape[3]]).T + X = safe_get_data(niimg).reshape([-1, niimg.shape[3]]).T mask_coords = list(np.ndindex(niimg.shape[:3])) -- 2.52.0 From 9aa371864b396c03414f04fc8a73634a38834bf6 Mon Sep 17 00:00:00 2001 From: Synchon Mandal Date: Wed, 12 Jun 2024 15:00:23 +0200 Subject: [PATCH 3/6] fix: relax numpy version in pyproject.toml to support Python 3.8 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5002518db..aac885c6e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ classifiers = [ ] dependencies = [ "click>=8.1.3,<8.2", - "numpy>=1.26.3,<2.0.0", + "numpy>=1.24.0,<2.0.0", "scipy>=1.12.0,<=1.14.0", "datalad>=1.0.0,<1.2.0", "pandas>=2.1.0,<2.3.0", -- 2.52.0 From bd31cfe7e0928d408abcb1fada9022040fa897e5 Mon Sep 17 00:00:00 2001 From: Synchon Mandal Date: Wed, 12 Jun 2024 16:23:03 +0200 Subject: [PATCH 4/6] chore: add changelog 347.misc --- docs/changes/newsfragments/347.misc | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/changes/newsfragments/347.misc diff --git a/docs/changes/newsfragments/347.misc b/docs/changes/newsfragments/347.misc new file mode 100644 index 000000000..dcacc4841 --- /dev/null +++ b/docs/changes/newsfragments/347.misc @@ -0,0 +1 @@ +Update core and docs dependencies by `Synchon Mandal`_ -- 2.52.0 From 728decca0df1f9ed3e4cb08eea636162a3b02c85 Mon Sep 17 00:00:00 2001 From: Synchon Mandal Date: Wed, 12 Jun 2024 16:29:06 +0200 Subject: [PATCH 5/6] fix: relax pandas version in pyproject.toml to support Python 3.8 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index aac885c6e..8efffda89 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,7 @@ dependencies = [ "numpy>=1.24.0,<2.0.0", "scipy>=1.12.0,<=1.14.0", "datalad>=1.0.0,<1.2.0", - "pandas>=2.1.0,<2.3.0", + "pandas>=2.0.0,<2.3.0", "nibabel>=5.2.0,<5.3.0", "nilearn>=0.10.3,<=0.10.4", "sqlalchemy>=2.0.25,<=2.1.0", -- 2.52.0 From 4621884c6b1212d2bc0b346a964928fcb071fd33 Mon Sep 17 00:00:00 2001 From: Synchon Mandal Date: Wed, 12 Jun 2024 16:44:06 +0200 Subject: [PATCH 6/6] fix: relax scipy version in pyproject.toml to support Python 3.8 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8efffda89..7a17e6aa3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ classifiers = [ dependencies = [ "click>=8.1.3,<8.2", "numpy>=1.24.0,<2.0.0", - "scipy>=1.12.0,<=1.14.0", + "scipy>=1.10.0,<=1.14.0", "datalad>=1.0.0,<1.2.0", "pandas>=2.0.0,<2.3.0", "nibabel>=5.2.0,<5.3.0", -- 2.52.0