Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-fabio for openSUSE:Factory 
checked in at 2022-06-15 00:33:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-fabio (Old)
 and      /work/SRC/openSUSE:Factory/.python-fabio.new.1548 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-fabio"

Wed Jun 15 00:33:06 2022 rev:4 rq:982582 version:0.14.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-fabio/python-fabio.changes        
2022-04-21 15:48:57.344335276 +0200
+++ /work/SRC/openSUSE:Factory/.python-fabio.new.1548/python-fabio.changes      
2022-06-15 00:34:02.458680046 +0200
@@ -1,0 +2,12 @@
+Fri Jun 10 19:19:12 UTC 2022 - Yogalakshmi Arunachalam <yarunacha...@suse.com>
+
+- Update to 0.14.0: 
+  * fix infinite loop when iterating over lima/eiger image files (#468)
+  * fix typo when saving in pilatus/CBF format (#471)
+  * fix noisy test on densification (#440)
+  * limit version of setuptools (related to the PEP517 and associated 
regressions)
+  * Change logo in documentation
+  * Support for Python versions 3.6 to 3.10, tested on amd64, ppc64le and arm64
+  * Linux is officially the main platform, Windows and MacOS are supported in 
best effort mode.
+
+-------------------------------------------------------------------

Old:
----
  fabio-0.13.0.tar.gz

New:
----
  fabio-0.14.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-fabio.spec ++++++
--- /var/tmp/diff_new_pack.fHMPBM/_old  2022-06-15 00:34:03.330681327 +0200
+++ /var/tmp/diff_new_pack.fHMPBM/_new  2022-06-15 00:34:03.334681332 +0200
@@ -20,7 +20,7 @@
 %define skip_python2 1
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-fabio
-Version:        0.13.0
+Version:        0.14.0
 Release:        0
 Summary:        Image IO for images produced by 2D X-ray detectors
 License:        BSD-3-Clause AND GPL-2.0-or-later AND LGPL-3.0-or-later AND MIT

++++++ fabio-0.13.0.tar.gz -> fabio-0.14.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fabio-0.13.0/.github/workflows/python-package.yml 
new/fabio-0.14.0/.github/workflows/python-package.yml
--- old/fabio-0.13.0/.github/workflows/python-package.yml       2022-01-14 
09:57:50.000000000 +0100
+++ new/fabio-0.14.0/.github/workflows/python-package.yml       2022-06-02 
16:10:13.000000000 +0200
@@ -15,7 +15,7 @@
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        python-version: ['3.6', '3.7', '3.8', '3.9']
+        python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
 
     steps:
     - uses: actions/checkout@v2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fabio-0.13.0/doc/source/Changelog.rst 
new/fabio-0.14.0/doc/source/Changelog.rst
--- old/fabio-0.13.0/doc/source/Changelog.rst   2022-01-14 09:57:50.000000000 
+0100
+++ new/fabio-0.14.0/doc/source/Changelog.rst   2022-06-02 16:10:13.000000000 
+0200
@@ -1,6 +1,16 @@
 Changelog
 =========
 
+FabIO-0.14.0 (06/2022):
+.......................
+- fix infinite loop when iterating over lima/eiger image files (#468) 
+- fix typo when saving in pilatus/CBF format (#471)
+- fix noisy test on densification (#440)
+- limit version of setuptools (related to the PEP517 and associated 
regressions)
+- Change logo in documentation
+- Support for Python versions 3.6 to 3.10, tested on amd64, ppc64le and arm64
+- Linux is officially the main platform, Windows and MacOS are supported in 
best effort mode.
+
 FabIO-0.13.0 (01/2022):
 .......................
 - Allow files to be larger than 2GB (Thanks Wout)
Binary files old/fabio-0.13.0/doc/source/img/logo.png and 
new/fabio-0.14.0/doc/source/img/logo.png differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fabio-0.13.0/fabio/cbfimage.py 
new/fabio-0.14.0/fabio/cbfimage.py
--- old/fabio-0.13.0/fabio/cbfimage.py  2022-01-14 09:57:50.000000000 +0100
+++ new/fabio-0.14.0/fabio/cbfimage.py  2022-06-02 16:10:13.000000000 +0200
@@ -2,7 +2,7 @@
 #
 #    Project: FabIO X-ray image reader
 #
-#    Copyright (C) 2010-2020 European Synchrotron Radiation Facility
+#    Copyright (C) 2010-2022 European Synchrotron Radiation Facility
 #                       Grenoble, France
 #
 # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -326,7 +326,7 @@
                 nonCifHeaders.append("%s %s" % (key, self.header[key]))
         if self.pilatus_headers is not None:
             # regenerate  the Pilatus header and set the convention
-            self.cif["_array_data.header_content"] = str(self.pilatus_headers)
+            self.cif["_array_data.header_contents"] = str(self.pilatus_headers)
             self.cif["_array_data.header_convention"] = "PILATUS_1.2"
 
         if len(nonCifHeaders) > 0:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fabio-0.13.0/fabio/edfimage.py 
new/fabio-0.14.0/fabio/edfimage.py
--- old/fabio-0.13.0/fabio/edfimage.py  2022-01-14 09:57:50.000000000 +0100
+++ new/fabio-0.14.0/fabio/edfimage.py  2022-06-02 16:10:13.000000000 +0200
@@ -45,6 +45,11 @@
 
 
 """
+__authors__ = ["J??r??me Kieffer", "Jon Wright", "Henning O. Sorensen", "Erik 
Knudsen"]
+__contact__ = "jerome.kief...@esrf.fr"
+__license__ = "MIT"
+__copyright__ = "ESRF"
+__date__ = "01/06/2022"
 
 import os
 import re
@@ -1214,45 +1219,45 @@
 
     def getframe(self, num):
         """ returns the file numbered 'num' in the series as a FabioImage """
-        newImage = None
+        new_image = None
         if self.nframes == 1:
             logger.debug("Single frame EDF; having FabioImage default 
behavior: %s" % num)
-            newImage = fabioimage.FabioImage.getframe(self, num)
-            newImage._file = self._file
+            new_image = fabioimage.FabioImage.getframe(self, num)
+            new_image._file = self._file
         elif num < self.nframes:
             logger.debug("Multi frame EDF; having EdfImage specific behavior 
frame %s: 0<=frame<%s" %
                          (num, self.nframes))
-            newImage = self.__class__(frames=self._frames)
-            newImage.currentframe = num
-            newImage.filename = self.filename
-            newImage._file = self._file
+            new_image = self.__class__(frames=self._frames)
+            new_image.currentframe = num
+            new_image.filename = self.filename
+            new_image._file = self._file
         else:
             raise IOError("EdfImage.getframe: Cannot access frame %s: 
0<=frame<%s" %
                           (num, self.nframes))
-        return newImage
+        return new_image
 
     def previous(self):
         """ returns the previous file in the series as a FabioImage """
-        newImage = None
+        new_image = None
         if self.nframes == 1:
-            newImage = fabioimage.FabioImage.previous(self)
+            new_image = fabioimage.FabioImage.previous(self)
         else:
-            newFrameId = self.currentframe - 1
-            newImage = self.getframe(newFrameId)
-        return newImage
+            new_idx = self.currentframe - 1
+            new_image = self.getframe(new_idx)
+        return new_image
 
     def next(self):
         """Returns the next file in the series as a fabioimage
 
         :raise IOError: When there is no next file or image in the series.
         """
-        newImage = None
+        new_image = None
         if self.nframes == 1:
-            newImage = fabioimage.FabioImage.next(self)
+            new_image = fabioimage.FabioImage.next(self)
         else:
-            newFrameId = self.currentframe + 1
-            newImage = self.getframe(newFrameId)
-        return newImage
+            new_idx = self.currentframe + 1
+            new_image = self.getframe(new_idx)
+        return new_image
 
     def write(self, fname, force_type=None, fit2dMode=False):
         """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fabio-0.13.0/fabio/eigerimage.py 
new/fabio-0.14.0/fabio/eigerimage.py
--- old/fabio-0.13.0/fabio/eigerimage.py        2022-01-14 09:57:50.000000000 
+0100
+++ new/fabio-0.14.0/fabio/eigerimage.py        2022-06-02 16:10:13.000000000 
+0200
@@ -45,7 +45,7 @@
 __contact__ = "jerome.kief...@esrf.fr"
 __license__ = "MIT"
 __copyright__ = "ESRF"
-__date__ = "10/05/2021"
+__date__ = "01/06/2022"
 
 import logging
 logger = logging.getLogger(__name__)
@@ -226,18 +226,33 @@
                 new_img._nframes = self.nframes
                 new_img.currentframe = num
             else:
-                raise IOError("getframe %s out of range [%s %s[" % (num, 0, 
self.nframes))
+                raise IOError(f"getframe {num} out of range [0 
{self.nframes}[")
         else:
             new_img = FabioImage.getframe(self, num)
         return new_img
 
     def previous(self):
-        """ returns the previous frame in the series as a fabioimage """
-        return self.getframe(self.currentframe - 1)
+        """ returns the previous file in the series as a FabioImage """
+        new_image = None
+        if self.nframes == 1:
+            new_image = FabioImage.previous(self)
+        else:
+            new_idx = self.currentframe - 1
+            new_image = self.getframe(new_idx)
+        return new_image
 
     def next(self):
-        """ returns the next frame in the series as a fabioimage """
-        return self.getframe(self.currentframe + 1)
+        """Returns the next file in the series as a fabioimage
+
+        :raise IOError: When there is no next file or image in the series.
+        """
+        new_image = None
+        if self.nframes == 1:
+            new_image = FabioImage.next(self)
+        else:
+            new_idx = self.currentframe + 1
+            new_image = self.getframe(new_idx)
+        return new_image
 
     def close(self):
         if self.h5 is not None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fabio-0.13.0/fabio/ext/dense.pyx 
new/fabio-0.14.0/fabio/ext/dense.pyx
--- old/fabio-0.13.0/fabio/ext/dense.pyx        2022-01-14 09:57:50.000000000 
+0100
+++ new/fabio-0.14.0/fabio/ext/dense.pyx        2022-06-02 16:10:13.000000000 
+0200
@@ -31,7 +31,7 @@
 """Densification of sparse frame format
 """
 __author__ = "J??r??me Kieffer"
-__date__ = "10/05/2021"  
+__date__ = "02/06/2022"  
 __contact__ = "jerome.kief...@esrf.fr"
 __license__ = "MIT"
 
@@ -44,7 +44,7 @@
                          int64_t, uint64_t
 from libc.math cimport isfinite, log, sqrt, cos, M_PI                         
 from libc.stdlib cimport RAND_MAX
-cimport cython             
+cimport cython
                
 ctypedef fused any_t:
     double
@@ -221,15 +221,16 @@
     return numpy.asarray(ary).reshape(shape)        
 
 
-def densify(float[:,::1] mask,
-            float[::1] radius,
+def densify(cython.floating[:,::1] mask,
+            cython.floating[::1] radius,
             uint32_t[::1] index,
             any_t[::1] intensity,
             any_t dummy,
             dtype,
             float[::1] background,
             float[::1] background_std=None,
-            normalization=None):
+            normalization=None,
+            seed = None):
     """
     Densify a sparse representation to generate a normal frame 
     
@@ -241,7 +242,8 @@
     :param dummy: numerical value for masked-out pixels in dense image
     :param dtype: dtype of intensity.
     :param background_std: 1D array with the background std at given distance 
from the center --> activates the noisy mode.
-    :param 
+    :param normalization: normalization array: renormalize all data with this 
factor (pixel-wise)
+    :param seed: seed for the random number-generator, used only when 
regenerating noisy background
     :return: dense frame as 2D array
     """
     cdef:
@@ -267,15 +269,16 @@
         noisy = False
     else:
         noisy=True
-        try:
-            value = time.time_ns()
-        except Exception:
-            value = int(time.time()*1e9)
-        mt = MT(value)
+        if seed is None:
+            try:
+                seed = time.time_ns()
+            except Exception:
+                seed = int(time.time()*1e9)
+        mt = MT(seed)
                 
     with nogil:
         start = radius[0]
-        idelta = (size - 1)/(radius[size-1] - start)  
+        idelta = <double>(size - 1)/(radius[size-1] - start)  
         
         #Linear interpolation
         for i in range(height):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fabio-0.13.0/fabio/limaimage.py 
new/fabio-0.14.0/fabio/limaimage.py
--- old/fabio-0.13.0/fabio/limaimage.py 2022-01-14 09:57:50.000000000 +0100
+++ new/fabio-0.14.0/fabio/limaimage.py 2022-06-02 16:10:13.000000000 +0200
@@ -33,7 +33,7 @@
 __contact__ = "jerome.kief...@esrf.fr"
 __license__ = "MIT"
 __copyright__ = "ESRF"
-__date__ = "07/05/2021"
+__date__ = "01/06/2022"
 
 import logging
 logger = logging.getLogger(__name__)
@@ -194,18 +194,33 @@
                 new_img._nframes = self.nframes
                 new_img.currentframe = num
             else:
-                raise IOError("getframe %s out of range [%s %s[" % (num, 0, 
self.nframes))
+                raise IOError(f"getframe({num}) out of range [0, 
{self.nframes}[")
         else:
             new_img = FabioImage.getframe(self, num)
         return new_img
 
     def previous(self):
-        """ returns the previous frame in the series as a fabioimage """
-        return self.getframe(self.currentframe - 1)
+        """ returns the previous file in the series as a FabioImage """
+        new_image = None
+        if self.nframes == 1:
+            new_image = FabioImage.previous(self)
+        else:
+            new_idx = self.currentframe - 1
+            new_image = self.getframe(new_idx)
+        return new_image
 
     def next(self):
-        """ returns the next frame in the series as a fabioimage """
-        return self.getframe(self.currentframe + 1)
+        """Returns the next file in the series as a fabioimage
+
+        :raise IOError: When there is no next file or image in the series.
+        """
+        new_image = None
+        if self.nframes == 1:
+            new_image = FabioImage.next(self)
+        else:
+            new_idx = self.currentframe + 1
+            new_image = self.getframe(new_idx)
+        return new_image
 
     def close(self):
         if self.h5 is not None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fabio-0.13.0/fabio/sparseimage.py 
new/fabio-0.14.0/fabio/sparseimage.py
--- old/fabio-0.13.0/fabio/sparseimage.py       2022-01-14 09:57:50.000000000 
+0100
+++ new/fabio-0.14.0/fabio/sparseimage.py       2022-06-02 16:10:13.000000000 
+0200
@@ -37,7 +37,7 @@
 __contact__ = "jerome.kief...@esrf.fr"
 __license__ = "MIT"
 __copyright__ = "2020 ESRF"
-__date__ = "10/05/2021"
+__date__ = "02/06/2022"
 
 import logging
 logger = logging.getLogger(__name__)
@@ -66,7 +66,8 @@
             dummy,
             background,
             background_std=None,
-            normalization=None):
+            normalization=None,
+            seed=None):
     """Generate a dense image of its sparse representation
     
     :param mask: 2D array with NaNs for mask and pixel radius for the valid 
pixels
@@ -82,6 +83,8 @@
     """
     dense = numpy.interp(mask, radius, background)
     if background_std is not None:
+        if seed is not None:
+            numpy.random.seed(seed)
         std = numpy.interp(mask, radius, background_std)
         numpy.maximum(0.0, numpy.random.normal(dense, std), out=dense)
     if normalization is not None:
@@ -91,7 +94,8 @@
     flat[index] = intensity
     dtype = intensity.dtype
     if numpy.issubdtype(dtype, numpy.integer):
-        dense = numpy.round(dense)
+        #dense = numpy.round(dense) # Foolded by banker's rounding !!!!
+        dense += 0.5
     dense = numpy.ascontiguousarray(dense, dtype=dtype)
     dense[numpy.logical_not(numpy.isfinite(mask))] = dummy
     return dense
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fabio-0.13.0/fabio/test/test_densification.py 
new/fabio-0.14.0/fabio/test/test_densification.py
--- old/fabio-0.13.0/fabio/test/test_densification.py   2022-01-14 
09:57:50.000000000 +0100
+++ new/fabio-0.14.0/fabio/test/test_densification.py   2022-06-02 
16:10:13.000000000 +0200
@@ -32,7 +32,7 @@
 __contact__ = "jerome.kief...@esrf.fr"
 __license__ = "MIT"
 __copyright__ = "2020 ESRF"
-__date__ = "28/04/2021"
+__date__ = "02/06/2022"
 
 import unittest
 import numpy
@@ -66,13 +66,15 @@
         self.assertAlmostEqual(N.std(), sigma, 1)
 
     def test_cython(self):
+        seed = 0 
         shape = 256, 256
         nframes = 8
         vsize = 181  # This is cheated to avoid interpolation issues with 
rounding 128*sqrt(2)
         y, x = numpy.ogrid[-shape[0] // 2:-shape[0] // 2 + shape[0],
                           -shape[1] // 2:-shape[1] // 2 + shape[1]]
-        r2d = numpy.sqrt(x * x + y * y).astype(numpy.float32)
-        radius = numpy.linspace(0, r2d.max(), vsize).astype(numpy.float32)
+        # To make this test "robust", those two radial position arrays needs 
to be in float64 ... in production float32 is more common 
+        r2d = numpy.sqrt(x * x + y * y).astype(numpy.float64)
+        radius = numpy.linspace(0, r2d.max(), vsize).astype(numpy.float64)
         npeak = numpy.random.randint(90, 110, size=nframes)
         scale = numpy.random.randint(90, 110, size=nframes)
         osc = numpy.random.randint(40, 100, size=nframes)
@@ -92,6 +94,7 @@
             f.ravel()[index[indptr[i]:indptr[i + 1]]] = 
intensity[indptr[i]:indptr[i + 1]]
             python = densify(r2d, radius, index[indptr[i]:indptr[i + 1]], 
intensity[indptr[i]:indptr[i + 1]], 0, background[i])
             cython = cython_densify.densify(r2d, radius, 
index[indptr[i]:indptr[i + 1]], intensity[indptr[i]:indptr[i + 1]], 0, 
intensity.dtype, background[i], None)
+            
             self.assertTrue(numpy.all(python == cython), "python == cython #" 
+ str(i))
             # Rounding errors:
             delta = (python.astype(int) - f)
@@ -101,8 +104,8 @@
             self.assertLess(len(bad[0]), numpy.prod(shape) / 500, "python 
differs from reference on less then 0.2% of the pixel #" + str(i))
 
             # Now consider the noise ...
-            python = densify(r2d, radius, index[indptr[i]:indptr[i + 1]], 
intensity[indptr[i]:indptr[i + 1]], 0, background[i], noise[i])
-            cython = cython_densify.densify(r2d, radius, 
index[indptr[i]:indptr[i + 1]], intensity[indptr[i]:indptr[i + 1]], 0, 
intensity.dtype, background[i], noise[i])
+            python = densify(r2d, radius, index[indptr[i]:indptr[i + 1]], 
intensity[indptr[i]:indptr[i + 1]], 0, background[i], noise[i], seed=seed)
+            cython = cython_densify.densify(r2d, radius, 
index[indptr[i]:indptr[i + 1]], intensity[indptr[i]:indptr[i + 1]], 0, 
intensity.dtype, background[i], noise[i], seed=seed)
             self.assertTrue(abs(python.astype(int) - cython).max() <= 2 * 
max(1, noise[i].max()), "python is close to cython #" + str(i))
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fabio-0.13.0/requirements.txt 
new/fabio-0.14.0/requirements.txt
--- old/fabio-0.13.0/requirements.txt   2022-01-14 09:57:50.000000000 +0100
+++ new/fabio-0.14.0/requirements.txt   2022-06-02 16:10:13.000000000 +0200
@@ -1,4 +1,5 @@
 #List of dependecies used by PIP but also by ReadTheDocs to generate the 
documentation on the fly
+setuptools<60
 numpy
 cython
 lxml>=4.6.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fabio-0.13.0/setup.py new/fabio-0.14.0/setup.py
--- old/fabio-0.13.0/setup.py   2022-01-14 09:57:50.000000000 +0100
+++ new/fabio-0.14.0/setup.py   2022-06-02 16:10:13.000000000 +0200
@@ -30,7 +30,7 @@
 __contact__ = "jerome.kief...@esrf.eu"
 __license__ = "MIT"
 __copyright__ = "European Synchrotron Radiation Facility, Grenoble, France"
-__date__ = "29/04/2021"
+__date__ = "02/06/2022"
 __status__ = "stable"
 
 import sys
@@ -1069,7 +1069,7 @@
                         entry_points=entry_points,
                         test_suite="test",
                         license="MIT",
-                        python_requires='>=3.5',
+                        python_requires='>=3.6',
                         )
     return setup_kwargs
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fabio-0.13.0/version.py new/fabio-0.14.0/version.py
--- old/fabio-0.13.0/version.py 2022-01-14 09:57:50.000000000 +0100
+++ new/fabio-0.14.0/version.py 2022-06-02 16:10:13.000000000 +0200
@@ -58,7 +58,7 @@
 __contact__ = "jerome.kief...@esrf.eu"
 __license__ = "MIT"
 __copyright__ = "European Synchrotron Radiation Facility, Grenoble, France"
-__date__ = "14/01/2022"
+__date__ = "02/06/2022"
 __status__ = "production"
 __docformat__ = 'restructuredtext'
 __all__ = ["date", "version_info", "strictversion", "hexversion", 
"debianversion",
@@ -76,7 +76,7 @@
                               "candidate": "rc"}
 
 MAJOR = 0
-MINOR = 13
+MINOR = 14
 MICRO = 0
 RELEV = "final"  # <16
 SERIAL = 0  # <16

Reply via email to