1
0

Accepting request 1124146 from devel:languages:python:numeric

OBS-URL: https://build.opensuse.org/request/show/1124146
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-astropy?expand=0&rev=47
This commit is contained in:
Ana Guerrero 2023-11-08 21:18:12 +00:00 committed by Git OBS Bridge
commit 5c12feec76
3 changed files with 35 additions and 0 deletions

View File

@ -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)

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Nov 8 01:37:46 UTC 2023 - Ben Greiner <code@bnavigator.de>
- 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 <code@bnavigator.de>

View File

@ -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}