From patchwork Sun Jan 28 21:47:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Figiel X-Patchwork-Id: 59542 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 D572127BBEA; Sun, 28 Jan 2024 22:54:31 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 417D127BBE2 for ; Sun, 28 Jan 2024 22:54:31 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rUE2W-0004nD-M7; Sun, 28 Jan 2024 17:54:13 -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 1rUE2F-0004m8-1q for guix-patches@gnu.org; Sun, 28 Jan 2024 17:53:55 -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 1rUE2E-00048H-Py for guix-patches@gnu.org; Sun, 28 Jan 2024 17:53:54 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rUE2M-0004Dy-Hq for guix-patches@gnu.org; Sun, 28 Jan 2024 17:54:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68789] [PATCH 1/2] gnu: Add python-unyt. References: <87il3df4y5.fsf@troyfigiel.com> In-Reply-To: <87il3df4y5.fsf@troyfigiel.com> Resent-From: Troy Figiel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Jan 2024 22:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68789@debbugs.gnu.org Received: via spool by 68789-submit@debbugs.gnu.org id=B68789.170648239016123 (code B ref 68789); Sun, 28 Jan 2024 22:54:02 +0000 Received: (at 68789) by debbugs.gnu.org; 28 Jan 2024 22:53:10 +0000 Received: from localhost ([127.0.0.1]:58571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUE1V-0004Bz-JZ for submit@debbugs.gnu.org; Sun, 28 Jan 2024 17:53:09 -0500 Received: from mout-p-201.mailbox.org ([2001:67c:2050:0:465::201]:38138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUE1S-0004BR-S1 for 68789@debbugs.gnu.org; Sun, 28 Jan 2024 17:53:07 -0500 Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.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-201.mailbox.org (Postfix) with ESMTPS id 4TNRXf4GcLz9scH for <68789@debbugs.gnu.org>; Sun, 28 Jan 2024 23:52:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=troyfigiel.com; s=MBO0001; t=1706482370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=6RbO8vLZoUsKHwGc64guGQCu3/UEVo+HL/aV6+J6zLk=; b=PPNxu7qzprHjVG4Y4EsOxFZwCwYiErmR21xF9A9XJPFxPSv8qgnnoW3uPCsUSBPfPw5fgo 161IAIb6VRGSfhQVo1GHoVX2Jzv8TiAvhgQt3nUVxX02vk3TCiHSx5CWogGbZRRU9ANyf9 lIvvPEtaa8eng5N20wPMlGNamiaEhXPf25/hV0vAShx61awqMnMbeVIdonPkeU1uigmqcl RVSOOWcE4V5EBOdJDAkgU8cROLUst879ePXTDQcZaT9VJktMIL02JhUZtW14r25Esb1wfm +QBUwkCrJdnHqQoqivk9lYAUf96ETvTu02mODZL8xDnm5MfxB1CDYZITwXlXkw== From: Troy Figiel Date: Sun, 28 Jan 2024 22:47:17 +0100 Message-ID: <87h6ixf4u6.fsf@troyfigiel.com> MIME-Version: 1.0 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/python-science.scm (python-unyt): New variable. --- gnu/packages/python-science.scm | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 9d72608de4..3013c77c34 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -42,6 +42,7 @@ (define-module (gnu packages python-science) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages) + #:use-module (gnu packages astronomy) #:use-module (gnu packages base) #:use-module (gnu packages bioinformatics) #:use-module (gnu packages boost) @@ -1217,6 +1218,34 @@ (define-public python-statannot annotations on an existing boxplots and barplots generated by seaborn.") (license license:expat))) +(define-public python-unyt + (package + (name "python-unyt") + (version "3.0.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "unyt" version)) + (sha256 + (base32 "00900bw24rxgcgwgxp9xlx0l5im96r1n5hn0r3mxvbdgc3lyyq48")))) + (build-system pyproject-build-system) + (propagated-inputs (list python-h5py ;optional import + python-matplotlib ;optional import + python-numpy + python-sympy)) + ;; python-astropy and python-pint are also optional imports, but we do not + ;; propagate them due to their sizes. + (native-inputs (list python-astropy python-pint python-pytest)) + (home-page "https://unyt.readthedocs.io") + (synopsis "Library for working with data that has physical units") + (description + "Writing code that deals with data with physical units can be confusing. +A function might return an array but at least with plain @code{numpy}, there +is no way to easily tell what the units of the data are without somehow +knowing a priori. @code{unyt} handles this problem by providing a subclass of +the @code{ndarray} class in @code{numpy} that is unit aware.") + (license license:bsd-3))) + (define-public python-upsetplot (package (name "python-upsetplot")