git: 4960f5d5663d - main - devel/py-confection: Add py-confection 0.1.4
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 21 Feb 2024 15:17:04 UTC
The branch main has been updated by sunpoet:
URL: https://cgit.FreeBSD.org/ports/commit/?id=4960f5d5663d7a769be76afcc2bb1607d9dd82a0
commit 4960f5d5663d7a769be76afcc2bb1607d9dd82a0
Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-02-21 14:12:46 +0000
Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-02-21 15:06:04 +0000
devel/py-confection: Add py-confection 0.1.4
confection is a lightweight library that offers a configuration system letting
you conveniently describe arbitrary trees of objects.
Configuration is a huge challenge for machine-learning code because you may want
to expose almost any detail of any function as a hyperparameter. The setting you
want to expose might be arbitrarily far down in your call stack, so it might
need to pass all the way through the CLI or REST API, through any number of
intermediate functions, affecting the interface of everything along the way. And
then once those settings are added, they become hard to remove later. Default
values also become hard to change without breaking backwards compatibility.
To solve this problem, confection offers a config system that lets you easily
describe arbitrary trees of objects. The objects can be created via function
calls you register using a simple decorator syntax. You can even version the
functions you create, allowing you to make improvements without breaking
backwards compatibility. The most similar config system we're aware of is Gin,
which uses a similar syntax, and also allows you to link the configuration
system to functions in your code using a decorator. confection's config system
is simpler and emphasizes a different workflow via a subset of Gin's
functionality.
---
devel/Makefile | 1 +
devel/py-confection/Makefile | 24 ++++++++++++++++++++++++
devel/py-confection/distinfo | 3 +++
devel/py-confection/pkg-descr | 20 ++++++++++++++++++++
4 files changed, 48 insertions(+)
diff --git a/devel/Makefile b/devel/Makefile
index 645d50f5bb51..63bf5921c4d2 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -4520,6 +4520,7 @@
SUBDIR += py-comm
SUBDIR += py-commandlines
SUBDIR += py-conditional
+ SUBDIR += py-confection
SUBDIR += py-configargparse
SUBDIR += py-configobj
SUBDIR += py-configparser
diff --git a/devel/py-confection/Makefile b/devel/py-confection/Makefile
new file mode 100644
index 000000000000..898256be02cb
--- /dev/null
+++ b/devel/py-confection/Makefile
@@ -0,0 +1,24 @@
+PORTNAME= confection
+PORTVERSION= 0.1.4
+CATEGORIES= devel python
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Sweetest config system for Python
+WWW= https://github.com/explosion/confection
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pydantic2>=1.7.4<3.0.0:devel/py-pydantic2@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}srsly>=2.4.0<3.0.0:devel/py-srsly@${PY_FLAVOR}
+
+USES= python
+USE_PYTHON= autoplist concurrent pep517
+
+NO_ARCH= yes
+
+.include <bsd.port.mk>
diff --git a/devel/py-confection/distinfo b/devel/py-confection/distinfo
new file mode 100644
index 000000000000..9eb5e705dd7c
--- /dev/null
+++ b/devel/py-confection/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1708448816
+SHA256 (confection-0.1.4.tar.gz) = e80f22fd008b5231a2e8852fac6de9e28f2276a04031d0536cff74fe4a990c8f
+SIZE (confection-0.1.4.tar.gz) = 38679
diff --git a/devel/py-confection/pkg-descr b/devel/py-confection/pkg-descr
new file mode 100644
index 000000000000..5d85e5172784
--- /dev/null
+++ b/devel/py-confection/pkg-descr
@@ -0,0 +1,20 @@
+confection is a lightweight library that offers a configuration system letting
+you conveniently describe arbitrary trees of objects.
+
+Configuration is a huge challenge for machine-learning code because you may want
+to expose almost any detail of any function as a hyperparameter. The setting you
+want to expose might be arbitrarily far down in your call stack, so it might
+need to pass all the way through the CLI or REST API, through any number of
+intermediate functions, affecting the interface of everything along the way. And
+then once those settings are added, they become hard to remove later. Default
+values also become hard to change without breaking backwards compatibility.
+
+To solve this problem, confection offers a config system that lets you easily
+describe arbitrary trees of objects. The objects can be created via function
+calls you register using a simple decorator syntax. You can even version the
+functions you create, allowing you to make improvements without breaking
+backwards compatibility. The most similar config system we're aware of is Gin,
+which uses a similar syntax, and also allows you to link the configuration
+system to functions in your code using a decorator. confection's config system
+is simpler and emphasizes a different workflow via a subset of Gin's
+functionality.