[bug#77190,34/34] gnu: Add python-sunkit-magex.

Message ID 63175a7db584c23e35ada69e929faa3e5415f2bb.1742668052.git.sharlatanus@gmail.com
State New
Headers
Series Astro update 2025/03. |

Commit Message

Sharlatan Hellseher March 22, 2025, 8:29 p.m. UTC
  * gnu/packages/astronomy.scm (python-sunkit-magex): New variable.

Change-Id: I646ec32ffb3b772e8e9136d9afc9e828ca18de39
---
 gnu/packages/astronomy.scm | 57 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)
  

Patch

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index ba697830f6..3540ddc46c 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -7282,6 +7282,63 @@  (define-public python-stwcs
 Telescope, HST}).")
     (license license:bsd-3)))
 
+(define-public python-sunkit-magex
+  (package
+    (name "python-sunkit-magex")
+    (version "1.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "sunkit_magex" version))
+       (sha256
+        (base32 "1jx1nvb6addnsmafq1s0wrxlcpk0p2hcp6b8ldw0q3sz2dzfpcb0"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:test-flags
+      #~(list "-k"
+              (string-join
+               ;; Some issue with presision in this test.
+               (list "not test_adapt_map"
+                     ;; NotImplementedError: is_full_sun_synoptic_map is only
+                     ;; implemented for ['CEA', 'CAR'] projections and not
+                     "test_car_reproject")
+               " and not "))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'check 'pre-check
+            ;; FileNotFoundError: [Errno 2] No such file or directory:
+            ;; '/homeless-shelter/.config'
+            (lambda _
+              (setenv "HOME" "/tmp"))))))
+    (native-inputs
+     (list python-pytest
+           python-pytest-arraydiff
+           python-pytest-doctestplus
+           python-reproject
+           python-setuptools
+           python-setuptools-scm
+           python-streamtracer
+           python-sympy
+           python-wheel))
+    (propagated-inputs
+     (list python-astropy
+           python-numpy
+           python-scikit-image
+           python-scipy
+           python-sunpy))
+    (home-page "https://docs.sunpy.org/projects/sunkit-magex")
+    (synopsis "Solar Magnetic field Extrapolation")
+    (description
+     "This package provides a set of tools for the modelling of magnetic field
+data.  It is a SunPy affiliated package and is built on top of @code{sunpy}
+and @code{astropy}.")
+    ;; This project is Copyright (c) The SunPy Community and licensed under
+    ;; the terms of the GNU GPL v3+ license.  This package is based upon the
+    ;; Openastronomy packaging guide which is licensed under the BSD 3-clause
+    ;; license. See the licenses folder for more information.
+    (license (list license:gpl3+ license:bsd-3))))
+
 (define-public python-tweakwcs
   (package
     (name "python-tweakwcs")