GNU bug report logs - #62801
[PATCH 0/4]: gnu: python-astroalign: Update to 2.4.2.

Previous Next

Package: guix-patches;

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

Date: Wed, 12 Apr 2023 20:59:01 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 62801 in the body.
You can then email your comments to 62801 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#62801; Package guix-patches. (Wed, 12 Apr 2023 20:59:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sharlatan Hellseher <sharlatanus <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 12 Apr 2023 20:59:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 0/4]: gnu: python-astroalign: Update to 2.4.2.
Date: Wed, 12 Apr 2023 21:57:48 +0100
Hi Guix!

To enable tests I follow the long path to add few more packages. I've noticed
python-memory-profiler is mentioned in this issue
https://issues.guix.gnu.org/60316 which may help to bring homeassistant to
Guix.

> /gnu/store/qnq2rxyaprcd7vy376nh4zcsq7wxv45b-python-astroscrappy-1.1.0
> /gnu/store/w3x2kv12xxzsh6wpd39x05972h3c05md-python-memory-profiler-0.61
> /gnu/store/158nrw23hl78ch7685fs1jvyz7anjbwc-python-ccdproc-2.4.0
> /gnu/store/h9zi371rz32m8bx17fyx465w05yp5fzg-python-astroalign-2.4.2

Sharlatan Hellseher (4):
  gnu: Add python-astroscrappy.
  gnu: Add python-memory-profiler.
  gnu: Add python-ccdproc.
  gnu: python-astroalign: Update to 2.4.2.

 gnu/packages/astronomy.scm    | 111 +++++++++++++++++++++++++++++-----
 gnu/packages/python-check.scm |  49 +++++++++++++++
 2 files changed, 146 insertions(+), 14 deletions(-)


base-commit: 3ab983d630a95a29b9418b1ba8a26e5ca2836ec0
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#62801; Package guix-patches. (Wed, 12 Apr 2023 21:06:01 GMT) Full text and rfc822 format available.

Message #8 received at 62801 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 62801 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 2/4] gnu: Add python-memory-profiler.
Date: Wed, 12 Apr 2023 22:05:27 +0100
* gnu/packages/python-check.scm (python-memory-profiler): New variable.
---
 gnu/packages/python-check.scm | 49 +++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 41a6997190..0affd2896b 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -1771,6 +1771,55 @@ (define-public python-atpublic
     (license (list license:asl2.0
                    license:lgpl3))))    ; only for setup_helpers.py
 
+(define-public python-memory-profiler
+  (package
+    (name "python-memory-profiler")
+    (version "0.61")
+    (source
+     (origin
+       ;; PyPi tarball lacks tests.
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/pythonprofilers/memory_profiler")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0n6g47qqmnn7abh3v25535hd8bmfvhf9bnp72m7bkd89f715m7xh"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; XXX: @profile is not loaded in some test files and there are 3 tests
+          ;; which were failed, disable them for now.
+          (add-after 'unpack 'disable-fialing-tests
+            (lambda _
+              (with-directory-excursion "test"
+                (for-each delete-file
+                          '("test_as.py"
+                            "test_func.py"
+                            "test_gen.py"
+                            "test_loop.py"
+                            "test_loop_decorated.py"
+                            "test_mprofile.py"
+                            "test_nested.py"
+                            "test_precision_command_line.py"
+                            "test_unicode.py")))
+              (substitute* "test/test_attributes.py"
+                (("def test_with_profile") "def __off_test_with_profile"))
+              (substitute* "test/test_stream_unicode.py"
+                (("def test_unicode") "def __off_test_unicode"))
+              (substitute* "test/test_tracemalloc.py"
+                (("def test_memory_profiler") "def __off_test_memory_profiler")))))))
+    (native-inputs (list python-pytest-7.1 python-pytest-fixture-config python-safety))
+    (propagated-inputs (list python-psutil))
+    (home-page "https://github.com/pythonprofilers/memory_profiler")
+    (synopsis "Monitor Memory usage of Python code")
+    (description
+     "This package provides a module for monitoring memory usage of a python
+program.")
+    (license license:bsd-3)))
+
 (define-public python-mockito
   (package
     (name "python-mockito")
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#62801; Package guix-patches. (Wed, 12 Apr 2023 21:06:02 GMT) Full text and rfc822 format available.

Message #11 received at 62801 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 62801 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 4/4] gnu: python-astroalign: Update to 2.4.2.
Date: Wed, 12 Apr 2023 22:05:29 +0100
* gnu/packages/astronomy.scm (python-astroalign): Update to 2.4.2.
  [source]: Use git checkout instead PyPI to enable tests.
  [build-system]: Use pyproject-build-system.
  [propagated-inputs]: Migrate from inputs. Remove labels. Add optional python-bottleneck.
  [native-inputs]: Add python-astropy, python-ccdproc, python-pillow.
---
 gnu/packages/astronomy.scm | 30 +++++++++++++++++-------------
 1 file changed, 17 insertions(+), 13 deletions(-)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 9961e19695..0d7212791a 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -3070,22 +3070,26 @@ (define-public python-gwcs
 (define-public python-astroalign
   (package
     (name "python-astroalign")
-    (version "2.3.1")
+    (version "2.4.2")
     (source
      (origin
-       (method url-fetch)
-       (uri (pypi-uri "astroalign" version))
+       ;; There are no tests in the PyPI tarball.
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/quatrope/astroalign")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
        (sha256
-        (base32 "19qzv3552lgrd9qmj0rxs51wmx485hw04cbf76ds5pin85kfaiy1"))))
-    (build-system python-build-system)
-    (arguments
-     ;; TODO: (Sharlatan-20210213T162940+0000): I could not make tests run
-     `(#:tests? #f))
-    (inputs
-     `(("numpy" ,python-numpy)
-       ("scikit-image" ,python-scikit-image)
-       ("scipy" ,python-scipy)
-       ("sep" ,python-sep)))
+        (base32 "0hly20a65540hr3l1lsd1i4d90a0vdrbwnn6zx3z8s89ha9lq3pb"))))
+    (build-system pyproject-build-system)
+    (native-inputs
+     (list python-astropy python-ccdproc python-pillow))
+    (propagated-inputs
+     (list python-bottleneck
+           python-numpy
+           python-scikit-image
+           python-scipy
+           python-sep))
     (home-page "https://astroalign.readthedocs.io/")
     (synopsis "Astrometric Alignment of Images")
     (description
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#62801; Package guix-patches. (Wed, 12 Apr 2023 21:06:02 GMT) Full text and rfc822 format available.

Message #14 received at 62801 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 62801 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 3/4] gnu: Add python-ccdproc.
Date: Wed, 12 Apr 2023 22:05:28 +0100
* gnu/packages/astronomy.scm (python-ccdproc): New variable.
---
 gnu/packages/astronomy.scm | 33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index f162be6006..9961e19695 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -5,7 +5,7 @@
 ;;; Copyright © 2019 by Amar Singh <nly <at> disroot.org>
 ;;; Copyright © 2020 R Veera Kumar <vkor <at> vkten.in>
 ;;; Copyright © 2020, 2021 Guillaume Le Vaillant <glv <at> posteo.net>
-;;; Copyright © 2021, 2022, 2023 Sharlatan Hellseher <sharlatanus <at> gmail.com>
+;;; Copyright © 2021-2023 Sharlatan Hellseher <sharlatanus <at> gmail.com>
 ;;; Copyright © 2021, 2022 Vinicius Monego <monego <at> posteo.net>
 ;;; Copyright © 2021 Greg Hogan <code <at> greghogan.com>
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
@@ -1350,6 +1350,37 @@ (define-public python-astroscrappy
 specifically in the C code.")
     (license license:bsd-3)))
 
+(define-public python-ccdproc
+  (package
+    (name "python-ccdproc")
+    (version "2.4.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "ccdproc" version))
+       (sha256
+        (base32 "0fy1sni87cr05dkljd8wb7vgh7z9agh8wv5kiagxcpbcf8l06jv1"))))
+    (build-system pyproject-build-system)
+    (arguments
+     ;; FIXME: Test failed a lot with: DeprecationWarning: distutils Version
+     ;; classes are deprecated. Use packaging.version instead.
+     (list #:tests? #f))
+    (native-inputs
+     (list python-memory-profiler python-pytest-astropy))
+    (propagated-inputs
+     (list python-astropy
+           python-astroscrappy
+           python-numpy
+           python-reproject
+           python-scikit-image
+           python-scipy))
+    (home-page "http://ccdproc.readthedocs.io/")
+    (synopsis "Basic data reductions of CCD images")
+    (description "The ccdproc package provides many of the necessary tools for
+processing of CCD images built on a framework to provide error propagation and
+bad pixel tracking throughout the reduction process.")
+    (license license:bsd-3)))
+
 (define-public python-cdflib
   (package
     (name "python-cdflib")
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#62801; Package guix-patches. (Wed, 12 Apr 2023 21:06:02 GMT) Full text and rfc822 format available.

Message #17 received at 62801 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 62801 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 1/4] gnu: Add python-astroscrappy.
Date: Wed, 12 Apr 2023 22:05:26 +0100
* gnu/packages/astronomy.scm (python-astroscrappy): New variable.
---
 gnu/packages/astronomy.scm | 48 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index db290f5987..f162be6006 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -1302,6 +1302,54 @@ (define-public python-astroquery
 to access online Astronomical data.  Each web service has its own sub-package.")
     (license license:bsd-3)))
 
+(define-public python-astroscrappy
+  (package
+    (name "python-astroscrappy")
+    (version "1.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "astroscrappy" version))
+       (sha256
+        (base32 "0shmfilvzpmlwz4fh0bx4kqmzr0y39fgga6vipxb5d1rx1y6q6by"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'preparations
+            (lambda _ (setenv "HOME" "/tmp")))
+          (add-before 'install 'writable-compiler
+            (lambda _ (make-file-writable "astroscrappy/_compiler.c")))
+          (add-before 'check 'writable-compiler
+            (lambda _ (make-file-writable "astroscrappy/_compiler.c")))
+          (replace 'check
+            (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+              (when tests?
+                (add-installed-pythonpath inputs outputs)
+                ;; Extensions have to be rebuilt before running the tests.
+                (invoke "python" "setup.py" "build_ext" "--inplace")
+                (invoke "python" "-m" "pytest" "--pyargs" "astroscrappy")))))))
+    (native-inputs
+     (list python-cython
+           python-extension-helpers
+           python-h5py
+           python-pandas
+           python-pytest-astropy
+           python-scikit-image
+           python-setuptools-scm
+           python-scipy))
+    (propagated-inputs (list python-astropy python-numpy))
+    (home-page "https://github.com/astropy/astroscrappy")
+    (synopsis "Speedy Cosmic Ray Annihilation Package in Python")
+    (description
+     "Astro-SCRAPPY is designed to detect cosmic rays in images (numpy
+arrays), based on Pieter van Dokkum's L.A.Cosmic algorithm.  Much of this was
+originally adapted from cosmics.py written by Malte Tewes.  This is designed to
+be as fast as possible so some of the readability has been sacrificed,
+specifically in the C code.")
+    (license license:bsd-3)))
+
 (define-public python-cdflib
   (package
     (name "python-cdflib")
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#62801; Package guix-patches. (Tue, 18 Apr 2023 20:23:01 GMT) Full text and rfc822 format available.

Message #20 received at 62801 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 62801 <at> debbugs.gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Date: Tue, 18 Apr 2023 21:21:55 +0100
Hi,

A gentle ping on this issue, let me know if anything needs to be adjusted.

Regards,
Oleg

-- 
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.

Information forwarded to guix-patches <at> gnu.org:
bug#62801; Package guix-patches. (Thu, 20 Apr 2023 01:49:01 GMT) Full text and rfc822 format available.

Message #23 received at 62801 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Cc: 62801 <at> debbugs.gnu.org
Subject: Re: bug#62801: [PATCH 0/4]: gnu: python-astroalign: Update to 2.4.2.
Date: Wed, 19 Apr 2023 21:48:40 -0400
Hello,

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

> * gnu/packages/astronomy.scm (python-astroscrappy): New variable.
> ---
>  gnu/packages/astronomy.scm | 48 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 48 insertions(+)
>
> diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
> index db290f5987..f162be6006 100644
> --- a/gnu/packages/astronomy.scm
> +++ b/gnu/packages/astronomy.scm
> @@ -1302,6 +1302,54 @@ (define-public python-astroquery
>  to access online Astronomical data.  Each web service has its own sub-package.")
>      (license license:bsd-3)))
>  
> +(define-public python-astroscrappy
> +  (package
> +    (name "python-astroscrappy")
> +    (version "1.1.0")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "astroscrappy" version))
> +       (sha256
> +        (base32 "0shmfilvzpmlwz4fh0bx4kqmzr0y39fgga6vipxb5d1rx1y6q6by"))))
> +    (build-system pyproject-build-system)
> +    (arguments
> +     (list
> +      #:phases
> +      #~(modify-phases %standard-phases
> +          (add-after 'unpack 'preparations
> +            (lambda _ (setenv "HOME" "/tmp")))
> +          (add-before 'install 'writable-compiler
> +            (lambda _ (make-file-writable "astroscrappy/_compiler.c")))
> +          (add-before 'check 'writable-compiler
> +            (lambda _ (make-file-writable "astroscrappy/_compiler.c")))
> +          (replace 'check
> +            (lambda* (#:key inputs outputs tests? #:allow-other-keys)
> +              (when tests?
> +                (add-installed-pythonpath inputs outputs)

The 'add-install-to-pythonpath' is not needed; this is implicitly
already done before the check phase in the python build systems.

> +                ;; Extensions have to be rebuilt before running the tests.
> +                (invoke "python" "setup.py" "build_ext" "--inplace")

I think it'd be a bit cleaner to move this in a distinct phase named
e.g. 'build-extension.  Then the check phase of pyproject-build-system
could be left alone.  If the '--pyargs' argument is really required, it
can be provided via the #:test-flags #~(list "--pyargs" "astroscrappy")
argument.

> +                (invoke "python" "-m" "pytest" "--pyargs" "astroscrappy")))))))
> +    (native-inputs
> +     (list python-cython
> +           python-extension-helpers
> +           python-h5py
> +           python-pandas
> +           python-pytest-astropy
> +           python-scikit-image
> +           python-setuptools-scm
> +           python-scipy))

The last input should appear earlier (sort).

-- 
Thanks,
Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#62801; Package guix-patches. (Thu, 20 Apr 2023 01:53:01 GMT) Full text and rfc822 format available.

Message #26 received at 62801 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Cc: 62801 <at> debbugs.gnu.org
Subject: Re: bug#62801: [PATCH 0/4]: gnu: python-astroalign: Update to 2.4.2.
Date: Wed, 19 Apr 2023 21:52:46 -0400
Hello,

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

> * gnu/packages/python-check.scm (python-memory-profiler): New variable.
> ---
>  gnu/packages/python-check.scm | 49 +++++++++++++++++++++++++++++++++++
>  1 file changed, 49 insertions(+)
>
> diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
> index 41a6997190..0affd2896b 100644
> --- a/gnu/packages/python-check.scm
> +++ b/gnu/packages/python-check.scm
> @@ -1771,6 +1771,55 @@ (define-public python-atpublic
>      (license (list license:asl2.0
>                     license:lgpl3))))    ; only for setup_helpers.py
>  
> +(define-public python-memory-profiler
> +  (package
> +    (name "python-memory-profiler")
> +    (version "0.61")
> +    (source
> +     (origin
> +       ;; PyPi tarball lacks tests.
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/pythonprofilers/memory_profiler")
> +             (commit (string-append "v" version))))
> +       (file-name (git-file-name name version))
> +       (sha256
> +        (base32 "0n6g47qqmnn7abh3v25535hd8bmfvhf9bnp72m7bkd89f715m7xh"))))
> +    (build-system pyproject-build-system)
> +    (arguments
> +     (list
> +      #:phases
> +      #~(modify-phases %standard-phases
> +          ;; XXX: @profile is not loaded in some test files and there are 3 tests
> +          ;; which were failed, disable them for now.
                      ^fail
                      
> +          (add-after 'unpack 'disable-fialing-tests
                                         ^failing

> +            (lambda _
> +              (with-directory-excursion "test"
> +                (for-each delete-file
> +                          '("test_as.py"
> +                            "test_func.py"
> +                            "test_gen.py"
> +                            "test_loop.py"
> +                            "test_loop_decorated.py"
> +                            "test_mprofile.py"
> +                            "test_nested.py"
> +                            "test_precision_command_line.py"
> +                            "test_unicode.py")))
> +              (substitute* "test/test_attributes.py"
> +                (("def test_with_profile") "def __off_test_with_profile"))
> +              (substitute* "test/test_stream_unicode.py"
> +                (("def test_unicode") "def __off_test_unicode"))
> +              (substitute* "test/test_tracemalloc.py"
> +                (("def test_memory_profiler") "def __off_test_memory_profiler")))))))
> +    (native-inputs (list python-pytest-7.1 python-pytest-fixture-config python-safety))

Please wrap lines to 80 characters.

-- 
Thanks,
Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#62801; Package guix-patches. (Thu, 20 Apr 2023 01:56:01 GMT) Full text and rfc822 format available.

Message #29 received at 62801 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Cc: 62801 <at> debbugs.gnu.org
Subject: Re: bug#62801: [PATCH 0/4]: gnu: python-astroalign: Update to 2.4.2.
Date: Wed, 19 Apr 2023 21:55:09 -0400
Hello,

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

> * gnu/packages/astronomy.scm (python-ccdproc): New variable.
> ---
>  gnu/packages/astronomy.scm | 33 ++++++++++++++++++++++++++++++++-
>  1 file changed, 32 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
> index f162be6006..9961e19695 100644
> --- a/gnu/packages/astronomy.scm
> +++ b/gnu/packages/astronomy.scm
> @@ -5,7 +5,7 @@
>  ;;; Copyright © 2019 by Amar Singh <nly <at> disroot.org>
>  ;;; Copyright © 2020 R Veera Kumar <vkor <at> vkten.in>
>  ;;; Copyright © 2020, 2021 Guillaume Le Vaillant <glv <at> posteo.net>
> -;;; Copyright © 2021, 2022, 2023 Sharlatan Hellseher <sharlatanus <at> gmail.com>
> +;;; Copyright © 2021-2023 Sharlatan Hellseher <sharlatanus <at> gmail.com>
>  ;;; Copyright © 2021, 2022 Vinicius Monego <monego <at> posteo.net>
>  ;;; Copyright © 2021 Greg Hogan <code <at> greghogan.com>
>  ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
> @@ -1350,6 +1350,37 @@ (define-public python-astroscrappy
>  specifically in the C code.")
>      (license license:bsd-3)))
>  
> +(define-public python-ccdproc
> +  (package
> +    (name "python-ccdproc")
> +    (version "2.4.0")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "ccdproc" version))
> +       (sha256
> +        (base32 "0fy1sni87cr05dkljd8wb7vgh7z9agh8wv5kiagxcpbcf8l06jv1"))))
> +    (build-system pyproject-build-system)
> +    (arguments
> +     ;; FIXME: Test failed a lot with: DeprecationWarning: distutils Version
> +     ;; classes are deprecated. Use packaging.version instead.

Please report problem upstream, so that it can be fixed and its
resolution tracked.  If it already is reported, link to it here, with a
"(see: https://...)" trailing bit to the explanatory comment.

> +     (list #:tests? #f))
> +    (native-inputs
> +     (list python-memory-profiler python-pytest-astropy))
> +    (propagated-inputs
> +     (list python-astropy
> +           python-astroscrappy
> +           python-numpy
> +           python-reproject
> +           python-scikit-image
> +           python-scipy))
> +    (home-page "http://ccdproc.readthedocs.io/")
> +    (synopsis "Basic data reductions of CCD images")
> +    (description "The ccdproc package provides many of the necessary tools for
> +processing of CCD images built on a framework to provide error propagation and
> +bad pixel tracking throughout the reduction process.")
> +    (license license:bsd-3)))

Looks fine otherwise!

-- 
Thanks,
Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#62801; Package guix-patches. (Thu, 20 Apr 2023 01:59:02 GMT) Full text and rfc822 format available.

Message #32 received at 62801 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Cc: 62801 <at> debbugs.gnu.org
Subject: Re: bug#62801: [PATCH 0/4]: gnu: python-astroalign: Update to 2.4.2.
Date: Wed, 19 Apr 2023 21:58:22 -0400
Hello,

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

> * gnu/packages/astronomy.scm (python-astroalign): Update to 2.4.2.
>   [source]: Use git checkout instead PyPI to enable tests.
>   [build-system]: Use pyproject-build-system.
>   [propagated-inputs]: Migrate from inputs. Remove labels. Add optional python-bottleneck.
>   [native-inputs]: Add python-astropy, python-ccdproc, python-pillow.

There shouldn't be a hanging indent (leading whitespace) in GNU change
logs.  Please wrap lines at 80 chars.

> ---
>  gnu/packages/astronomy.scm | 30 +++++++++++++++++-------------
>  1 file changed, 17 insertions(+), 13 deletions(-)
>
> diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
> index 9961e19695..0d7212791a 100644
> --- a/gnu/packages/astronomy.scm
> +++ b/gnu/packages/astronomy.scm
> @@ -3070,22 +3070,26 @@ (define-public python-gwcs
>  (define-public python-astroalign
>    (package
>      (name "python-astroalign")
> -    (version "2.3.1")
> +    (version "2.4.2")
>      (source
>       (origin
> -       (method url-fetch)
> -       (uri (pypi-uri "astroalign" version))
> +       ;; There are no tests in the PyPI tarball.
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/quatrope/astroalign")
> +             (commit (string-append "v" version))))
> +       (file-name (git-file-name name version))
>         (sha256
> -        (base32 "19qzv3552lgrd9qmj0rxs51wmx485hw04cbf76ds5pin85kfaiy1"))))
> -    (build-system python-build-system)
> -    (arguments
> -     ;; TODO: (Sharlatan-20210213T162940+0000): I could not make tests run
> -     `(#:tests? #f))
> -    (inputs
> -     `(("numpy" ,python-numpy)
> -       ("scikit-image" ,python-scikit-image)
> -       ("scipy" ,python-scipy)
> -       ("sep" ,python-sep)))
> +        (base32 "0hly20a65540hr3l1lsd1i4d90a0vdrbwnn6zx3z8s89ha9lq3pb"))))
> +    (build-system pyproject-build-system)
> +    (native-inputs
> +     (list python-astropy python-ccdproc python-pillow))

This line could fit on one line: (native-inputs (list python-astropy ...))

> +    (propagated-inputs
> +     (list python-bottleneck
> +           python-numpy
> +           python-scikit-image
> +           python-scipy
> +           python-sep))
>      (home-page "https://astroalign.readthedocs.io/")
>      (synopsis "Astrometric Alignment of Images")
>      (description

Well done!  Could you please send a v2 with my smallish comments
addressed? :-)

-- 
Thanks,
Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#62801; Package guix-patches. (Fri, 21 Apr 2023 20:05:01 GMT) Full text and rfc822 format available.

Message #35 received at 62801 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 62801 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH v2 2/4] gnu: Add python-memory-profiler.
Date: Fri, 21 Apr 2023 21:04:44 +0100
* gnu/packages/python-check.scm (python-memory-profiler): New variable.
---
 gnu/packages/python-check.scm | 51 +++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 9ce093697d..f1980a28a9 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -1779,6 +1779,57 @@ (define-public python-atpublic
     (license (list license:asl2.0
                    license:lgpl3))))    ; only for setup_helpers.py
 
+(define-public python-memory-profiler
+  (package
+    (name "python-memory-profiler")
+    (version "0.61")
+    (source
+     (origin
+       ;; PyPi tarball lacks tests.
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/pythonprofilers/memory_profiler")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0n6g47qqmnn7abh3v25535hd8bmfvhf9bnp72m7bkd89f715m7xh"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; XXX: @profile is not loaded in some test files and there are 3
+          ;; tests fail, disable them for now.
+          (add-after 'unpack 'disable-failing-tests
+            (lambda _
+              (with-directory-excursion "test"
+                (for-each delete-file
+                          '("test_as.py"
+                            "test_func.py"
+                            "test_gen.py"
+                            "test_loop.py"
+                            "test_loop_decorated.py"
+                            "test_mprofile.py"
+                            "test_nested.py"
+                            "test_precision_command_line.py"
+                            "test_unicode.py")))
+              (substitute* "test/test_attributes.py"
+                (("def test_with_profile") "def __off_test_with_profile"))
+              (substitute* "test/test_stream_unicode.py"
+                (("def test_unicode") "def __off_test_unicode"))
+              (substitute* "test/test_tracemalloc.py"
+                (("def test_memory_profiler")
+                 "def __off_test_memory_profiler")))))))
+    (native-inputs
+     (list python-pytest-7.1 python-pytest-fixture-config python-safety))
+    (propagated-inputs (list python-psutil))
+    (home-page "https://github.com/pythonprofilers/memory_profiler")
+    (synopsis "Monitor Memory usage of Python code")
+    (description
+     "This package provides a module for monitoring memory usage of a python
+program.")
+    (license license:bsd-3)))
+
 (define-public python-mockito
   (package
     (name "python-mockito")
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#62801; Package guix-patches. (Fri, 21 Apr 2023 20:05:02 GMT) Full text and rfc822 format available.

Message #38 received at 62801 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 62801 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH v2 4/4] gnu: python-astroalign: Update to 2.4.2.
Date: Fri, 21 Apr 2023 21:04:46 +0100
* gnu/packages/astronomy.scm (python-astroalign): Update to 2.4.2.
[source]: Use git checkout instead PyPI to enable tests.
[build-system]: Use pyproject-build-system.
[propagated-inputs]: Migrate from inputs. Remove labels. Add optional
python-bottleneck.
[native-inputs]: Add python-astropy, python-ccdproc, python-pillow.
---
 gnu/packages/astronomy.scm | 29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 086bf8d69f..d02f74b196 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -3067,22 +3067,25 @@ (define-public python-gwcs
 (define-public python-astroalign
   (package
     (name "python-astroalign")
-    (version "2.3.1")
+    (version "2.4.2")
     (source
      (origin
-       (method url-fetch)
-       (uri (pypi-uri "astroalign" version))
+       ;; There are no tests in the PyPI tarball.
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/quatrope/astroalign")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
        (sha256
-        (base32 "19qzv3552lgrd9qmj0rxs51wmx485hw04cbf76ds5pin85kfaiy1"))))
-    (build-system python-build-system)
-    (arguments
-     ;; TODO: (Sharlatan-20210213T162940+0000): I could not make tests run
-     `(#:tests? #f))
-    (inputs
-     `(("numpy" ,python-numpy)
-       ("scikit-image" ,python-scikit-image)
-       ("scipy" ,python-scipy)
-       ("sep" ,python-sep)))
+        (base32 "0hly20a65540hr3l1lsd1i4d90a0vdrbwnn6zx3z8s89ha9lq3pb"))))
+    (build-system pyproject-build-system)
+    (native-inputs (list python-astropy python-ccdproc python-pillow))
+    (propagated-inputs
+     (list python-bottleneck
+           python-numpy
+           python-scikit-image
+           python-scipy
+           python-sep))
     (home-page "https://astroalign.readthedocs.io/")
     (synopsis "Astrometric Alignment of Images")
     (description
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#62801; Package guix-patches. (Fri, 21 Apr 2023 20:05:02 GMT) Full text and rfc822 format available.

Message #41 received at 62801 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 62801 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH v2 3/4] gnu: Add python-ccdproc.
Date: Fri, 21 Apr 2023 21:04:45 +0100
* gnu/packages/astronomy.scm (python-ccdproc): New variable.
---
 gnu/packages/astronomy.scm | 34 +++++++++++++++++++++++++++++++++-
 1 file changed, 33 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index fb841ed65d..086bf8d69f 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -5,7 +5,7 @@
 ;;; Copyright © 2019 by Amar Singh <nly <at> disroot.org>
 ;;; Copyright © 2020 R Veera Kumar <vkor <at> vkten.in>
 ;;; Copyright © 2020, 2021 Guillaume Le Vaillant <glv <at> posteo.net>
-;;; Copyright © 2021, 2022, 2023 Sharlatan Hellseher <sharlatanus <at> gmail.com>
+;;; Copyright © 2021-2023 Sharlatan Hellseher <sharlatanus <at> gmail.com>
 ;;; Copyright © 2021, 2022 Vinicius Monego <monego <at> posteo.net>
 ;;; Copyright © 2021 Greg Hogan <code <at> greghogan.com>
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
@@ -1346,6 +1346,38 @@ (define-public python-astroscrappy
 specifically in the C code.")
     (license license:bsd-3)))
 
+(define-public python-ccdproc
+  (package
+    (name "python-ccdproc")
+    (version "2.4.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "ccdproc" version))
+       (sha256
+        (base32 "0fy1sni87cr05dkljd8wb7vgh7z9agh8wv5kiagxcpbcf8l06jv1"))))
+    (build-system pyproject-build-system)
+    (arguments
+     ;; FIXME: Test failed a lot with: DeprecationWarning: distutils Version
+     ;; classes are deprecated. Use packaging.version instead.
+     ;; (see https://github.com/astropy/ccdproc/issues/805)
+     (list #:tests? #f))
+    (native-inputs
+     (list python-memory-profiler python-pytest-astropy))
+    (propagated-inputs
+     (list python-astropy
+           python-astroscrappy
+           python-numpy
+           python-reproject
+           python-scikit-image
+           python-scipy))
+    (home-page "http://ccdproc.readthedocs.io/")
+    (synopsis "Basic data reductions of CCD images")
+    (description "The ccdproc package provides many of the necessary tools for
+processing of CCD images built on a framework to provide error propagation and
+bad pixel tracking throughout the reduction process.")
+    (license license:bsd-3)))
+
 (define-public python-cdflib
   (package
     (name "python-cdflib")
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#62801; Package guix-patches. (Fri, 21 Apr 2023 20:06:02 GMT) Full text and rfc822 format available.

Message #44 received at 62801 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 62801 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH v2 1/4] gnu: Add python-astroscrappy.
Date: Fri, 21 Apr 2023 21:04:43 +0100
* gnu/packages/astronomy.scm (python-astroscrappy): New variable.
---
 gnu/packages/astronomy.scm | 44 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 97a3255ef9..fb841ed65d 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -1302,6 +1302,50 @@ (define-public python-astroquery
 to access online Astronomical data.  Each web service has its own sub-package.")
     (license license:bsd-3)))
 
+(define-public python-astroscrappy
+  (package
+    (name "python-astroscrappy")
+    (version "1.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "astroscrappy" version))
+       (sha256
+        (base32 "0shmfilvzpmlwz4fh0bx4kqmzr0y39fgga6vipxb5d1rx1y6q6by"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:test-flags #~(list "--pyargs" "astroscrappy")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'preparations
+            (lambda _ (setenv "HOME" "/tmp")))
+          (add-before 'install 'writable-compiler
+            (lambda _ (make-file-writable "astroscrappy/_compiler.c")))
+          (add-before 'check 'tests-preparation
+            (lambda _
+              (make-file-writable "astroscrappy/_compiler.c")
+              (invoke "python" "setup.py" "build_ext" "--inplace"))))))
+    (native-inputs
+     (list python-cython
+           python-extension-helpers
+           python-h5py
+           python-pandas
+           python-pytest-astropy
+           python-scikit-image
+           python-scipy
+           python-setuptools-scm))
+    (propagated-inputs (list python-astropy python-numpy))
+    (home-page "https://github.com/astropy/astroscrappy")
+    (synopsis "Speedy Cosmic Ray Annihilation Package in Python")
+    (description
+     "Astro-SCRAPPY is designed to detect cosmic rays in images (numpy
+arrays), based on Pieter van Dokkum's L.A.Cosmic algorithm.  Much of this was
+originally adapted from cosmics.py written by Malte Tewes.  This is designed to
+be as fast as possible so some of the readability has been sacrificed,
+specifically in the C code.")
+    (license license:bsd-3)))
+
 (define-public python-cdflib
   (package
     (name "python-cdflib")
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#62801; Package guix-patches. (Mon, 24 Apr 2023 17:42:02 GMT) Full text and rfc822 format available.

Message #47 received at 62801 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 62801 <at> debbugs.gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: Re:
Date: Mon, 24 Apr 2023 18:41:17 +0100
[Message part 1 (text/plain, inline)]
Hi Maxim,

I think I've covered all review points.

Thanks,
Oleg

On Tue, 18 Apr 2023, 21:21 Sharlatan Hellseher, <sharlatanus <at> gmail.com>
wrote:

> Hi,
>
> A gentle ping on this issue, let me know if anything needs to be adjusted.
>
> Regards,
> Oleg
>
> --
> … наш разум - превосходная объяснительная машина которая способна
> найти смысл почти в чем угодно, истолковать любой феномен, но
> совершенно не в состоянии принять мысль о непредсказуемости.
>
[Message part 2 (text/html, inline)]

Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Sun, 07 May 2023 14:41:02 GMT) Full text and rfc822 format available.

Notification sent to Sharlatan Hellseher <sharlatanus <at> gmail.com>:
bug acknowledged by developer. (Sun, 07 May 2023 14:41:02 GMT) Full text and rfc822 format available.

Message #52 received at 62801-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Cc: 62801-done <at> debbugs.gnu.org
Subject: Re: 
Date: Sun, 07 May 2023 10:40:25 -0400
Hi Sharlatan,

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

> Hi Maxim,
>
> I think I've covered all review points.

Thank you!  I've installed the series, with few minor edits.

-- 
Thanks,
Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 05 Jun 2023 11:24:04 GMT) Full text and rfc822 format available.

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

Previous Next


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