Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-mizani for openSUSE:Factory 
checked in at 2021-02-19 23:43:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-mizani (Old)
 and      /work/SRC/openSUSE:Factory/.python-mizani.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-mizani"

Fri Feb 19 23:43:47 2021 rev:3 rq:873423 version:0.7.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-mizani/python-mizani.changes      
2020-07-10 15:31:01.210850437 +0200
+++ /work/SRC/openSUSE:Factory/.python-mizani.new.28504/python-mizani.changes   
2021-02-19 23:45:10.099357687 +0100
@@ -1,0 +2,10 @@
+Thu Feb 18 09:14:28 UTC 2021 - Ben Greiner <[email protected]>
+
+- Update to version 0.7.2
+  * Fixed bug in :func:`~mizani.bounds.rescale_max` to properly
+    handle values whose maximum is zero.
+- Skip python36 build: NumPy 1.20 in Tumbleweed dropped support
+  for Python 3.6 (NEP 29)
+- SciPy is not a runtime requirement
+
+-------------------------------------------------------------------

Old:
----
  mizani-0.7.1.tar.gz

New:
----
  mizani-0.7.2.tar.gz

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

Other differences:
------------------
++++++ python-mizani.spec ++++++
--- /var/tmp/diff_new_pack.s6fyoy/_old  2021-02-19 23:45:10.807358381 +0100
+++ /var/tmp/diff_new_pack.s6fyoy/_new  2021-02-19 23:45:10.811358385 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-mizani
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,8 +18,9 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define         skip_python2 1
+%define         skip_python36 1
 Name:           python-mizani
-Version:        0.7.1
+Version:        0.7.2
 Release:        0
 Summary:        Scales for Python
 License:        BSD-3-Clause
@@ -28,17 +29,16 @@
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
-Requires:       python-matplotlib
+Requires:       python-matplotlib >= 3.1.1
 Requires:       python-numpy
 Requires:       python-palettable
-Requires:       python-pandas >= 0.23.4
-Requires:       python-scipy
+Requires:       python-pandas >= 1.1.0
 BuildArch:      noarch
 # SECTION test requirements
-BuildRequires:  %{python_module matplotlib}
+BuildRequires:  %{python_module matplotlib >= 3.1.1}
 BuildRequires:  %{python_module numpy}
 BuildRequires:  %{python_module palettable}
-BuildRequires:  %{python_module pandas >= 0.23.4}
+BuildRequires:  %{python_module pandas >= 1.1.0}
 BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module scipy}
 # /SECTION

++++++ mizani-0.7.1.tar.gz -> mizani-0.7.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mizani-0.7.1/PKG-INFO new/mizani-0.7.2/PKG-INFO
--- old/mizani-0.7.1/PKG-INFO   2020-06-05 00:46:54.000000000 +0200
+++ new/mizani-0.7.2/PKG-INFO   2020-10-29 10:37:41.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: mizani
-Version: 0.7.1
+Version: 0.7.2
 Summary: Scales for Python
 Home-page: https://github.com/has2k1/mizani
 Maintainer: Hassan Kibirige
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mizani-0.7.1/mizani/_version.py 
new/mizani-0.7.2/mizani/_version.py
--- old/mizani-0.7.1/mizani/_version.py 2020-06-05 00:46:54.000000000 +0200
+++ new/mizani-0.7.2/mizani/_version.py 2020-10-29 10:37:41.000000000 +0100
@@ -8,11 +8,11 @@
 
 version_json = '''
 {
- "date": "2020-06-04T23:24:33+0300",
+ "date": "2020-10-29T12:19:27+0300",
  "dirty": false,
  "error": null,
- "full-revisionid": "e1eb9b2bd362f0462156a3b114585d1c037072ca",
- "version": "0.7.1"
+ "full-revisionid": "d8c8d0836c0a4f3123bf0875e5ff521843f5ea51",
+ "version": "0.7.2"
 }
 '''  # END VERSION_JSON
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mizani-0.7.1/mizani/bounds.py 
new/mizani-0.7.2/mizani/bounds.py
--- old/mizani-0.7.1/mizani/bounds.py   2020-06-03 21:48:57.000000000 +0200
+++ new/mizani-0.7.2/mizani/bounds.py   2020-10-28 20:56:23.000000000 +0100
@@ -24,7 +24,6 @@
 import numpy as np
 import pandas as pd
 import pandas.api.types as pdtypes
-import pandas.core.dtypes.common as com
 
 from matplotlib.dates import date2num
 
@@ -162,11 +161,18 @@
     array([ 0.,  4.,  8., 12., 16., 20.])
 
     If :python:`max(x) < _from[1]` then values will be
-    scaled beyond the requested (:python:`to[1]`) maximum.
+    scaled beyond the requested maximum (:python:`to[1]`).
 
     >>> rescale_max(x, to=(1, 3), _from=(-1, 6))
     array([0., 1., 2., 3., 4., 5.])
 
+    If the values are the same, they taken on the requested maximum.
+    This includes an array of all zeros.
+
+    >>> rescale_max([5, 5, 5])
+    array([1., 1., 1.])
+    >>> rescale_max([0, 0, 0])
+    array([1, 1, 1])
     """
     array_like = True
 
@@ -180,9 +186,14 @@
         x = np.asarray(x)
 
     if _from is None:
-        _from = np.array([np.min(x), np.max(x)])
+        _from = (np.min(x), np.max(x))
 
-    out = x/_from[1] * to[1]
+    if np.any(x < 0):
+        out = rescale(x, (0, to[1]), _from)
+    elif np.all(x == 0) and _from[1] == 0:
+        out = np.repeat(to[1], len(x))
+    else:
+        out = x/_from[1] * to[1]
 
     if not array_like:
         out = out[0]
@@ -327,7 +338,7 @@
     x_array = np.asarray(x)
     if pdtypes.is_number(x0) and not isinstance(x0, np.timedelta64):
         null = float('nan')
-    elif com.is_datetime_arraylike(x_array):
+    elif isinstance(x0, pd.Timestamp):
         null = pd.Timestamp('NaT')
     elif pdtypes.is_datetime64_dtype(x_array):
         null = np.datetime64('NaT')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mizani-0.7.1/mizani/tests/test_bounds.py 
new/mizani-0.7.2/mizani/tests/test_bounds.py
--- old/mizani-0.7.1/mizani/tests/test_bounds.py        2020-06-03 
21:48:57.000000000 +0200
+++ new/mizani-0.7.2/mizani/tests/test_bounds.py        2020-10-28 
20:56:23.000000000 +0100
@@ -5,6 +5,7 @@
 import pandas as pd
 import pandas.util.testing as pdt
 import pytest
+from pytest import approx
 
 from mizani.bounds import (censor, expand_range, rescale, rescale_max,
                            rescale_mid, squish_infinite, zero_range,
@@ -199,7 +200,7 @@
     diff(result) == diff(limits) + 30*one_day
 
     # timedelta64
-    one_day = np.timedelta64(1, unit='D')
+    one_day = np.timedelta64(1, 'D')
     limits = np.timedelta64(1, 'D'), np.timedelta64(10, 'D')
     result = expand_range(limits, add=one_day, zero_width=30*one_day)
     diff(result) == diff(limits) + 2*one_day
@@ -259,6 +260,13 @@
     result = rescale_max(s)
     assert s.index.equals(result.index)
 
+    x = [-5, -4, -3, -2, -1, 0]
+    result = rescale_max(x)
+    assert result == approx([0, 0.2, 0.4, 0.6, 0.8, 1.0])
+
+    result = rescale_max(x, to=(0, 5))
+    assert result == approx([0, 1, 2, 3, 4, 5])
+
 
 def test_rescale_mid():
     a = [1, 2, 3]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mizani-0.7.1/mizani/tests/test_breaks.py 
new/mizani-0.7.2/mizani/tests/test_breaks.py
--- old/mizani-0.7.1/mizani/tests/test_breaks.py        2020-06-04 
13:23:00.000000000 +0200
+++ new/mizani-0.7.2/mizani/tests/test_breaks.py        2020-10-28 
20:56:23.000000000 +0100
@@ -242,7 +242,7 @@
         minutes, [0, 2, 4, 6, 8])
 
     # numpy
-    x = [np.timedelta64(i*10, unit='D') for i in range(1, 10)]
+    x = [np.timedelta64(i*10, 'D') for i in range(1, 10)]
     limits = min(x), max(x)
     with pytest.raises(ValueError):
         breaks(limits)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mizani-0.7.1/mizani/utils.py 
new/mizani-0.7.2/mizani/utils.py
--- old/mizani-0.7.1/mizani/utils.py    2020-06-04 13:23:00.000000000 +0200
+++ new/mizani-0.7.2/mizani/utils.py    2020-10-28 15:51:46.000000000 +0100
@@ -221,7 +221,7 @@
     for t in types:
         types[t] = np.sort(types[t])
 
-    return list(chain(*(types[t] for t in types)))
+    return list(chain.from_iterable(types[t] for t in types))
 
 
 def same_log10_order_of_magnitude(x, delta=0.1):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mizani-0.7.1/mizani.egg-info/PKG-INFO 
new/mizani-0.7.2/mizani.egg-info/PKG-INFO
--- old/mizani-0.7.1/mizani.egg-info/PKG-INFO   2020-06-05 00:46:53.000000000 
+0200
+++ new/mizani-0.7.2/mizani.egg-info/PKG-INFO   2020-10-29 10:37:41.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: mizani
-Version: 0.7.1
+Version: 0.7.2
 Summary: Scales for Python
 Home-page: https://github.com/has2k1/mizani
 Maintainer: Hassan Kibirige
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mizani-0.7.1/mizani.egg-info/requires.txt 
new/mizani-0.7.2/mizani.egg-info/requires.txt
--- old/mizani-0.7.1/mizani.egg-info/requires.txt       2020-06-05 
00:46:53.000000000 +0200
+++ new/mizani-0.7.2/mizani.egg-info/requires.txt       2020-10-29 
10:37:41.000000000 +0100
@@ -1,4 +1,4 @@
 numpy
-pandas>=1.0.0
+pandas>=1.1.0
 matplotlib>=3.1.1
 palettable
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mizani-0.7.1/setup.py new/mizani-0.7.2/setup.py
--- old/mizani-0.7.1/setup.py   2020-06-03 21:48:57.000000000 +0200
+++ new/mizani-0.7.2/setup.py   2020-10-28 20:56:23.000000000 +0100
@@ -37,7 +37,7 @@
     Plus any version tests and warnings
     """
     install_requires = ['numpy',
-                        'pandas >= 1.0.0',
+                        'pandas >= 1.1.0',
                         'matplotlib >= 3.1.1',
                         'palettable']
     return install_requires

Reply via email to