guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: gnu: Add python-astroml.


From: guix-commits
Subject: 01/02: gnu: Add python-astroml.
Date: Mon, 3 Jul 2023 11:46:24 -0400 (EDT)

rekado pushed a commit to branch master
in repository guix.

commit f821c06b676074c37451501e661515020a0a8b9a
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Mon Jul 3 17:43:17 2023 +0200

    gnu: Add python-astroml.
    
    * gnu/packages/astronomy.scm (python-astroml): New variable.
---
 gnu/packages/astronomy.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index cdb6750f09..1dca667ef0 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -55,6 +55,7 @@
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages lua)
+  #:use-module (gnu packages machine-learning)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
@@ -463,6 +464,45 @@ in FITS files.")
     (license (license:non-copyleft "file://License.txt"
                                    "See License.txt in the distribution."))))
 
+(define-public python-astroml
+  (package
+    (name "python-astroml")
+    (version "1.0.2.post1")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "astroML" version))
+              (sha256
+               (base32
+                "14g2mcd5qdr3nn7icvjs84bjvx17l9glx81sbbna6v53i1x8l625"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:test-flags
+      '(list "--ignore-glob=examples/*")
+      #:phases
+      '(modify-phases %standard-phases
+         (add-after 'unpack 'patch-build-system
+           (lambda _
+             (substitute* "setup.cfg"
+               ;; Do not error out on deprecations
+               (("     error::DeprecationWarning.*") "")
+               ;; Do not test examples
+               (("testspaths = astroML doc examples")
+                "testspaths = astroML"))))
+         (add-before 'check 'pre-check
+           ;; Some tests need this
+           (lambda _
+             (setenv "HOME" "/tmp"))))))
+    (propagated-inputs (list python-astropy python-matplotlib python-numpy
+                             python-scikit-learn python-scipy))
+    (native-inputs (list python-pytest-astropy-header python-pytest-cov
+                         python-pytest-doctestplus python-pytest-remotedata))
+    (home-page "https://astroml.org";)
+    (synopsis "Tools for machine learning and data mining in astronomy")
+    (description "This package provides tools for machine learning and data
+mining in astronomy.")
+    (license license:bsd-2)))
+
 (define-public python-fitsio
   (package
     (name "python-fitsio")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]