Hello community,
here is the log from the commit of package python-photutils for
openSUSE:Factory checked in at 2020-01-25 13:25:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-photutils (Old)
and /work/SRC/openSUSE:Factory/.python-photutils.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-photutils"
Sat Jan 25 13:25:11 2020 rev:5 rq:766975 version:0.7.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-photutils/python-photutils.changes
2019-12-27 13:49:23.540489234 +0100
+++
/work/SRC/openSUSE:Factory/.python-photutils.new.26092/python-photutils.changes
2020-01-25 13:25:15.516065438 +0100
@@ -1,0 +2,6 @@
+Fri Jan 24 17:09:13 UTC 2020 - Benjamin Greiner <[email protected]>
+
+- 0001-aperture-mask-test-assert-almost-equal.patch:
+ upstream PR#1014 to avoid occasionally failing builds
+
+-------------------------------------------------------------------
New:
----
0001-aperture-mask-test-assert-almost-equal.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-photutils.spec ++++++
--- /var/tmp/diff_new_pack.Qi5r9H/_old 2020-01-25 13:25:17.288066215 +0100
+++ /var/tmp/diff_new_pack.Qi5r9H/_new 2020-01-25 13:25:17.320066229 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-photutils
#
-# Copyright (c) 2019 SUSE LLC
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -26,6 +26,7 @@
Group: Productivity/Scientific/Astronomy
URL: https://github.com/astropy/photutils
Source:
https://files.pythonhosted.org/packages/source/p/photutils/photutils-%{version}.tar.gz
+Patch0: 0001-aperture-mask-test-assert-almost-equal.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module numpy-devel >= 1.13}
BuildRequires: %{python_module setuptools}
@@ -55,6 +56,7 @@
%prep
%setup -q -n photutils-%{version}
+%patch0 -p1
%build
export CFLAGS="%{optflags}"
++++++ 0001-aperture-mask-test-assert-almost-equal.patch ++++++
>From b3bd82e42a0bf6ae409d1dda701dd7f24962da67 Mon Sep 17 00:00:00 2001
From: Benjamin Greiner <[email protected]>
Date: Fri, 24 Jan 2020 17:38:01 +0100
Subject: [PATCH] aperture mask test: assert almost equal
---
photutils/aperture/tests/test_mask.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/photutils/aperture/tests/test_mask.py
b/photutils/aperture/tests/test_mask.py
index fb9bff9a..47f64bf7 100644
--- a/photutils/aperture/tests/test_mask.py
+++ b/photutils/aperture/tests/test_mask.py
@@ -5,7 +5,7 @@ Tests for the mask module.
import astropy.units as u
import numpy as np
-from numpy.testing import assert_allclose
+from numpy.testing import assert_allclose, assert_almost_equal
import pytest
from ..bounding_box import BoundingBox
@@ -110,7 +110,7 @@ def test_mask_multiply():
aper = CircularAperture((25, 25), r=radius)
mask = aper.to_mask()
data_weighted = mask.multiply(data)
- assert np.sum(data_weighted) == radius**2 * np.pi
+ assert_almost_equal(np.sum(data_weighted), radius**2 * np.pi)
# test that multiply() returns a copy
data[25, 25] = 100.
@@ -125,7 +125,7 @@ def test_mask_multiply_quantity():
data_weighted = mask.multiply(data)
assert data_weighted.unit == u.adu
- assert np.sum(data_weighted.value) == radius**2 * np.pi
+ assert_almost_equal(np.sum(data_weighted.value), radius**2 * np.pi)
# test that multiply() returns a copy
data[25, 25] = 100. * u.adu
--
2.25.0