Script 'mail_helper' called by obssrc
Hello community,

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

Package is "python-photutils"

Tue Jan 19 16:02:30 2021 rev:11 rq:864140 version:1.0.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-photutils/python-photutils.changes        
2020-09-25 16:37:41.924218639 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-photutils.new.28504/python-photutils.changes 
    2021-01-19 16:02:58.527450771 +0100
@@ -1,0 +2,6 @@
+Fri Jan 15 14:57:42 UTC 2021 - Benjamin Greiner <c...@bnavigator.de>
+
+- Add photutils-ease-background2d-tests.patch -- ease precision
+  tolerance in background 2D tests gh#astropy/photutils#1145 
+
+-------------------------------------------------------------------

New:
----
  photutils-ease-background2d-tests.patch

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

Other differences:
------------------
++++++ python-photutils.spec ++++++
--- /var/tmp/diff_new_pack.dWCgzS/_old  2021-01-19 16:02:59.351452010 +0100
+++ /var/tmp/diff_new_pack.dWCgzS/_new  2021-01-19 16:02:59.351452010 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-photutils
 #
-# 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
@@ -16,8 +16,9 @@
 #
 
 
-%define skip_python2 1
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%define skip_python2 1
+%define skip_python36 1
 Name:           python-photutils
 Version:        1.0.1
 Release:        0
@@ -26,6 +27,8 @@
 Group:          Productivity/Scientific/Astronomy
 URL:            https://github.com/astropy/photutils
 Source:         
https://files.pythonhosted.org/packages/source/p/photutils/photutils-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM photutils-ease-background2d-tests.patch -- work around 
gh#astropy/photutils#1145
+Patch0:         photutils-ease-background2d-tests.patch
 BuildRequires:  %{python_module Cython >= 0.29.14}
 BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module extension-helpers}
@@ -56,7 +59,7 @@
 and performing photometry of astronomical sources.
 
 %prep
-%setup -q -n photutils-%{version}
+%autosetup -p1 -n photutils-%{version}
 
 %build
 export CFLAGS="%{optflags}"

++++++ photutils-ease-background2d-tests.patch ++++++
Index: photutils-1.0.1/photutils/background/tests/test_background_2d.py
===================================================================
--- photutils-1.0.1.orig/photutils/background/tests/test_background_2d.py
+++ photutils-1.0.1/photutils/background/tests/test_background_2d.py
@@ -82,8 +82,8 @@ class TestBackground2D:
                           bkg_estimator=MeanBackground(), edge_method='crop')
         b2 = Background2D(DATA, (23, 22), filter_size=filter_size,
                           bkg_estimator=MeanBackground(), edge_method='pad')
-        assert_allclose(b1.background, b2.background)
-        assert_allclose(b1.background_rms, b2.background_rms)
+        assert_allclose(b1.background, b2.background, rtol=2e-5)
+        assert_allclose(b1.background_rms, b2.background_rms, rtol=2e-5)

     @pytest.mark.parametrize('box_size', ([(25, 25), (23, 22)]))
     def test_background_mask(self, box_size):
@@ -98,13 +98,13 @@ class TestBackground2D:
         mask[25:50, 25:50] = True
         b = Background2D(data, box_size, filter_size=(1, 1), mask=mask,
                          bkg_estimator=MeanBackground())
-        assert_allclose(b.background, DATA)
-        assert_allclose(b.background_rms, BKG_RMS)
+        assert_allclose(b.background, DATA, rtol=2e-5)
+        assert_allclose(b.background_rms, BKG_RMS, rtol=2e-5)

         # test edge crop with
         b2 = Background2D(data, box_size, filter_size=(1, 1), mask=mask,
                           bkg_estimator=MeanBackground(), edge_method='crop')
-        assert_allclose(b2.background, DATA)
+        assert_allclose(b2.background, DATA, rtol=2e-5)

     def test_mask(self):
         data = np.copy(DATA)
@@ -156,8 +156,8 @@ class TestBackground2D:
         """Test case where padding is added only on one axis."""

         b = Background2D(DATA, (25, 22), filter_size=(1, 1))
-        assert_allclose(b.background, DATA)
-        assert_allclose(b.background_rms, BKG_RMS)
+        assert_allclose(b.background, DATA, rtol=2e-5)
+        assert_allclose(b.background_rms, BKG_RMS, rtol=2e-5)
         assert b.background_median == 1.0
         assert b.background_rms_median == 0.0

Reply via email to