From owner-dev-commits-ports-all@freebsd.org Tue Aug 3 06:10:49 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5AE61631058; Tue, 3 Aug 2021 06:10:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gf4HY1WWkz4n5m; Tue, 3 Aug 2021 06:10:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1D193621B; Tue, 3 Aug 2021 06:10:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1736AnLA083584; Tue, 3 Aug 2021 06:10:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1736AnK3083583; Tue, 3 Aug 2021 06:10:49 GMT (envelope-from git) Date: Tue, 3 Aug 2021 06:10:49 GMT Message-Id: <202108030610.1736AnK3083583@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: 3397fa377137 - main - math/py-unyt: New port: Package for handling numpy arrays with units MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3397fa37713793f0795833aef4b91c639763c5c4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Aug 2021 06:10:49 -0000 The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=3397fa37713793f0795833aef4b91c639763c5c4 commit 3397fa37713793f0795833aef4b91c639763c5c4 Author: Yuri Victorovich AuthorDate: 2021-08-03 05:21:12 +0000 Commit: Yuri Victorovich CommitDate: 2021-08-03 06:10:44 +0000 math/py-unyt: New port: Package for handling numpy arrays with units --- math/Makefile | 1 + math/py-unyt/Makefile | 27 +++++++++++++++++++++++++++ math/py-unyt/distinfo | 3 +++ math/py-unyt/pkg-descr | 11 +++++++++++ 4 files changed, 42 insertions(+) diff --git a/math/Makefile b/math/Makefile index a471c4a52c00..776eb03225bc 100644 --- a/math/Makefile +++ b/math/Makefile @@ -913,6 +913,7 @@ SUBDIR += py-theano SUBDIR += py-triangle SUBDIR += py-uncertainties + SUBDIR += py-unyt SUBDIR += py-vincenty SUBDIR += py-yt SUBDIR += py-z3-solver diff --git a/math/py-unyt/Makefile b/math/py-unyt/Makefile new file mode 100644 index 000000000000..83586c026d0e --- /dev/null +++ b/math/py-unyt/Makefile @@ -0,0 +1,27 @@ +PORTNAME= unyt +DISTVERSION= 2.8.0 +CATEGORIES= math python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Package for handling numpy arrays with units + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +PY_DEPENDS= ${PYNUMPY} \ + ${PYTHON_PKGNAMEPREFIX}sympy>=1.2:math/py-sympy@${PY_FLAVOR} +BUILD_DEPENDS= ${PY_DEPENDS} +RUN_DEPENDS= ${PY_DEPENDS} +TEST_DEPENDS= py.test:devel/py-pytest@${PY_FLAVOR} + +USES= python:3.6+ +USE_PYTHON= distutils autoplist + +NO_ARCH= yes + +do-test: # tests fail: https://github.com/yt-project/unyt/issues/192 + @cd ${WRKSRC} && pytest + +.include diff --git a/math/py-unyt/distinfo b/math/py-unyt/distinfo new file mode 100644 index 000000000000..50a9f891deb1 --- /dev/null +++ b/math/py-unyt/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1627952296 +SHA256 (unyt-2.8.0.tar.gz) = 6a17f849af0ec376fccb111c26b767022189d157d416f0fe5078f31b6b01a22e +SIZE (unyt-2.8.0.tar.gz) = 324621 diff --git a/math/py-unyt/pkg-descr b/math/py-unyt/pkg-descr new file mode 100644 index 000000000000..97d6e313ddd7 --- /dev/null +++ b/math/py-unyt/pkg-descr @@ -0,0 +1,11 @@ +A package for handling numpy arrays with units. + +Often writing code that deals with data that has units can be confusing. +A function might return an array but at least with plain NumPy arrays, there is +no way to easily tell what the units of the data are without somehow knowing a +priori. + +The unyt package (pronounced like "unit") provides a subclass of NumPy's ndarray +class that knows about units. + +WWW: https://github.com/yt-project/unyt