[PATCH 0/5] gnu: Add python-sunpy.

  • Done
  • quality assurance status badge
Details
2 participants
  • Christopher Baines
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Sharlatan Hellseher
Severity
normal
S
S
Sharlatan Hellseher wrote on 24 Nov 2022 12:23
(address . guix-patches@gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20221124112329.22862-1-sharlatanus@gmail.com
Hi Guix team!

This is the last set of patches which adding with SunPy - solar data analysis
environment for Python.

python-opencv is required for tests only which are silent right now, package
is not presented Guix yet and require a more attention due to complexity.

Build was tested only on x86_64 hardware.

Toggle quote (7 lines)
> ./pre-inst-env guix build python-drms python-mpl-animators python-hvpy python-reproject python-sunpy --rounds=2
> /gnu/store/a4afv7qc124szmfn6z08m1c66m3gpv6m-python-sunpy-4.0.6
> /gnu/store/brx97jn7k5iixqpgvkbgl4i3kzyvkm3f-python-reproject-0.9.1
> /gnu/store/f6zbxpvglgq9kj16js2pkw3iy6mmv37m-python-hvpy-1.0.1
> /gnu/store/i143f9pijxs01v280cq6hr1132nafdza-python-mpl-animators-1.1.0
> /gnu/store/f2072k95gjjjfrhjk2rzk158hlp6bdv4-python-drms-0.6.3

Sharlatan Hellseher (5):
gnu: Add python-drms.
gnu: Add python-mpl-animators.
gnu: Add python-hvpy.
gnu: Add python-reproject.
gnu: Add python-sunpy.

gnu/packages/astronomy.scm | 225 +++++++++++++++++++++++++++++++++++++
1 file changed, 225 insertions(+)


base-commit: 22d44f87763f86a05e9679d9ad2c99e17f4c79be
--
2.38.0
S
S
Sharlatan Hellseher wrote on 24 Nov 2022 12:24
[PATCH 1/5] gnu: Add python-drms.
(address . 59542@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20221124112441.22965-1-sharlatanus@gmail.com
* gnu/packages/astronomy.scm (python-drms): New variable.
---
gnu/packages/astronomy.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

Toggle diff (50 lines)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index d450d1dd94..4ae2e1caa2 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -1142,6 +1142,43 @@ (define-public python-cdflib
@end itemize")
(license license:expat)))
+(define-public python-drms
+ (package
+ (name "python-drms")
+ (version "0.6.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "drms" version))
+ (sha256
+ (base32 "1b0w350y4wbgyy19zcf28xbb85mqq6gnhb6ppibbc4hbn2ixbcvj"))))
+ (build-system python-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key inputs outputs tests?
+ #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (setenv "JSOC_EMAIL" "jsoc@sunpy.org")
+ (invoke "python" "-m" "pytest" "-vv")))))))
+ (native-inputs
+ (list python-astropy
+ python-pytest-astropy
+ python-pytest
+ python-setuptools-scm))
+ (propagated-inputs (list python-numpy python-pandas))
+ (home-page "https://sunpy.org")
+ (synopsis "Access astronomical HMI, AIA and MDI data with Python")
+ (description
+ "DRMS module provides an easy-to-use interface for accessing HMI, AIA and MDI
+data with Python. It uses the publicly accessible
+JSOC (@url{http://jsoc.stanford.edu/}) DRMS server by default, but can also be
+used with local NetDRMS sites.")
+ (license license:bsd-2)))
+
(define-public python-ephem
(package
(name "python-ephem")
--
2.38.0
S
S
Sharlatan Hellseher wrote on 24 Nov 2022 12:24
[PATCH 2/5] gnu: Add python-mpl-animators.
(address . 59542@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20221124112441.22965-2-sharlatanus@gmail.com
* gnu/packages/astronomy.scm (python-mpl-animators): New variable.
---
gnu/packages/astronomy.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 4ae2e1caa2..81a051b537 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -1202,6 +1202,32 @@ (define-public python-ephem
of dates.")
(license license:expat)))
+(define-public python-mpl-animators
+ (package
+ (name "python-mpl-animators")
+ (version "1.1.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "mpl_animators" version))
+ (sha256
+ (base32 "12kjmj7rn3pk9ly82h5s5hn0kl3kxkr7bgkz9zr9k59pir8z1r8b"))))
+ (build-system pyproject-build-system)
+ (native-inputs
+ (list python-pytest
+ python-pytest-mpl
+ python-setuptools-scm))
+ (propagated-inputs
+ (list python-astropy
+ python-matplotlib
+ python-numpy))
+ (home-page "https://sunpy.org")
+ (synopsis "Interactive animations with matplotlib")
+ (description
+ "The @code{mpl_animators} package provides a set of classes which allow the
+easy construction of interactive matplotlib widget based animations.")
+ (license license:bsd-3)))
+
(define-public python-photutils
(package
(name "python-photutils")
--
2.38.0
S
S
Sharlatan Hellseher wrote on 24 Nov 2022 12:24
[PATCH 3/5] gnu: Add python-hvpy.
(address . 59542@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20221124112441.22965-3-sharlatanus@gmail.com
* gnu/packages/astronomy.scm (python-hvpy): New variable.
---
gnu/packages/astronomy.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 81a051b537..eb3b1f01b9 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -1202,6 +1202,27 @@ (define-public python-ephem
of dates.")
(license license:expat)))
+(define-public python-hvpy
+ (package
+ (name "python-hvpy")
+ (version "1.0.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "hvpy" version))
+ (sha256
+ (base32 "0r0asyflz2sw9zn5vgs138nh81m0rbwbakmrncbc1ghdr3g6jahv"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list #:tests? #f)) ; Requires HTTP(S) access to api.beta.helioviewer.org
+ (propagated-inputs (list python-pydantic python-requests))
+ (native-inputs (list python-pytest python-pytest-astropy))
+ (home-page "https://helioviewer.org/")
+ (synopsis "Helioviewer Python API Wrapper")
+ (description "@code{hvpy} is a Python API wrapper around the formal @url{Helioviewer API,
+https://api.helioviewer.org/docs/v2/}.")
+ (license license:bsd-2)))
+
(define-public python-mpl-animators
(package
(name "python-mpl-animators")
--
2.38.0
S
S
Sharlatan Hellseher wrote on 24 Nov 2022 12:24
[PATCH 4/5] gnu: Add python-reproject.
(address . 59542@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20221124112441.22965-4-sharlatanus@gmail.com
* gnu/packages/astronomy.scm (python-reproject): New variable.
---
gnu/packages/astronomy.scm | 56 ++++++++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)

Toggle diff (69 lines)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index eb3b1f01b9..26d036a0be 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -1355,6 +1355,62 @@ (define-public python-regions
(description "Regions is an Astropy package for region handling.")
(license license:bsd-3)))
+(define-public python-reproject
+ (package
+ (name "python-reproject")
+ (version "0.9.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "reproject" version))
+ (sha256
+ (base32 "1msysqbhkfi3bmw29wipk250a008bnng7din56md9ipbwiar8x55"))))
+ (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'
+ ;;
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'install 'writable-compiler
+ (lambda _
+ (make-file-writable "reproject/_compiler.c")))
+ (add-before 'check 'writable-compiler
+ (lambda _
+ (make-file-writable "reproject/_compiler.c")))
+ (add-before 'check 'writable-home
+ (lambda _
+ (setenv "HOME" (getcwd)))))))
+ (propagated-inputs
+ (list python-astropy
+ python-astropy-healpix
+ python-numpy
+ python-pytest
+ python-scipy))
+ (native-inputs
+ (list python-asdf
+ python-cython
+ python-extension-helpers
+ python-gwcs
+ python-pytest-astropy
+ python-pyvo
+ python-semantic-version
+ python-setuptools-scm
+ python-shapely))
+ (home-page "https://reproject.readthedocs.io")
+ (synopsis "Astronomical image reprojection in Python")
+ (description
+ "This package provides a functionality to reproject astronomical images using
+various techniques via a uniform interface, where reprojection is the
+re-gridding of images from one world coordinate system to another e.g.
+changing the pixel resolution, orientation, coordinate system.")
+ (license license:bsd-3)))
+
(define-public python-astral
(package
(name "python-astral")
--
2.38.0
S
S
Sharlatan Hellseher wrote on 24 Nov 2022 12:24
[PATCH 5/5] gnu: Add python-sunpy.
(address . 59542@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20221124112441.22965-5-sharlatanus@gmail.com
* gnu/packages/astronomy.scm (python-sunpy): New variable.
---
gnu/packages/astronomy.scm | 85 ++++++++++++++++++++++++++++++++++++++
1 file changed, 85 insertions(+)

Toggle diff (105 lines)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 26d036a0be..dbe5b4c943 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -36,6 +36,7 @@ (define-module (gnu packages astronomy)
#:use-module (gnu packages cmake)
#:use-module (gnu packages compression)
#:use-module (gnu packages curl)
+ #:use-module (gnu packages databases)
#:use-module (gnu packages flex)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages gcc)
@@ -1411,6 +1412,90 @@ (define-public python-reproject
changing the pixel resolution, orientation, coordinate system.")
(license license:bsd-3)))
+(define-public python-sunpy
+ (package
+ (name "python-sunpy")
+ (version "4.0.6")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "sunpy" version))
+ (sha256
+ (base32 "0aiirb6l8zshdrpsvh6d5ki759ah9zfm9gbl0in985hprwwxyrq1"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'install 'writable-compiler
+ (lambda _
+ (make-file-writable "sunpy/_compiler.c")))
+ (add-before 'check 'prepare-test-environment
+ (lambda _
+ (setenv "HOME" "/tmp")
+ (make-file-writable "sunpy/_compiler.c")
+ ;; TODO: (Sharlatan-20221106T115800+0000): Review failing tests
+ (substitute* "sunpy/image/tests/test_transform.py"
+ (("def test_clipping") "def __off_test_clipping")
+ (("def test_nans") "def __off_test_nans")
+ (("def test_endian") "def __off_test_endian"))
+ (substitute* "sunpy/map/tests/test_mapbase.py"
+ (("def test_derotating_nonpurerotation_pcij")
+ "def __off_test_derotating_nonpurerotation_pcij"))
+ (substitute* "sunpy/map/sources/tests/test_mdi_source.py"
+ (("def test_synoptic_source")
+ "def __off_test_synoptic_source"))
+ (substitute* "sunpy/tests/tests/test_self_test.py"
+ (("def test_main_nonexisting_module")
+ "def __off_test_main_nonexisting_module")
+ (("def test_main_stdlib_module")
+ "def __off_test_main_stdlib_module")))))))
+ (native-inputs
+ (list python-aiohttp
+ python-extension-helpers
+ python-hvpy
+ python-packaging
+ python-pytest
+ python-pytest-astropy
+ python-pytest-doctestplus
+ python-pytest-mock
+ python-pytest-mpl
+ python-pytest-xdist
+ python-setuptools-scm))
+ (propagated-inputs
+ (list parfive
+ python-asdf
+ python-asdf-astropy
+ python-astropy
+ python-beautifulsoup4
+ python-cdflib
+ python-dask
+ python-dateutil
+ python-drms
+ python-glymur
+ python-h5netcdf
+ python-h5py
+ python-hypothesis
+ python-jplephem
+ python-matplotlib
+ python-mpl-animators
+ python-numpy
+ ;; python-opencv-python ; not packed yet
+ python-pandas
+ python-reproject
+ python-scikit-image
+ python-scipy
+ python-semantic-version
+ python-sqlalchemy
+ python-tqdm
+ python-zeep))
+ (home-page "https://sunpy.org")
+ (synopsis "Python library for Solar Physics")
+ (description
+ "SunPy is package for solar physics and is meant to be a free alternative to the
+SolarSoft data analysis environment.")
+ (license license:bsd-2)))
+
(define-public python-astral
(package
(name "python-astral")
--
2.38.0
C
C
Christopher Baines wrote on 25 Nov 2022 11:56
Re: [bug#59542] [PATCH 0/5] gnu: Add python-sunpy.
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
877czjz4hi.fsf@cbaines.net
Sharlatan Hellseher <sharlatanus@gmail.com> writes:

Toggle quote (27 lines)
> Hi Guix team!
>
> This is the last set of patches which adding with SunPy - solar data analysis
> environment for Python.
>
> python-opencv is required for tests only which are silent right now, package
> is not presented Guix yet and require a more attention due to complexity.
>
> Build was tested only on x86_64 hardware.
>
>> ./pre-inst-env guix build python-drms python-mpl-animators python-hvpy python-reproject python-sunpy --rounds=2
>> /gnu/store/a4afv7qc124szmfn6z08m1c66m3gpv6m-python-sunpy-4.0.6
>> /gnu/store/brx97jn7k5iixqpgvkbgl4i3kzyvkm3f-python-reproject-0.9.1
>> /gnu/store/f6zbxpvglgq9kj16js2pkw3iy6mmv37m-python-hvpy-1.0.1
>> /gnu/store/i143f9pijxs01v280cq6hr1132nafdza-python-mpl-animators-1.1.0
>> /gnu/store/f2072k95gjjjfrhjk2rzk158hlp6bdv4-python-drms-0.6.3
>
> Sharlatan Hellseher (5):
> gnu: Add python-drms.
> gnu: Add python-mpl-animators.
> gnu: Add python-hvpy.
> gnu: Add python-reproject.
> gnu: Add python-sunpy.
>
> gnu/packages/astronomy.scm | 225 +++++++++++++++++++++++++++++++++++++
> 1 file changed, 225 insertions(+)

Thanks! I fixed a couple lint warnings and pushed to master as
78ee6dcfe13c1561ff1d5cdfc2c2d4fa8afe0883.

Chris
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmOAn4lfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XdRCg/8CatdSIUBkzzJtpEzKxNjjajVzU6ifAXX
x7LaMMJJ+9mmp4w/lYXdTWd+AsThkbcx/rLVSjpCpHBWm1FQVx+ub/1BU3Iz4mQi
ur+yqRE2LvFyKvv5nWXdv+FSeHQaPXXfynstSt9RT6g/YEHoIA66tGjjh0pnIeJZ
wS+vBTEwkQ1b/1wdttmFaeRigHzPlPMV1j54yJg0JhR+h55+OC6W2r6+B2cE98Vv
+4Ay+OqMultINW0v0dpYkK5CuDDaVzxLZETWZXaB31LUr23rsYcKALEQNaM55OVj
HoqjB/rjZiCzoFwaFiUoJIFgSg4iL1VivN19i4Y+GPeYmewJE8WwyOBM3FgrjXiI
akO+CH1RdzCfUcBaSdxiho+Tz//CFu1JtCvun5COMq8aYrv0arCIfBUQsflM4FG2
j+KSupJLa6q2g3shvti4v4NhB9xVMUP+77lUbfehbW0cmuNmUXiP92ZjyydtH+Y6
NOH6XSFsrKgvrBxAiOCGNiDuK/iWt6+pB3cklZmyF8TsYUPFGQr/KJSgVZFY0ZOC
Qv1QyyOpkUT4GiJXQdwBJbQIWXC20DGr0VXcGEIRUXu/WLKNehavAqEQIl5W/knA
j8wubR8edWY1e6eFitt1TkrbrlE9+XKhHenPPD6oSsEM/nwJHnSdmabyS3P/1THp
MEb/2h1E6TQ=
=2dzu
-----END PGP SIGNATURE-----

?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 59542
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