Hello community, here is the log from the commit of package python-nilearn for openSUSE:Factory checked in at 2020-11-21 12:43:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-nilearn (Old) and /work/SRC/openSUSE:Factory/.python-nilearn.new.5913 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-nilearn" Sat Nov 21 12:43:13 2020 rev:7 rq:849637 version:0.7.0 Thu Nov 19 16:47:37 2020 rev:6 rq:849415 version:0.7.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-nilearn/python-nilearn.changes 2020-10-15 13:51:00.869314782 +0200 +++ /work/SRC/openSUSE:Factory/.python-nilearn.new.5913/python-nilearn.changes 2020-11-23 10:44:55.674268969 +0100 @@ -1,0 +2,19 @@ +Fri Nov 20 08:18:25 UTC 2020 - Guillaume GARDET <guillaume.gar...@opensuse.org> + +- Add runtime deps: python-requests + +------------------------------------------------------------------- +Mon Nov 16 08:30:47 UTC 2020 - Guillaume GARDET <guillaume.gar...@opensuse.org> + +- Update to 0.7.0 +- Add patch to fix aarch64 test: + * nilearn-fix-aarch64.patch +- Drop upstreamed patches: + * fix-test_save_cmap.patch + * update-numpy-warning.patch +- Disable 'test_clean_confounds' and 'test_reorder_img_mirror ' + until we have a fix. See: + https://github.com/nilearn/nilearn/issues/2608 + https://github.com/nilearn/nilearn/issues/2610 + +------------------------------------------------------------------- Old: ---- fix-test_save_cmap.patch nilearn-0.6.2.tar.gz update-numpy-warning.patch New: ---- nilearn-0.7.0.tar.gz nilearn-fix-aarch64.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-nilearn.spec ++++++ --- /var/tmp/diff_new_pack.n3EMgT/_old 2020-11-23 10:44:56.182269475 +0100 +++ /var/tmp/diff_new_pack.n3EMgT/_new 2020-11-23 10:44:56.186269478 +0100 @@ -19,17 +19,15 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-nilearn -Version: 0.6.2 +Version: 0.7.0 Release: 0 Summary: Statistical learning tool for neuroimaging License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/nilearn/nilearn -Source: https://files.pythonhosted.org/packages/source/n/nilearn/nilearn-%{version}.tar.gz -# PATCH-FIX-UPSTREAM - https://github.com/nilearn/nilearn/pull/2530 -Patch1: update-numpy-warning.patch -# PATCH-FIX-UPSTREAM - https://github.com/nilearn/nilearn/pull/2543 -Patch2: fix-test_save_cmap.patch +Source: https://github.com/nilearn/nilearn/archive/%{version}.tar.gz#/nilearn-%{version}.tar.gz +# PATCH-FIX-UPSTREAM - https://github.com/nilearn/nilearn/pull/2606 +Patch1: nilearn-fix-aarch64.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -37,6 +35,7 @@ Requires: python-matplotlib >= 2.0 Requires: python-nibabel >= 2.0.2 Requires: python-numpy >= 0.11 +Requires: python-requests Requires: python-scikit-learn >= 0.19 Requires: python-scipy >= 0.19 BuildArch: noarch @@ -45,8 +44,10 @@ BuildRequires: %{python_module matplotlib >= 2.0} BuildRequires: %{python_module nibabel >= 2.0.2} BuildRequires: %{python_module numpy >= 0.11} +BuildRequires: %{python_module pandas} BuildRequires: %{python_module pytest-xdist} BuildRequires: %{python_module pytest} +BuildRequires: %{python_module requests} BuildRequires: %{python_module scikit-learn >= 0.19} BuildRequires: %{python_module scipy >= 0.19} # /SECTION @@ -68,10 +69,14 @@ %python_expand %fdupes %{buildroot}%{$python_sitelib} %check +# Test try to build the doc and run examples... +rm -rf doc/ examples/ # Disable tests that require a network connection # Disable tests requiring to be executed without xdist (serialization issue): test_tikhonov_regularization_vs_graph_net or test_connectivity_measure_outputs or test_canica_square_img or test_with_globbing_patterns_with_single_subject or test_dict_learning # Disable tests failing with new numpy (conversions to float fail): test_plot_surf_stat_map test_plot_surf_roi -%pytest -n auto -k 'not (test_fetch_ or test_get_batch or test_scroll_server_results or test_simple_download or test_fill_html_template or test_temp_file_removing or test_view_img_on_surf or test_view_surf or test_resample_img_segmentation_fault or test_tikhonov_regularization_vs_graph_net or test_connectivity_measure_outputs or test_canica_square_img or test_with_globbing_patterns_with_single_subject or test_dict_learning or test_plot_surf_stat_map or test_plot_surf_roi)' +# https://github.com/nilearn/nilearn/issues/2608 - test_clean_confounds +# https://github.com/nilearn/nilearn/issues/2610 - test_reorder_img_mirror +%pytest -n auto -k 'not (test_fetch_ or test_get_batch or test_scroll_server_results or test_simple_download or test_fill_html_template or test_temp_file_removing or test_view_img_on_surf or test_view_surf or test_resample_img_segmentation_fault or test_tikhonov_regularization_vs_graph_net or test_connectivity_measure_outputs or test_canica_square_img or test_with_globbing_patterns_with_single_subject or test_dict_learning or test_plot_surf_stat_map or test_plot_surf_roi or test_clean_confounds or test_reorder_img_mirror)' %files %{python_files} %doc AUTHORS.rst README.rst ++++++ nilearn-0.6.2.tar.gz -> nilearn-0.7.0.tar.gz ++++++ ++++ 201866 lines of diff (skipped) ++++++ nilearn-fix-aarch64.patch ++++++ From 92ff7284c3e9ce921129d99ccb81f7a21572aa9f Mon Sep 17 00:00:00 2001 From: KamalakerDadi <dkamalakarre...@gmail.com> Date: Sat, 14 Nov 2020 05:15:53 +0100 Subject: [PATCH] FIX testing issues with nans and infs on ARM --- doc/whats_new.rst | 8 ++++++++ nilearn/input_data/tests/test_nifti_labels_masker.py | 5 +++-- nilearn/masking.py | 2 +- nilearn/regions/tests/test_region_extractor.py | 5 +++-- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/doc/whats_new.rst b/doc/whats_new.rst index d128ef5c0c..e2c6ce1b2e 100644 --- a/doc/whats_new.rst +++ b/doc/whats_new.rst @@ -1,3 +1,11 @@ +0.7.X +===== + +Fixes +----- + +- Fix testing issues on ARM machine. + .. _v0.7.0: 0.7.0 diff --git a/nilearn/input_data/tests/test_nifti_labels_masker.py b/nilearn/input_data/tests/test_nifti_labels_masker.py index 6324b10cf7..b61a89a1ff 100644 --- a/nilearn/input_data/tests/test_nifti_labels_masker.py +++ b/nilearn/input_data/tests/test_nifti_labels_masker.py @@ -117,8 +117,9 @@ def test_nifti_labels_masker_with_nans_and_infs(): labels_img = data_gen.generate_labeled_regions((13, 11, 12), affine=np.eye(4), n_regions=n_regions) - # nans - mask_data = get_data(mask_img) + # Introduce nans with data type float + # See issue: https://github.com/nilearn/nilearn/issues/2580 + mask_data = get_data(mask_img).astype(np.float32) mask_data[:, :, 7] = np.nan mask_data[:, :, 4] = np.inf mask_img = nibabel.Nifti1Image(mask_data, np.eye(4)) diff --git a/nilearn/masking.py b/nilearn/masking.py index c4c8ab36c3..a828e8a2e8 100644 --- a/nilearn/masking.py +++ b/nilearn/masking.py @@ -44,7 +44,7 @@ def _load_mask_img(mask_img, allow_empty=False): boolean version of the mask """ mask_img = _utils.check_niimg_3d(mask_img) - mask = get_data(mask_img) + mask = _safe_get_data(mask_img, ensure_finite=True) values = np.unique(mask) if len(values) == 1: diff --git a/nilearn/regions/tests/test_region_extractor.py b/nilearn/regions/tests/test_region_extractor.py index d8e8a9b56c..6600336134 100644 --- a/nilearn/regions/tests/test_region_extractor.py +++ b/nilearn/regions/tests/test_region_extractor.py @@ -355,14 +355,15 @@ def test_connected_label_regions(): # Test if unknown/negative integers are provided as labels in labels_img, # we raise an error and test the same whether error is raised. - labels_data = np.zeros(shape, dtype=np.int) + # Introduce data type of float, see issue: https://github.com/nilearn/nilearn/issues/2580 + labels_data = np.zeros(shape, dtype=np.float32) h0 = shape[0] // 2 h1 = shape[1] // 2 h2 = shape[2] // 2 labels_data[:h0, :h1, :h2] = 1 labels_data[:h0, :h1, h2:] = 2 labels_data[:h0, h1:, :h2] = 3 - labels_data[:h0, h1:, h2:] = 4 + labels_data[:h0, h1:, h2:] = -4 labels_data[h0:, :h1, :h2] = 5 labels_data[h0:, :h1, h2:] = 6 labels_data[h0:, h1:, :h2] = np.nan _______________________________________________ openSUSE Commits mailing list -- commit@lists.opensuse.org To unsubscribe, email commit-le...@lists.opensuse.org List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette List Archives: https://lists.opensuse.org/archives/list/commit@lists.opensuse.org