Skip to content

Commit

Permalink
Release 0.10.0 (#3454)
Browse files Browse the repository at this point in the history
  • Loading branch information
ymzayek committed Jan 6, 2023
1 parent 9a49cae commit 9c29e33
Show file tree
Hide file tree
Showing 11 changed files with 84 additions and 29 deletions.
65 changes: 60 additions & 5 deletions doc/changes/latest.rst → doc/changes/0.10.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,101 @@

.. include:: names.rst

0.9.3.dev
=========
0.10.0
======

**Released January 2023**


HIGHLIGHTS
----------

.. warning::

| **Python 3.7 is deprecated and will be removed in release 0.12.**
| **We recommend upgrading to Python 3.10.**
|
| **Minimum supported versions of packages have been bumped up:**
| - Numpy -- v1.19.0
| - SciPy -- v1.6.0
| - Scikit-learn -- v1.0.0
| - Nibabel -- v3.2.0
| - Pandas -- v1.1.5
| - Joblib -- v1.0.0

- New classes :class:`~maskers.MultiNiftiLabelsMasker` and :class:`~maskers.MultiNiftiMapsMasker` create maskers to extract signals from a list of subjects with 4D images using parallelization (:gh:`3237` by `Yasmin Mzayek`_).

- Updated docs with a new theme using `furo <https://github.com/pradyunsg/furo>`_ (:gh:`3125` by `Alexis Thual`_).

- :func:`~mass_univariate.permuted_ols` and :func:`~glm.second_level.non_parametric_inference` now support :term:`TFCE` statistic (:gh:`3196` by `Taylor Salo`_).

- :func:`~mass_univariate.permuted_ols` and :func:`~glm.second_level.non_parametric_inference` now support cluster-level Family-wise error correction (:gh:`3181` by `Taylor Salo`_).

- :func:`~interfaces.bids.save_glm_to_bids` has been added, which writes model outputs to disk according to BIDS convention (:gh:`2715` by `Taylor Salo`_).


NEW
---

- New classes :class:`~maskers.MultiNiftiLabelsMasker` and :class:`~maskers.MultiNiftiMapsMasker` create maskers to extract signals from a list of subjects with 4D images using parallelization (:gh:`3237` by `Yasmin Mzayek`_).


Fixes
-----

- Fix off-by-one error when setting ticks in :func:`~plotting.plot_surf` (:gh:`3105` by `Dimitri Papadopoulos Orfanos`_).

- Regressor names can now be invalid identifiers but will raise an error with :meth:`~glm.first_level.FirstLevelModel.compute_contrast` if combined to make an invalid expression (:gh:`3374` by `Yasmin Mzayek`_).

- Fix :func:`~plotting.plot_connectome` which was raising a ``ValueError`` when ``vmax < 0`` (:gh:`3390` by `Paul Bogdan`_).

- Change the order of applying ``sample_masks`` in :func:`~signal.clean` based on different filtering options (:gh:`3385` by `Hao-Ting Wang`_).

- When using cosine filter and ``sample_masks`` is used, :func:`~signal.clean` generates the cosine discrete regressors using the full time series (:gh:`3385` by `Hao-Ting Wang`_).

- Description of the ``opening`` parameter added to ``compute_multi_epi_mask`` docs (:gh:`3412` by `Natasha Clarke`_).

- Fix display of colorbar in matrix plots. Colorbar was overlapping in :func:`~matplotlib.pyplot.subplots` due to a hardcoded adjustment value in the subplot (:gh:`3403` by `Raphael Meudec`_).

- Pass values with correct type to scikit-learn estimator parameters and remove deprecated parameter (:gh:`3430` by `Yasmin Mzayek`_).

- Fix cluster labeling for two-sided cluster level permutation tests in :func:`~mass_univariate.permuted_ols` and associated function test ``test_cluster_level_parameters_smoke`` (:gh:`3436` by `Jelle Roelof Dalenberg`_).

- Fix failing CanICA test by adding noise to the data creation step (:gh:`3453` by `Yasmin Mzayek`_).


Enhancements
------------

- :func:`~signal.clean` imputes scrubbed volumes (defined through ``sample_masks``) with cubic spline function before applying butterworth filter (:gh:`3385` by `Hao-Ting Wang`_).

- As part of making the User Guide more user-friendly, the introduction was reworked (:gh:`3380` by `Alexis Thual`_)

- Added instructions for maintainers to make sure LaTeX dependencies are installed before building and deploying the stable docs (:gh:`3426` by `Yasmin Mzayek`_).
- Parameter ``sample_masks`` in :func:`~signal.clean` and masker functions accept binary mask (:gh:`3439` by `Hao-Ting Wang`_).

- Parameter ``sample_masks`` in :func:`~signal.clean` and masker functions accept binary mask (:gh:`3439` by `Hao-Ting Wang`_).

- Contributing docs were improved by adding clear guidelines for users about changelog/whatsnew entries (:gh:`3446` by `Robert Williamson`_).

- Add parameter ``cut_coords`` in :func:`~reporting.make_glm_report` (:gh:`3452` by `Audrey Duran`_).


Changes
-------

- Private functions ``nilearn.regions.rena_clustering.weighted_connectivity_graph`` and ``nilearn.regions.rena_clustering.nearest_neighbor_grouping`` have been renamed with a leading "_", while function :func:`~regions.recursive_neighbor_agglomeration` has been added to the public API (:gh:`3347` by `Ahmad Chamma`_).

- Numpy deprecated type aliases are replaced by equivalent builtin types (:gh:`3422` by `Yasmin Mzayek`_).
- Function ``nilearn.masking.compute_multi_gray_matter_mask`` has been removed
since it has been deprecated and replaced by :func:`~masking.compute_multi_brain_mask` (:gh:`3427` by `Yasmin Mzayek`_).

- Function ``nilearn.masking.compute_multi_gray_matter_mask`` has been removed since it has been deprecated and replaced by :func:`~masking.compute_multi_brain_mask` (:gh:`3427` by `Yasmin Mzayek`_).

- :mod:`~nilearn.glm` will no longer warn that the module is experimental (:gh:`3424` by `Yasmin Mzayek`_).

- Python ``3.6`` is no longer supported. Support for Python ``3.7`` is deprecated and will be removed in release ``0.12`` (:gh:`3429` by `Yasmin Mzayek`_).

- The function ``_safe_cache`` is removed because it was deemed outdated and not necessary anymore (:gh:`3375` by `Yasmin Mzayek`_).

- Minimum supported versions of packages have been bumped up:

* Numpy -- v1.19.0
Expand All @@ -54,5 +107,7 @@ Changes
* Joblib -- v1.0.0

(:gh:`3440` by `Yasmin Mzayek`_).

- In release ``0.10.0`` the default resolution for loaded MNI152 templates will be 1mm instead of 2mm (:gh:`3433` by `Yasmin Mzayek`_).

- Remove all docstring mentions of GLM module being experimental and any references to nistats migration. ``doc/nistats_migration.rst`` is also removed (:gh:`3449` by `Yasmin Mzayek`_).
4 changes: 2 additions & 2 deletions doc/changes/whats_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
What's new
==========

.. _latest:
.. include:: latest.rst
.. _v0.10.0:
.. include:: 0.10.0.rst
.. _v0.9.2:
.. include:: 0.9.2.rst
.. _v0.9.1:
Expand Down
2 changes: 1 addition & 1 deletion nilearn/image/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ def new_img_like(ref_niimg, data, affine=None, copy_header=False):
Data to be stored in the image. If data dtype is a boolean, then data
is cast to 'uint8' by default.
.. versionchanged:: 0.9.2dev
.. versionchanged:: 0.9.2
Changed default dtype casting of booleans from 'int8' to 'uint8'.
affine : 4x4 :class:`numpy.ndarray`, optional
Expand Down
6 changes: 3 additions & 3 deletions nilearn/interfaces/bids/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
def _clean_contrast_name(contrast_name):
"""Remove prohibited characters from name and convert to camelCase.
.. versionadded:: 0.9.2dev
.. versionadded:: 0.9.2
BIDS filenames, in which the contrast name will appear as a
contrast-<name> key/value pair, must be alphanumeric strings.
Expand Down Expand Up @@ -54,7 +54,7 @@ def _clean_contrast_name(contrast_name):
def _generate_model_metadata(out_file, model):
"""Generate a sidecar JSON file containing model metadata.
.. versionadded:: 0.9.2dev
.. versionadded:: 0.9.2
Parameters
----------
Expand Down Expand Up @@ -123,7 +123,7 @@ def _generate_model_metadata(out_file, model):
def _generate_dataset_description(out_file, model_level):
"""Generate a BIDS dataset_description.json file with relevant metadata.
.. versionadded:: 0.9.2dev
.. versionadded:: 0.9.2
Parameters
----------
Expand Down
2 changes: 1 addition & 1 deletion nilearn/interfaces/bids/glm.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def save_glm_to_bids(
):
"""Save GLM results to BIDS-like files.
.. versionadded:: 0.9.2dev
.. versionadded:: 0.9.2
Parameters
----------
Expand Down
2 changes: 1 addition & 1 deletion nilearn/maskers/nifti_labels_masker.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ def inverse_transform(self, signals):
Any mask given at initialization is taken into account.
.. versionchanged:: 0.9.2dev
.. versionchanged:: 0.9.2
This method now supports 1D arrays, which will produce 3D images.
Expand Down
8 changes: 4 additions & 4 deletions nilearn/mass_univariate/permuted_least_squares.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ def permuted_ols(
Additionally, if ``tfce`` is True or ``threshold`` is not None,
``output_type`` will automatically be set to 'dict'.
.. deprecated:: 0.9.2.dev
.. deprecated:: 0.9.2
The default value for this parameter will change from 'legacy' to
'dict' in 0.13, and the parameter will be removed completely in
Expand All @@ -464,7 +464,7 @@ def permuted_ols(
This is returned if ``output_type`` == 'legacy'.
.. deprecated:: 0.9.2.dev
.. deprecated:: 0.9.2
The 'legacy' option for ``output_type`` is deprecated.
The default value will change to 'dict' in 0.13,
Expand All @@ -480,7 +480,7 @@ def permuted_ols(
This is returned if ``output_type`` == 'legacy'.
.. deprecated:: 0.9.2.dev
.. deprecated:: 0.9.2
The 'legacy' option for ``output_type`` is deprecated.
The default value will change to 'dict' in 0.13,
Expand All @@ -494,7 +494,7 @@ def permuted_ols(
This is returned if ``output_type`` == 'legacy'.
.. deprecated:: 0.9.2.dev
.. deprecated:: 0.9.2
The 'legacy' option for ``output_type`` is deprecated.
The default value will change to 'dict' in 0.13,
Expand Down
2 changes: 1 addition & 1 deletion nilearn/regions/signal_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def signals_to_img_labels(signals, labels_img, mask_img=None,
labels_img, mask_img must have the same shapes and affines.
.. versionchanged:: 0.9.2dev
.. versionchanged:: 0.9.2
Support 1D signals.
Parameters
Expand Down
2 changes: 1 addition & 1 deletion nilearn/reporting/_get_clusters_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def get_clusters_table(stat_img, stat_threshold, cluster_threshold=None,
This center of mass may, in some cases, appear outside of the cluster.
.. versionchanged:: 0.9.2dev
.. versionchanged:: 0.9.2
In this case, the cluster voxel nearest to the center of mass is
reported.
Expand Down
2 changes: 1 addition & 1 deletion nilearn/reporting/glm_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ def _make_stat_maps(model, contrasts, output_type='z_score'):
The type of statistical map to retain from the contrast.
Default is 'z_score'.
.. versionadded:: 0.9.2dev
.. versionadded:: 0.9.2
Returns
-------
Expand Down
18 changes: 9 additions & 9 deletions nilearn/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# Dev branch marker is: 'X.Y.dev' or 'X.Y.devN' where N is an integer.
# 'X.Y.dev0' is the canonical version of 'X.Y.dev'
#
__version__ = '0.9.3.dev'
__version__ = '0.10.0'

_NILEARN_INSTALL_MSG = 'See %s for installation information.' % (
'https://nilearn.github.io/stable/introduction.html#installation')
Expand All @@ -31,35 +31,35 @@
# in some meaningful order (more => less 'core').
REQUIRED_MODULE_METADATA = (
('numpy', {
'min_version': '1.16',
'min_version': '1.19',
'required_at_installation': True,
'install_info': _NILEARN_INSTALL_MSG}),
('scipy', {
'min_version': '1.2',
'min_version': '1.6',
'required_at_installation': True,
'install_info': _NILEARN_INSTALL_MSG}),
('sklearn', {
'min_version': '0.21',
'min_version': '1.0.0',
'required_at_installation': True,
'install_info': _NILEARN_INSTALL_MSG}),
('joblib', {
'min_version': '0.12',
'min_version': '1.0.0',
'required_at_installation': True,
'install_info': _NILEARN_INSTALL_MSG}),
('nibabel', {
'min_version': '2.5',
'min_version': '3.2',
'required_at_installation': False}),
('pandas', {
'min_version': '0.24.0',
'min_version': '1.1.5',
'required_at_installation': True,
'install_info': _NILEARN_INSTALL_MSG}),
("requests", {
"min_version": "2",
"min_version": "2.25",
"required_at_installation": False
})
)

OPTIONAL_MATPLOTLIB_MIN_VERSION = '2.0'
OPTIONAL_MATPLOTLIB_MIN_VERSION = '3.3.0'


def _import_module_with_version_check(
Expand Down

0 comments on commit 9c29e33

Please sign in to comment.