From patchwork Mon Jan 29 18:16:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Figiel X-Patchwork-Id: 59559 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 A2B0227BBE2; Mon, 29 Jan 2024 18:22:10 +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=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 0D49727BBE9 for ; Mon, 29 Jan 2024 18:22:07 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rUWGb-0001Jb-FY; Mon, 29 Jan 2024 13:21:57 -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 1rUWGY-0001Hy-Ux for guix-patches@gnu.org; Mon, 29 Jan 2024 13:21: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 1rUWGY-00006T-Mx for guix-patches@gnu.org; Mon, 29 Jan 2024 13:21:54 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rUWGg-00013o-Bw for guix-patches@gnu.org; Mon, 29 Jan 2024 13:22: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: Mon, 29 Jan 2024 18:22: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.17065524834015 (code B ref 68789); Mon, 29 Jan 2024 18:22:02 +0000 Received: (at 68789) by debbugs.gnu.org; 29 Jan 2024 18:21:23 +0000 Received: from localhost ([127.0.0.1]:33450 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUWG2-00012h-P9 for submit@debbugs.gnu.org; Mon, 29 Jan 2024 13:21:23 -0500 Received: from mout-p-103.mailbox.org ([2001:67c:2050:0:465::103]:48226) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUWG0-00012Q-G3 for 68789@debbugs.gnu.org; Mon, 29 Jan 2024 13:21:21 -0500 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (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-103.mailbox.org (Postfix) with ESMTPS id 4TNxSb1DWvz9scD for <68789@debbugs.gnu.org>; Mon, 29 Jan 2024 19:21:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=troyfigiel.com; s=MBO0001; t=1706552463; 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=PIYW8LxIl8QzbGA0sFxXlb605vqwqZMbC+C6Wy8sBFQ=; b=dJa3OOwp/EjthR3wpumlMJ58It/4q7r6sfGiR5Jn2Ai4VEwn/JVl1q+AWPcZWWOBtTTiLR xTbCwHSpLvdyOYA1tsMQ5xkJ4Kcbg92KlrXOUwniLP0eNUiBUIutmUrYSn0gIdHveaz2iq VjmZLQMtiSJqKVUcM4LU8CtRtBWBK+WuzMerF/1TawpO4OeDexGKvRv0gIfXXl/VyvAdwI yx9zkYVhLhsrSFYDowC0nnBR00rGTCD1mR0eM9MMsveMNRmTNsuEOlyPvxNCs3M/rxqdaf yNyfNro8jK6kZx/kpLrcdJu59O0rtewIggjOdYpq7SO0ttzgyiLvWJm6dqUqrA== From: Troy Figiel Date: Mon, 29 Jan 2024 19:16:54 +0100 Message-ID: <87cytkf1bl.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 f775d46349..3390b918a4 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -1287,6 +1287,35 @@ (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) + ;; Astropy is an optional import, but we do not include it as it creates a + ;; module cycle: astronomy->python-science->astronomy. + (propagated-inputs (list python-h5py ;optional import + python-matplotlib ;optional import + python-numpy + python-sympy)) + ;; Pint is optional, but we do not propagate it due to its size. + (native-inputs (list 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")