unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Troy Figiel <troy@troyfigiel.com>
To: 68159@debbugs.gnu.org
Subject: [bug#68159] [PATCH] gnu: Add python-camb.
Date: Sun, 31 Dec 2023 00:23:09 +0100	[thread overview]
Message-ID: <8734vjz2j7.fsf@troyfigiel.com> (raw)

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

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index da15283ef3..82643510df 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2023 Iliya Tikhonenko <tikhonenko@mpe.mpg.de>
 ;;; Copyright © 2023 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2023 Simon Tournier <zimon.toutoune@gmail.com>
+;;; Copyright © 2023 Troy Figiel <troy@troyfigiel.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1732,6 +1733,58 @@ (define-public python-bayesicfitting
 Herschel.")
     (license license:gpl3+)))
 
+(define-public python-camb
+  ;; The test outputs that are compared against the outputs of the tests in
+  ;; hmcode_test.py are part of an unreleased git repository.
+  (let* ((url "https://github.com/alexander-mead/HMcode_test_outputs")
+         (commit "03cfe3e8bda9335332cbdbd10785f425b4275820")
+         (hash "15092c96layjzp3k3g7cv5kzs42i7dkgmszhkjhch9hl8rdyhp4d")
+         (test-outputs (origin
+                         (method git-fetch)
+                         (uri (git-reference (url url)
+                                             (commit commit)))
+                         (sha256 (base32 hash)))))
+    (package
+      (name "python-camb")
+      (version "1.5.2")
+      (source
+       (origin
+         (method url-fetch)
+         (uri (pypi-uri "camb" version))
+         (sha256
+          (base32 "1li20qj1qfcg6i9l71ijgd5s2saii5bvszbaq72pn8q7d4q5w29m"))))
+      (build-system python-build-system)
+      (arguments
+       (list
+        #:phases #~(modify-phases %standard-phases
+                     (add-before 'check 'copy-test-outputs
+                       (lambda _
+                         ;; hmcode_test.py expects the test output in the
+                         ;; HMcode_test_outputs directory.
+                         (copy-recursively #$(this-package-native-input
+                                              "test-outputs")
+                                           "HMcode_test_outputs"))))))
+      (propagated-inputs (list python-packaging python-scipy python-sympy))
+      (native-inputs `(("gfortran" ,gfortran)
+                       ;; The which command is used to check whether ifort or
+                       ;; gfortran exist.
+                       ("which" ,which)
+                       ("test-outputs" ,test-outputs)))
+      (home-page "https://camb.info/")
+      (synopsis "Code for Anisotropies in the Microwave Background")
+      (description
+       "@code{python-camb} is a Python package that can be used to calculate
+the cosmic microwave background, lensing, galaxy count, dark-age 21cm power
+spectra, matter power spectra and transfer functions.  There are also general
+utility functions for cosmological calculations such as the background
+expansion and distances.")
+      ;; This package is dual-licensed, because it is also based on the older
+      ;; programs CMBFAST and COSMICS. Notices can be found in the appropriate
+      ;; source files. The original CMBFAST copyright notice can be found in
+      ;; LICENSE.txt. See https://web.mit.edu/edbert/cosmics-1.04.tar.gz for
+      ;; the original COSMICS license.
+      (license (list license:expat license:lgpl3+)))))
+
 (define-public python-casa-formats-io
   (package
     (name "python-casa-formats-io")

base-commit: b8aea26c4f45dfb34deefe980c6d6002d6aa12f3
-- 
2.40.1




             reply	other threads:[~2023-12-30 23:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-30 23:23 Troy Figiel [this message]
2023-12-30 23:49 ` [bug#68159] (no subject) Troy Figiel
2024-01-16 18:56 ` [bug#68159] [PATCH] gnu: Add python-camb Sharlatan Hellseher
2024-01-16 19:09   ` Sharlatan Hellseher
2024-01-17 15:19     ` Simon Tournier
2024-01-18 11:04       ` Sharlatan Hellseher
2024-01-17 11:14   ` Troy Figiel
2024-01-18 11:42 ` Troy Figiel
2024-01-24 15:07   ` bug#68159: " Maxim Cournoyer
2024-01-21 10:42 ` [bug#68159] " Sharlatan Hellseher
2024-01-21 12:11   ` Troy Figiel
     [not found] <mailman.71232.1705523462.1170.guix-patches@gnu.org>
2024-01-17 23:04 ` Troy Figiel
2024-01-18 10:45   ` Simon Tournier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8734vjz2j7.fsf@troyfigiel.com \
    --to=troy@troyfigiel.com \
    --cc=68159@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).