commit:     ecb6f34ab7657f438408975f7496ac24d3c05dd5
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 27 20:37:29 2025 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Thu Mar 27 20:37:52 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ecb6f34a

sci-ml/datasets: add 3.0.2

Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 sci-ml/datasets/Manifest                         |  1 +
 sci-ml/datasets/datasets-3.0.2.ebuild            | 89 ++++++++++++++++++++++++
 sci-ml/datasets/files/datasets-3.0.2-tests.patch | 10 +++
 3 files changed, 100 insertions(+)

diff --git a/sci-ml/datasets/Manifest b/sci-ml/datasets/Manifest
index 72c3d5ae75fc..e2747acfecc8 100644
--- a/sci-ml/datasets/Manifest
+++ b/sci-ml/datasets/Manifest
@@ -1 +1,2 @@
 DIST datasets-2.21.0.gh.tar.gz 2198480 BLAKE2B 
41a5e82013d26644db4f52b16728cee31c6ff27995b8a9b2ddef1512fcda5e9386e47f6726303fec64d5ed7e40432583a6ddcc2bdfbb76096dce5f23b0540149
 SHA512 
f4193e29505300f98ec026b1ed052ffd3d43ae05a9b191bb56105d703ba2e44752e97c0eeb36dd1b2df6499662915591ab850cdec5248af8c7c5b5a003437c5c
+DIST datasets-3.0.2.gh.tar.gz 1867037 BLAKE2B 
92475ac566bd825c542dbd3e138c83e1733e6d1137f30a2cfd8f82f7dd54ed78c0566aa766182625e8787413be18f5a0c0c0a289b5823fa9112dcb2876074b7e
 SHA512 
aa55dd2f53df7217c30999f759c76a13d78851233bce4df9b1ad85081e101a7280e905822160874d24d15ea1e1a5ecee1bae9cc66785e89af45ad16dd0339595

diff --git a/sci-ml/datasets/datasets-3.0.2.ebuild 
b/sci-ml/datasets/datasets-3.0.2.ebuild
new file mode 100644
index 000000000000..051a56ca8680
--- /dev/null
+++ b/sci-ml/datasets/datasets-3.0.2.ebuild
@@ -0,0 +1,89 @@
+# Copyright 2023-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} )
+DISTUTILS_SINGLE_IMPL=1
+inherit distutils-r1
+
+DESCRIPTION="Access and share datasets for Audio, Computer Vision, and NLP 
tasks"
+HOMEPAGE="https://pypi.org/project/datasets/";
+SRC_URI="https://github.com/huggingface/${PN}/archive/refs/tags/${PV}.tar.gz
+       -> ${P}.gh.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+       ${PYTHON_DEPS}
+       sci-ml/caffe2[${PYTHON_SINGLE_USEDEP},numpy]
+       sci-ml/huggingface_hub[${PYTHON_SINGLE_USEDEP}]
+       sci-ml/pytorch[${PYTHON_SINGLE_USEDEP}]
+       $(python_gen_cond_dep '
+               dev-python/aiohttp[${PYTHON_USEDEP}]
+               dev-python/dill[${PYTHON_USEDEP}]
+               dev-python/filelock[${PYTHON_USEDEP}]
+               dev-python/fsspec[${PYTHON_USEDEP}]
+               dev-python/multiprocess[${PYTHON_USEDEP}]
+               dev-python/numpy[${PYTHON_USEDEP}]
+               dev-python/packaging[${PYTHON_USEDEP}]
+               dev-python/pandas[${PYTHON_USEDEP}]
+               dev-python/pyarrow[${PYTHON_USEDEP},parquet,snappy]
+               dev-python/pyyaml[${PYTHON_USEDEP}]
+               dev-python/requests[${PYTHON_USEDEP}]
+               dev-python/tqdm[${PYTHON_USEDEP}]
+               dev-python/xxhash[${PYTHON_USEDEP}]
+       ')
+"
+DEPEND="${RDEPEND}"
+BDEPEND="test? (
+       sci-ml/torchvision[${PYTHON_SINGLE_USEDEP}]
+       $(python_gen_cond_dep '
+               dev-python/absl-py[${PYTHON_USEDEP}]
+               dev-python/decorator[${PYTHON_USEDEP}]
+               dev-python/pytest-datadir[${PYTHON_USEDEP}]
+               dev-python/scikit-learn[${PYTHON_USEDEP}]
+               dev-python/sqlalchemy[${PYTHON_USEDEP}]
+               dev-python/zstandard[${PYTHON_USEDEP}]
+               sci-ml/jiwer[${PYTHON_USEDEP}]
+               sci-ml/seqeval[${PYTHON_USEDEP}]
+       ')
+)"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-tests.patch
+)
+
+distutils_enable_tests pytest
+
+src_prepare() {
+       distutils-r1_src_prepare
+       sed -i -e \
+               "/pyarrow_hotfix/d" \
+               src/datasets/features/features.py || die
+}
+
+src_test() {
+       local EPYTEST_IGNORE=(
+               tests/features/test_audio.py
+               tests/test_fingerprint.py
+               tests/packaged_modules/test_audiofolder.py
+               tests/packaged_modules/test_spark.py
+               tests/test_iterable_dataset.py
+       )
+
+       local EPYTEST_DESELECT=(
+               tests/packaged_modules/test_cache.py::test_cache_multi_configs
+               tests/packaged_modules/test_cache.py::test_cache_single_config
+               
tests/test_arrow_dataset.py::BaseDatasetTest::test_filter_caching_on_disk
+               
tests/test_arrow_dataset.py::BaseDatasetTest::test_map_caching_on_disk
+               tests/test_distributed.py::test_torch_distributed_run
+               tests/test_file_utils.py::TestxPath::test_xpath_rglob
+               tests/test_file_utils.py::TestxPath::test_xpath_glob
+               tests/test_hub.py::test_convert_to_parquet
+       )
+       distutils-r1_src_test
+}

diff --git a/sci-ml/datasets/files/datasets-3.0.2-tests.patch 
b/sci-ml/datasets/files/datasets-3.0.2-tests.patch
new file mode 100644
index 000000000000..5ff3d6c85c57
--- /dev/null
+++ b/sci-ml/datasets/files/datasets-3.0.2-tests.patch
@@ -0,0 +1,10 @@
+--- a/tests/test_arrow_dataset.py      2024-02-20 21:53:24.248470991 +0100
++++ b/tests/test_arrow_dataset.py      2024-02-20 21:53:29.441804737 +0100
+@@ -4131,7 +4131,6 @@
+     [
+         "relative/path",
+         "/absolute/path",
+-        "s3://bucket/relative/path",
+         "hdfs://relative/path",
+         "hdfs:///absolute/path",
+     ],

Reply via email to