git: 6310de66509d - main - science/py-penaltymodel: New port: DWave: Utilities and interfaces for using penalty models

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sun, 14 Aug 2022 23:00:21 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6310de66509dd971138bf4c364460a2df83b180c

commit 6310de66509dd971138bf4c364460a2df83b180c
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-08-14 22:13:51 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-08-14 23:00:18 +0000

    science/py-penaltymodel: New port: DWave: Utilities and interfaces for using penalty models
---
 science/Makefile                  |  1 +
 science/py-penaltymodel/Makefile  | 32 ++++++++++++++++++++++++++++++++
 science/py-penaltymodel/distinfo  |  3 +++
 science/py-penaltymodel/pkg-descr |  7 +++++++
 4 files changed, 43 insertions(+)

diff --git a/science/Makefile b/science/Makefile
index 365949ba8278..94401dcf6aec 100644
--- a/science/Makefile
+++ b/science/Makefile
@@ -328,6 +328,7 @@
     SUBDIR += py-openpiv
     SUBDIR += py-paida
     SUBDIR += py-paramz
+    SUBDIR += py-penaltymodel
     SUBDIR += py-phono3py
     SUBDIR += py-phonopy
     SUBDIR += py-pupynere
diff --git a/science/py-penaltymodel/Makefile b/science/py-penaltymodel/Makefile
new file mode 100644
index 000000000000..b3b969eff9dd
--- /dev/null
+++ b/science/py-penaltymodel/Makefile
@@ -0,0 +1,32 @@
+PORTNAME=	penaltymodel
+DISTVERSION=	1.0.2
+CATEGORIES=	science python # quantum-computing
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	DWave: Utilities and interfaces for using penalty models
+
+LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+PY_DEPENDS=	${PYTHON_PKGNAMEPREFIX}dimod>=0.10.10:science/py-dimod@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}homebase>=1.0.1:devel/py-homebase@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}networkx>=2.4:math/py-networkx@${PY_FLAVOR} \
+		${PYNUMPY} \
+		${PYTHON_PKGNAMEPREFIX}reno>0:textproc/py-reno@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}scipy>=1.7.3:science/py-scipy@${PY_FLAVOR}
+BUILD_DEPENDS=	${PY_DEPENDS}
+RUN_DEPENDS=	${PY_DEPENDS}
+
+USES=		python:3.7+
+USE_PYTHON=	distutils cython autoplist unittest
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	dwavesystems
+
+TEST_ENV=	${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+TEST_WRKSRC=	${WRKSRC}/tests
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/science/py-penaltymodel/distinfo b/science/py-penaltymodel/distinfo
new file mode 100644
index 000000000000..7511c7706773
--- /dev/null
+++ b/science/py-penaltymodel/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1660513321
+SHA256 (dwavesystems-penaltymodel-1.0.2_GH0.tar.gz) = 8246ea0cc56e6965719f9c2684ff7bbdf2015f933cecd475ac7dd5028d7803b9
+SIZE (dwavesystems-penaltymodel-1.0.2_GH0.tar.gz) = 37639
diff --git a/science/py-penaltymodel/pkg-descr b/science/py-penaltymodel/pkg-descr
new file mode 100644
index 000000000000..176197dd3829
--- /dev/null
+++ b/science/py-penaltymodel/pkg-descr
@@ -0,0 +1,7 @@
+penaltymodel is a set of utilities and interfaces for using penalty models.
+
+One approach to solve a constraint satisfaction problem (CSP) using an Ising
+model or a QUBO, is to map each individual constraint in the CSP to a 'small'
+Ising model or QUBO. This mapping is called a penalty model.
+
+WWW: https://docs.ocean.dwavesys.com/projects/penaltymodel/en/latest/