[PATCH 0/4]: gnu: python-astroalign: Update to 2.4.2.

  • Done
  • quality assurance status badge
Details
2 participants
  • Maxim Cournoyer
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Sharlatan Hellseher
Severity
normal

Debbugs page

Sharlatan Hellseher wrote 2 years ago
(address . guix-patches@gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20230412205748.29835-1-sharlatanus@gmail.com
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/60316which may help to bring homeassistant to
Guix.

Toggle quote (5 lines)
> /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
Sharlatan Hellseher wrote 2 years ago
[PATCH 2/4] gnu: Add python-memory-profiler.
(address . 62801@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20230412210529.30189-2-sharlatanus@gmail.com
* gnu/packages/python-check.scm (python-memory-profiler): New variable.
---
gnu/packages/python-check.scm | 49 +++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)

Toggle diff (62 lines)
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
Sharlatan Hellseher wrote 2 years ago
[PATCH 4/4] gnu: python-astroalign: Update to 2.4.2.
(address . 62801@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20230412210529.30189-4-sharlatanus@gmail.com
* 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(-)

Toggle diff (46 lines)
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
Sharlatan Hellseher wrote 2 years ago
[PATCH 3/4] gnu: Add python-ccdproc.
(address . 62801@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20230412210529.30189-3-sharlatanus@gmail.com
* gnu/packages/astronomy.scm (python-ccdproc): New variable.
---
gnu/packages/astronomy.scm | 33 ++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)

Toggle diff (53 lines)
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@disroot.org>
;;; Copyright © 2020 R Veera Kumar <vkor@vkten.in>
;;; Copyright © 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
-;;; Copyright © 2021, 2022, 2023 Sharlatan Hellseher <sharlatanus@gmail.com>
+;;; Copyright © 2021-2023 Sharlatan Hellseher <sharlatanus@gmail.com>
;;; Copyright © 2021, 2022 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@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
Sharlatan Hellseher wrote 2 years ago
[PATCH 1/4] gnu: Add python-astroscrappy.
(address . 62801@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20230412210529.30189-1-sharlatanus@gmail.com
* gnu/packages/astronomy.scm (python-astroscrappy): New variable.
---
gnu/packages/astronomy.scm | 48 ++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)

Toggle diff (61 lines)
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
Sharlatan Hellseher wrote 2 years ago
(address . 62801@debbugs.gnu.org)(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
CAO+9K5qQj+g+pTYdmh4jjZEy=KOnkvs+N5751R1j4RwjpcmG0w@mail.gmail.com
Hi,
A gentle ping on this issue, let me know if anything needs to be adjusted.
Regards,
Oleg
--
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.
Maxim Cournoyer wrote 2 years ago
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 62801@debbugs.gnu.org)
87o7nj1fyf.fsf_-_@gmail.com
Hello,

Sharlatan Hellseher <sharlatanus@gmail.com> writes:

Toggle quote (39 lines)
> * 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.

Toggle quote (3 lines)
> + ;; 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.

Toggle quote (11 lines)
> + (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
Maxim Cournoyer wrote 2 years ago
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 62801@debbugs.gnu.org)
87jzy71frl.fsf_-_@gmail.com
Hello,

Sharlatan Hellseher <sharlatanus@gmail.com> writes:

Toggle quote (34 lines)
> * 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
Toggle quote (1 lines)
> + (add-after 'unpack 'disable-fialing-tests
^failing

Toggle quote (20 lines)
> + (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
Maxim Cournoyer wrote 2 years ago
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 62801@debbugs.gnu.org)
87fs8v1fnm.fsf_-_@gmail.com
Hello,

Sharlatan Hellseher <sharlatanus@gmail.com> writes:

Toggle quote (37 lines)
> * 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@disroot.org>
> ;;; Copyright © 2020 R Veera Kumar <vkor@vkten.in>
> ;;; Copyright © 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
> -;;; Copyright © 2021, 2022, 2023 Sharlatan Hellseher <sharlatanus@gmail.com>
> +;;; Copyright © 2021-2023 Sharlatan Hellseher <sharlatanus@gmail.com>
> ;;; Copyright © 2021, 2022 Vinicius Monego <monego@posteo.net>
> ;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
> ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@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.

Toggle quote (17 lines)
> + (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
Maxim Cournoyer wrote 2 years ago
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 62801@debbugs.gnu.org)
87bkjj1fi9.fsf_-_@gmail.com
Hello,

Sharlatan Hellseher <sharlatanus@gmail.com> writes:

Toggle quote (6 lines)
> * 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.

Toggle quote (40 lines)
> ---
> 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 ...))

Toggle quote (10 lines)
> + (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
Sharlatan Hellseher wrote 2 years ago
[PATCH v2 2/4] gnu: Add python-memory-profiler.
(address . 62801@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20230421200446.1899-2-sharlatanus@gmail.com
* gnu/packages/python-check.scm (python-memory-profiler): New variable.
---
gnu/packages/python-check.scm | 51 +++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)

Toggle diff (64 lines)
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
Sharlatan Hellseher wrote 2 years ago
[PATCH v2 4/4] gnu: python-astroalign: Update to 2.4.2.
(address . 62801@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20230421200446.1899-4-sharlatanus@gmail.com
* 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(-)

Toggle diff (45 lines)
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
Sharlatan Hellseher wrote 2 years ago
[PATCH v2 3/4] gnu: Add python-ccdproc.
(address . 62801@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20230421200446.1899-3-sharlatanus@gmail.com
* gnu/packages/astronomy.scm (python-ccdproc): New variable.
---
gnu/packages/astronomy.scm | 34 +++++++++++++++++++++++++++++++++-
1 file changed, 33 insertions(+), 1 deletion(-)

Toggle diff (54 lines)
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@disroot.org>
;;; Copyright © 2020 R Veera Kumar <vkor@vkten.in>
;;; Copyright © 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
-;;; Copyright © 2021, 2022, 2023 Sharlatan Hellseher <sharlatanus@gmail.com>
+;;; Copyright © 2021-2023 Sharlatan Hellseher <sharlatanus@gmail.com>
;;; Copyright © 2021, 2022 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@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
Sharlatan Hellseher wrote 2 years ago
[PATCH v2 1/4] gnu: Add python-astroscrappy.
(address . 62801@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20230421200446.1899-1-sharlatanus@gmail.com
* gnu/packages/astronomy.scm (python-astroscrappy): New variable.
---
gnu/packages/astronomy.scm | 44 ++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)

Toggle diff (57 lines)
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
Sharlatan Hellseher wrote 2 years ago
Re:
(address . 62801@debbugs.gnu.org)(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
CAO+9K5pEs8t1HxCT5A=eDUaWK=NFvYJERSRO0JSvKEBXuK2A-g@mail.gmail.com
Hi Maxim,
I think I've covered all review points.
Thanks,
Oleg
On Tue, 18 Apr 2023, 21:21 Sharlatan Hellseher, <sharlatanus@gmail.com>
wrote:
Toggle quote (12 lines)
> Hi,
>
> A gentle ping on this issue, let me know if anything needs to be adjusted.
>
> Regards,
> Oleg
>
> --
> … наш разум - превосходная объяснительная машина которая способна
> найти смысл почти в чем угодно, истолковать любой феномен, но
> совершенно не в состоянии принять мысль о непредсказуемости.
>
Attachment: file
Maxim Cournoyer wrote 2 years ago
Re:
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 62801-done@debbugs.gnu.org)
87h6so19ye.fsf@gmail.com
Hi Sharlatan,

Sharlatan Hellseher <sharlatanus@gmail.com> writes:

Toggle quote (4 lines)
> Hi Maxim,
>
> I think I've covered all review points.

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

--
Thanks,
Maxim
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 62801@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 62801
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help