[PATCH 0/5] Add some Astropy affiliated packages.

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Vinicius Monego
Owner
unassigned
Submitted by
Vinicius Monego
Severity
normal
V
V
Vinicius Monego wrote on 9 Jan 2022 05:35
(address . guix-patches@gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20220109043522.27612-1-monego@posteo.net
Vinicius Monego (5):
gnu: Add python-pyvo.
gnu: Add python-astroquery.
gnu: Add python-astropy-healpix.
gnu: Add python-photutils.
gnu: Add python-regions.

gnu/packages/astronomy.scm | 193 ++++++++++++++++++++++++++++++++++++-
1 file changed, 192 insertions(+), 1 deletion(-)


base-commit: 9d613c36de1ea52e745d30bad841b6cdeaca65f4
--
2.30.2
V
V
Vinicius Monego wrote on 9 Jan 2022 05:37
[PATCH 1/5] gnu: Add python-pyvo.
(address . 53135@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20220109043726.28142-1-monego@posteo.net
* gnu/packages/astronomy.scm (python-pyvo): New variable.
---
gnu/packages/astronomy.scm | 37 ++++++++++++++++++++++++++++++++++++-
1 file changed, 36 insertions(+), 1 deletion(-)

Toggle diff (64 lines)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index a7a07fa3a8..ef85ec79e0 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -6,7 +6,7 @@
;;; Copyright © 2020 R Veera Kumar <vkor@vkten.in>
;;; Copyright © 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
-;;; Copyright © 2021 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2021, 2022 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
;;;
@@ -55,6 +55,7 @@
#:use-module (gnu packages python-check)
#:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-science)
+ #:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
#:use-module (gnu packages time)
@@ -705,6 +706,40 @@ much of the core functionality and some common tools needed for performing
astronomy and astrophysics.")
(license license:bsd-3)))
+(define-public python-pyvo
+ (package
+ (name "python-pyvo")
+ (version "1.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pyvo" version))
+ (sha256
+ (base32 "1lap703wxbyxqlbk85myirp4pkdnc6cg10xhfajfsvz5k0hm5ffw"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "python" "-m" "pytest" "--pyargs" "pyvo" "-k"
+ (string-append ; these tests use the network
+ "not test_access_with_string"
+ " and not test_access_with_list"
+ " and not test_access_with_expansion"))))))))
+ (native-inputs
+ (list python-pytest-astropy python-requests-mock))
+ (propagated-inputs
+ (list python-astropy python-mimeparse python-pillow python-requests))
+ (home-page "https://github.com/astropy/pyvo")
+ (synopsis "Access Virtual Observatory data and services")
+ (description
+ "PyVO is a package providing access to remote data and services of the
+Virtual observatory (VO) using Python.")
+ (license license:bsd-3)))
+
(define-public python-astral
(package
(name "python-astral")
--
2.30.2
V
V
Vinicius Monego wrote on 9 Jan 2022 05:37
[PATCH 2/5] gnu: Add python-astroquery.
(address . 53135@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20220109043726.28142-2-monego@posteo.net
* gnu/packages/astronomy.scm (python-astroquery): 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 ef85ec79e0..ee65fbf2c5 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -706,6 +706,50 @@ much of the core functionality and some common tools needed for performing
astronomy and astrophysics.")
(license license:bsd-3)))
+(define-public python-astroquery
+ (package
+ (name "python-astroquery")
+ (version "0.4.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "astroquery" version))
+ (sha256
+ (base32 "06xy0qzqmps6z5vwfkh5fkhr151p7g94r2j0mvp1rc8zns22y010"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'writable-home
+ (lambda _ ; some tests need a writable home
+ (setenv "HOME" (getcwd))))
+ (replace 'check
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "python" "-m" "pytest" "--pyargs" "astroquery"
+ ;; Skip tests that require online data.
+ "-m" "not remote_data")))))))
+ (propagated-inputs
+ (list python-astropy
+ python-beautifulsoup4
+ python-html5lib
+ python-keyring
+ python-numpy
+ python-pyvo
+ python-requests))
+ (native-inputs
+ (list python-flask
+ python-jinja2
+ python-matplotlib
+ python-pytest-astropy
+ python-pytest-dependency))
+ (home-page "https://www.astropy.org/astroquery/")
+ (synopsis "Access online astronomical data resources")
+ (description "Astroquery is a package that contains a collection of tools
+to access online Astronomical data. Each web service has its own sub-package.")
+ (license license:bsd-3)))
+
(define-public python-pyvo
(package
(name "python-pyvo")
--
2.30.2
V
V
Vinicius Monego wrote on 9 Jan 2022 05:38
[PATCH 3/5] gnu: Add python-astropy-healpix.
(address . 53135@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20220109043841.28296-1-monego@posteo.net
* gnu/packages/astronomy.scm (python-astropy-healpix): New variable.
---
gnu/packages/astronomy.scm | 39 ++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)

Toggle diff (52 lines)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index ee65fbf2c5..1573003c7e 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -706,6 +706,45 @@ much of the core functionality and some common tools needed for performing
astronomy and astrophysics.")
(license license:bsd-3)))
+(define-public python-astropy-healpix
+ (package
+ (name "python-astropy-healpix")
+ (version "0.6")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "astropy-healpix" version))
+ (sha256
+ (base32 "1436ml03xkmvx4afzbhfj67ab91418sz1w3lq1b18r43qchnd6j0"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ ;; This file is opened in both install and check phases.
+ (add-before 'install 'writable-compiler
+ (lambda _ (make-file-writable "astropy_healpix/_compiler.c")))
+ (add-before 'check 'writable-compiler
+ (lambda _ (make-file-writable "astropy_healpix/_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" "astropy_healpix")))))))
+ (native-inputs
+ (list python-extension-helpers
+ python-hypothesis
+ python-pytest-astropy
+ python-setuptools-scm))
+ (propagated-inputs
+ (list python-astropy python-numpy))
+ (home-page "https://github.com/astropy/astropy-healpix")
+ (synopsis "HEALPix for Astropy")
+ (description "This package provides HEALPix to the Astropy project.")
+ (license license:bsd-3)))
+
(define-public python-astroquery
(package
(name "python-astroquery")
--
2.30.2
V
V
Vinicius Monego wrote on 9 Jan 2022 05:38
[PATCH 4/5] gnu: Add python-photutils.
(address . 53135@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20220109043841.28296-2-monego@posteo.net
* gnu/packages/astronomy.scm (python-photutils): New variable.
---
gnu/packages/astronomy.scm | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)

Toggle diff (47 lines)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 1573003c7e..20961e1436 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -789,6 +789,40 @@ astronomy and astrophysics.")
to access online Astronomical data. Each web service has its own sub-package.")
(license license:bsd-3)))
+(define-public python-photutils
+ (package
+ (name "python-photutils")
+ (version "1.3.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "photutils" version))
+ (sha256
+ (base32 "1a8djakaya6w5iv9237gkcz39brqzgrfs2wqrl0izi1s85cfdymn"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:test-target "pytest"
+ #:phases
+ (modify-phases %standard-phases
+ ;; This file is opened in both install and check phases.
+ (add-before 'install 'writable-compiler
+ (lambda _ (make-file-writable "photutils/_compiler.c")))
+ (add-before 'check 'writable-compiler
+ (lambda _ (make-file-writable "photutils/_compiler.c"))))))
+ (propagated-inputs
+ (list python-astropy python-numpy))
+ (native-inputs
+ (list python-cython
+ python-extension-helpers
+ python-pytest-astropy
+ python-pytest-runner
+ python-setuptools-scm))
+ (home-page "https://github.com/astropy/photutils")
+ (synopsis "Source detection and photometry")
+ (description "Photutils is an Astropy package for detection and photometry
+of astronomical sources.")
+ (license license:bsd-3)))
+
(define-public python-pyvo
(package
(name "python-pyvo")
--
2.30.2
V
V
Vinicius Monego wrote on 9 Jan 2022 05:38
[PATCH 5/5] gnu: Add python-regions.
(address . 53135@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20220109043841.28296-3-monego@posteo.net
* gnu/packages/astronomy.scm (python-regions): New variable.
---
gnu/packages/astronomy.scm | 39 ++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)

Toggle diff (52 lines)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 20961e1436..e968fd2480 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -857,6 +857,45 @@ of astronomical sources.")
Virtual observatory (VO) using Python.")
(license license:bsd-3)))
+(define-public python-regions
+ (package
+ (name "python-regions")
+ (version "0.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "regions" version))
+ (sha256
+ (base32 "1bjrcjchbw3xw1a26d5g198lh7vxpp9m5sal58r7f8mmr1d8g2dc"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:test-target "pytest"
+ #:phases
+ (modify-phases %standard-phases
+ ;; This doctest requires online data.
+ (add-after 'unpack 'delete-doctest
+ (lambda _ (delete-file "docs/masks.rst")))
+ ;; This file is opened in both install and check phases.
+ (add-before 'install 'writable-compiler
+ (lambda _ (make-file-writable "regions/_compiler.c")))
+ (add-before 'check 'writable-compiler
+ (lambda _ (make-file-writable "regions/_compiler.c")))
+ (add-before 'check 'writable-home
+ (lambda _ (setenv "HOME" (getcwd)))))))
+ (propagated-inputs
+ (list python-astropy python-numpy))
+ (native-inputs
+ (list python-cython
+ python-extension-helpers
+ python-pytest-arraydiff
+ python-pytest-astropy
+ python-pytest-runner
+ python-setuptools-scm))
+ (home-page "https://github.com/astropy/regions")
+ (synopsis "Package for region handling")
+ (description "Regions is an Astropy package for region handling.")
+ (license license:bsd-3)))
+
(define-public python-astral
(package
(name "python-astral")
--
2.30.2
L
L
Ludovic Courtès wrote on 25 Jan 2022 23:53
Re: bug#53135: [PATCH 0/5] Add some Astropy affiliated packages.
(name . Vinicius Monego)(address . monego@posteo.net)(address . 53135-done@debbugs.gnu.org)
87wninjukn.fsf@gnu.org
Hi,

Vinicius Monego <monego@posteo.net> skribis:

Toggle quote (6 lines)
> gnu: Add python-pyvo.
> gnu: Add python-astroquery.
> gnu: Add python-astropy-healpix.
> gnu: Add python-photutils.
> gnu: Add python-regions.

Applied, thanks!

Ludo’.
Closed
?