Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-astropy-healpix for openSUSE:Factory checked in at 2023-12-28 23:01:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-astropy-healpix (Old) and /work/SRC/openSUSE:Factory/.python-astropy-healpix.new.28375 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-astropy-healpix" Thu Dec 28 23:01:18 2023 rev:5 rq:1135247 version:1.0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-astropy-healpix/python-astropy-healpix.changes 2023-12-02 17:13:51.778865052 +0100 +++ /work/SRC/openSUSE:Factory/.python-astropy-healpix.new.28375/python-astropy-healpix.changes 2023-12-28 23:02:56.925699628 +0100 @@ -1,0 +2,7 @@ +Wed Dec 27 09:35:18 UTC 2023 - Dirk Müller <dmuel...@suse.com> + +- update to 1.0.2: + * lonlat_to_healpix now correctly returns -1 if the longitude + or latitude is NaN or infinite. [#208] + +------------------------------------------------------------------- Old: ---- astropy_healpix-1.0.1.tar.gz New: ---- astropy_healpix-1.0.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-astropy-healpix.spec ++++++ --- /var/tmp/diff_new_pack.W0wVpm/_old 2023-12-28 23:02:57.501720680 +0100 +++ /var/tmp/diff_new_pack.W0wVpm/_new 2023-12-28 23:02:57.505720826 +0100 @@ -17,7 +17,7 @@ Name: python-astropy-healpix -Version: 1.0.1 +Version: 1.0.2 Release: 0 Summary: HEALPix for Astropy License: BSD-3-Clause ++++++ astropy_healpix-1.0.1.tar.gz -> astropy_healpix-1.0.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astropy_healpix-1.0.1/.github/workflows/ci_cron_weekly.yml new/astropy_healpix-1.0.2/.github/workflows/ci_cron_weekly.yml --- old/astropy_healpix-1.0.1/.github/workflows/ci_cron_weekly.yml 2023-11-28 18:07:08.000000000 +0100 +++ new/astropy_healpix-1.0.2/.github/workflows/ci_cron_weekly.yml 2023-12-12 16:43:05.000000000 +0100 @@ -15,7 +15,7 @@ steps: - uses: actions/checkout@v4 - name: Set up Python to build docs with sphinx - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.9 - name: Install base dependencies diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astropy_healpix-1.0.1/.github/workflows/ci_tests.yml new/astropy_healpix-1.0.2/.github/workflows/ci_tests.yml --- old/astropy_healpix-1.0.1/.github/workflows/ci_tests.yml 2023-11-28 18:07:08.000000000 +0100 +++ new/astropy_healpix-1.0.2/.github/workflows/ci_tests.yml 2023-12-12 16:43:05.000000000 +0100 @@ -73,7 +73,7 @@ with: fetch-depth: 0 - name: Set up Python ${{ matrix.python }} on ${{ matrix.os }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} - name: Install base dependencies diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astropy_healpix-1.0.1/CHANGES.rst new/astropy_healpix-1.0.2/CHANGES.rst --- old/astropy_healpix-1.0.1/CHANGES.rst 2023-11-28 18:07:08.000000000 +0100 +++ new/astropy_healpix-1.0.2/CHANGES.rst 2023-12-12 16:43:05.000000000 +0100 @@ -4,6 +4,12 @@ Changes ******* +1.0.2 (2023-12-12) +================== + +- lonlat_to_healpix now correctly returns -1 if the longitude or latitude is + NaN or infinite. [#208] + 1.0.1 (2023-11-28) ================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astropy_healpix-1.0.1/PKG-INFO new/astropy_healpix-1.0.2/PKG-INFO --- old/astropy_healpix-1.0.1/PKG-INFO 2023-11-28 18:07:31.105450600 +0100 +++ new/astropy_healpix-1.0.2/PKG-INFO 2023-12-12 16:43:26.704017600 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: astropy_healpix -Version: 1.0.1 +Version: 1.0.2 Summary: BSD-licensed HEALPix for Astropy Home-page: https://github.com/astropy/astropy-healpix Author: Astropy Developers diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astropy_healpix-1.0.1/astropy_healpix/_core.c new/astropy_healpix-1.0.2/astropy_healpix/_core.c --- old/astropy_healpix-1.0.1/astropy_healpix/_core.c 2023-11-28 18:07:08.000000000 +0100 +++ new/astropy_healpix-1.0.2/astropy_healpix/_core.c 2023-12-12 16:43:05.000000000 +0100 @@ -1,4 +1,5 @@ #include <Python.h> +#include <math.h> #include <numpy/arrayobject.h> #include <numpy/ufuncobject.h> #include "healpix.h" @@ -114,7 +115,8 @@ double *dy = (double *) &args[5][i * steps[5]]; int64_t xy = INVALID_INDEX; - xy = radec_to_healpixlf(lon, lat, nside, dx, dy); + if (isfinite(lon) && isfinite(lat)) + xy = radec_to_healpixlf(lon, lat, nside, dx, dy); if (xy >= 0) *pixel = funcs->xy_to_order(xy, nside); else { @@ -174,13 +176,15 @@ double *dy = (double *) &args[6][i * steps[6]]; int64_t xy = INVALID_INDEX; - /* xyztohealpixlf expects a unit vector */ - double norm = sqrt(x*x + y*y + z*z); - x /= norm; - y /= norm; - z /= norm; + if (isfinite(x) && isfinite(y) && isfinite(z)) { + /* xyztohealpixlf expects a unit vector */ + double norm = sqrt(x*x + y*y + z*z); + x /= norm; + y /= norm; + z /= norm; - xy = xyztohealpixlf(x, y, z, nside, dx, dy); + xy = xyztohealpixlf(x, y, z, nside, dx, dy); + } if (xy >= 0) *pixel = funcs->xy_to_order(xy, nside); else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astropy_healpix-1.0.1/astropy_healpix/tests/test_core.py new/astropy_healpix-1.0.2/astropy_healpix/tests/test_core.py --- old/astropy_healpix-1.0.1/astropy_healpix/tests/test_core.py 2023-11-28 18:07:08.000000000 +0100 +++ new/astropy_healpix-1.0.2/astropy_healpix/tests/test_core.py 2023-12-12 16:43:05.000000000 +0100 @@ -209,6 +209,13 @@ assert dy.shape == (2, 4) +def test_lonlat_to_healpix_invalid(): + """Check that if we pass NaN values for example, the index is set to -1""" + ipix = lonlat_to_healpix(np.nan * u.deg, np.nan * u.deg, + nside=1, order='nested') + assert ipix == -1 + + @pytest.mark.parametrize('function', [nested_to_ring, ring_to_nested]) def test_nested_ring_shape(function): index = function(1, 8) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astropy_healpix-1.0.1/astropy_healpix/version.py new/astropy_healpix-1.0.2/astropy_healpix/version.py --- old/astropy_healpix-1.0.1/astropy_healpix/version.py 2023-11-28 18:07:31.000000000 +0100 +++ new/astropy_healpix-1.0.2/astropy_healpix/version.py 2023-12-12 16:43:26.000000000 +0100 @@ -5,4 +5,4 @@ from setuptools_scm import get_version version = get_version(root='..', relative_to=__file__) except Exception: - version = '1.0.1' + version = '1.0.2' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astropy_healpix-1.0.1/astropy_healpix.egg-info/PKG-INFO new/astropy_healpix-1.0.2/astropy_healpix.egg-info/PKG-INFO --- old/astropy_healpix-1.0.1/astropy_healpix.egg-info/PKG-INFO 2023-11-28 18:07:31.000000000 +0100 +++ new/astropy_healpix-1.0.2/astropy_healpix.egg-info/PKG-INFO 2023-12-12 16:43:26.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: astropy-healpix -Version: 1.0.1 +Version: 1.0.2 Summary: BSD-licensed HEALPix for Astropy Home-page: https://github.com/astropy/astropy-healpix Author: Astropy Developers