From 26a13db1b8de2c5a0c19078c0b0a540e6d486f13df9debba570ebfe4094e18aa Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Wed, 8 Nov 2023 01:55:18 +0000 Subject: [PATCH] Accepting request 1124145 from home:bnavigator:branches:devel:languages:python:numeric - Add astropy-pr15479-pvstar.patch * PR gh#astropy/astropy#15479 backports gh#astropy/astropy#15476 * Issue at gh#astropy/astropy#15537 OBS-URL: https://build.opensuse.org/request/show/1124145 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-astropy?expand=0&rev=106 --- astropy-pr15479-pvstar.patch | 26 ++++++++++++++++++++++++++ python-astropy.changes | 7 +++++++ python-astropy.spec | 2 ++ 3 files changed, 35 insertions(+) create mode 100644 astropy-pr15479-pvstar.patch diff --git a/astropy-pr15479-pvstar.patch b/astropy-pr15479-pvstar.patch new file mode 100644 index 0000000..97dd3ae --- /dev/null +++ b/astropy-pr15479-pvstar.patch @@ -0,0 +1,26 @@ +From c15ad2fcd21182787eb7db2195bfc70690efca2e Mon Sep 17 00:00:00 2001 +From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> +Date: Fri, 13 Oct 2023 14:40:52 -0400 +Subject: [PATCH] Backport PR #15476: Account for SOFA/ERFA bugfix in pvstar + +--- + astropy/units/tests/test_structured_erfa_ufuncs.py | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/astropy/units/tests/test_structured_erfa_ufuncs.py b/astropy/units/tests/test_structured_erfa_ufuncs.py +index 729f9539c7e..42589397a19 100644 +--- a/astropy/units/tests/test_structured_erfa_ufuncs.py ++++ b/astropy/units/tests/test_structured_erfa_ufuncs.py +@@ -139,7 +139,11 @@ def test_pvstar(self): + assert px.unit == u.arcsec + assert_quantity_allclose(px, 1 * u.radian) + assert rv.unit == u.km / u.s +- assert_array_equal(rv.value, np.zeros(self.pv.shape)) ++ # RV is non-zero because proper motion induces a small redshift ++ # due to second order Doppler shift. ++ assert_quantity_allclose( ++ rv, np.zeros(self.pv.shape) << (u.km / u.s), atol=1 * u.m / u.s ++ ) + + def test_starpv(self): + ra, dec, pmr, pmd, px, rv, stat = erfa_ufunc.pvstar(self.pv) diff --git a/python-astropy.changes b/python-astropy.changes index 0c474a9..8b8f763 100644 --- a/python-astropy.changes +++ b/python-astropy.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Nov 8 01:37:46 UTC 2023 - Ben Greiner + +- Add astropy-pr15479-pvstar.patch + * PR gh#astropy/astropy#15479 backports gh#astropy/astropy#15476 + * Issue at gh#astropy/astropy#15537 + ------------------------------------------------------------------- Fri Oct 6 08:19:42 UTC 2023 - Ben Greiner diff --git a/python-astropy.spec b/python-astropy.spec index f61099e..e3f5bba 100644 --- a/python-astropy.spec +++ b/python-astropy.spec @@ -58,6 +58,8 @@ Source: https://files.pythonhosted.org/packages/source/a/astropy/astropy # Mark wcs headers as false positives for devel-file-in-non-devel-package # These are used by the python files so they must be available. Source100: python-astropy-rpmlintrc +# PATCH-FIX-UPSTREAM astropy-pr15479-pvstar.patch gh#astropy/astropy#15479 gh#astropy/astropy#15476 gh#astropy/astropy#15537 +Patch0: https://github.com/astropy/astropy/pull/15479.patch#/astropy-pr15479-pvstar.patch # https://docs.astropy.org/en/v5.3/install.html#requirements BuildRequires: %{python_module Cython >= 0.29.36 with %python-Cython < 3} BuildRequires: %{python_module Jinja2}