GNU bug report logs - #70489
[PATCH 00/47] Astronomy 2024/04 updates.

Previous Next

Package: guix-patches;

Reported by: Sharlatan Hellseher <sharlatanus <at> gmail.com>

Date: Sat, 20 Apr 2024 23:21:03 UTC

Severity: normal

Tags: patch

Done: Sharlatan Hellseher <sharlatanus <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 70489 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>, Andreas Enge <andreas <at> enge.fr>, Eric Bavier <bavier <at> posteo.net>, Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [bug#70489] [PATCH 41/47] gnu: python-reproject: Enable tests.
Date: Sun, 21 Apr 2024 00:22:30 +0100
* gnu/packages/astronomy.scm (python-reproject): Enable tests.
[arguments]: <#:tests-flags>: Add them as seen in tox.ini.
<#:phases>: Rename 'writable-home to 'prepare-test-environment to reflect
purpose and build extension before tests.
[native-inputs]: Add python-xdist.

Change-Id: I7a5454e3ce241b7a54626f8aba27602b4965c25b
---
 gnu/packages/astronomy.scm | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 32c70b9bdf..58bf607059 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -2742,16 +2742,11 @@ (define-public python-reproject
     (build-system pyproject-build-system)
     (arguments
      (list
-      ;; FIXME: Failing tests
-      ;;
-      ;; reproject/adaptive/core.py:7: in <module>
-      ;; from .deforest import map_coordinates
-      ;; E   ModuleNotFoundError: No module named 'reproject.adaptive.deforest'
-      ;;
-      ;; Project removed setup.py and there is no alternative to `python
-      ;; setup.py build_ext'
-      ;; See: https://github.com/pypa/setuptools/discussions/3388
-      #:tests? #f
+      #:test-flags
+      #~(list "--arraydiff"
+              "--arraydiff-default-format=fits"
+              "--numprocesses" "auto"
+              "--pyargs" "reproject")
       #:phases
       #~(modify-phases %standard-phases
           ;; setup.py was removed in a659a260bdd7635cddc8f33c4ea04a3b6d8c1f84
@@ -2771,9 +2766,11 @@ (define-public python-reproject
           (add-before 'check 'writable-compiler
             (lambda _
               (make-file-writable "reproject/_compiler.c")))
-          (add-before 'check 'writable-home
+          (add-before 'check 'prepare-test-environment
             (lambda _
-              (setenv "HOME" (getcwd)))))))
+              (setenv "HOME" "/tmp")
+              ;; Cython extensions have to be built before running the tests.
+              (invoke "python" "setup.py" "build_ext" "--inplace"))))))
     (propagated-inputs
      (list python-asdf
            python-astropy
@@ -2791,9 +2788,11 @@ (define-public python-reproject
     (native-inputs
      (list python-cython-3
            python-extension-helpers
+           python-pytest
            python-pytest-astropy
+           python-pytest-xdist
+           ;; python-sunpy ; circular dependencies, test optional
            python-semantic-version
-           python-pytest
            python-setuptools-scm))
     (home-page "https://reproject.readthedocs.io")
     (synopsis "Astronomical image reprojection in Python")
-- 
2.41.0





This bug report was last modified 1 year and 75 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.