Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Aug 2021 06:10:49 GMT
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 3397fa377137 - main - math/py-unyt: New port: Package for handling numpy arrays with units
Message-ID:  <202108030610.1736AnK3083583@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3397fa37713793f0795833aef4b91c639763c5c4

commit 3397fa37713793f0795833aef4b91c639763c5c4
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2021-08-03 05:21:12 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
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 <bsd.port.mk>
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108030610.1736AnK3083583>