From patchwork Sat Dec 30 23:23:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Troy Figiel X-Patchwork-Id: 58228 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E594D27BBE2; Sat, 30 Dec 2023 23:37:22 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7894B27BBE9 for ; Sat, 30 Dec 2023 23:37:21 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJit4-0006uK-0S; Sat, 30 Dec 2023 18:37:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rJit3-0006uB-EC for guix-patches@gnu.org; Sat, 30 Dec 2023 18:37:01 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rJit3-0003sV-69 for guix-patches@gnu.org; Sat, 30 Dec 2023 18:37:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rJit3-00025I-UF for guix-patches@gnu.org; Sat, 30 Dec 2023 18:37:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68159] [PATCH] gnu: Add python-camb. Resent-From: Troy Figiel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 30 Dec 2023 23:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 68159 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68159@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17039794097991 (code B ref -1); Sat, 30 Dec 2023 23:37:01 +0000 Received: (at submit) by debbugs.gnu.org; 30 Dec 2023 23:36:49 +0000 Received: from localhost ([127.0.0.1]:45252 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rJisq-00024p-Rk for submit@debbugs.gnu.org; Sat, 30 Dec 2023 18:36:49 -0500 Received: from lists.gnu.org ([2001:470:142::17]:45666) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rJisn-00024Z-Hs for submit@debbugs.gnu.org; Sat, 30 Dec 2023 18:36:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rJish-0006ta-6t for guix-patches@gnu.org; Sat, 30 Dec 2023 18:36:39 -0500 Received: from mout-p-101.mailbox.org ([2001:67c:2050:0:465::101]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1rJisf-0003js-5g for guix-patches@gnu.org; Sat, 30 Dec 2023 18:36:38 -0500 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4T2dtR1dtSz9sjT for ; Sun, 31 Dec 2023 00:36:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=troyfigiel.com; s=MBO0001; t=1703979391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0sDgaupmS1hD/OmgAs58u8DduKH/KnG/2u9GrihZixo=; b=Rri1hSJulD8Wd99NdkG2T3M0VpdkowirKNKgX41J0Sf/YknEq1qtWoAFvJzhI+GHWQEQ54 LJX/XQg0TKJyl0VfLQhJAx6sy66Wk70Lj8plgFHuJU0G9bOfUPGuioX7vMLE2UVFM8q3Jt 6JmhYX/JKcCfB5g6Bf2kYvhCQZqXNGNjh6dSNDDGXaVTfiRA8ONG1wiedKtQcENbFu+8vy isiBkwbPPLwEx17WIWC+1FsWKcQFAkqYgqgl7qbRzhbqaJiF5pEwVKeKOWgODd2y2PTutr U1ziV/04ZXXPduO/dwKjiiCxrYDt/IQgLhoNFEGVD8vY7LVTyQsTICejsqfaSg== From: Troy Figiel Date: Sun, 31 Dec 2023 00:23:09 +0100 Message-ID: <8734vjz2j7.fsf@troyfigiel.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4T2dtR1dtSz9sjT Received-SPF: pass client-ip=2001:67c:2050:0:465::101; envelope-from=troy@troyfigiel.com; helo=mout-p-101.mailbox.org X-Spam_score_int: -7 X-Spam_score: -0.8 X-Spam_bar: / X-Spam_report: (-0.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URI_DOTEDU=1.997 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/astronomy.scm (python-camb): New variable. --- gnu/packages/astronomy.scm | 53 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) base-commit: b8aea26c4f45dfb34deefe980c6d6002d6aa12f3 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 ;;; Copyright © 2023 Andreas Enge ;;; Copyright © 2023 Simon Tournier +;;; Copyright © 2023 Troy Figiel ;;; ;;; 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")