From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E5E79158CBB for ; Mon, 8 May 2023 19:32:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 30843E08A6; Mon, 8 May 2023 19:32:00 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F1521E08A6 for ; Mon, 8 May 2023 19:31:59 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 37E7C340B9C for ; Mon, 8 May 2023 19:31:59 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C5409990 for ; Mon, 8 May 2023 19:31:57 +0000 (UTC) From: "Alfredo Tupone" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alfredo Tupone" Message-ID: <1683574293.e2df99959623331aa3710cc48992e783cb9f5985.tupone@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/datasets/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-libs/datasets/files/datasets-2.11.0-tests.patch X-VCS-Directories: sci-libs/datasets/files/ X-VCS-Committer: tupone X-VCS-Committer-Name: Alfredo Tupone X-VCS-Revision: e2df99959623331aa3710cc48992e783cb9f5985 X-VCS-Branch: master Date: Mon, 8 May 2023 19:31:57 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: eff5cd4c-4f98-4e0a-98eb-507e0c57a91f X-Archives-Hash: 93e24bee1870f1cf1cfff0e918658b88 commit: e2df99959623331aa3710cc48992e783cb9f5985 Author: Alfredo Tupone gentoo org> AuthorDate: Mon May 8 19:27:32 2023 +0000 Commit: Alfredo Tupone gentoo org> CommitDate: Mon May 8 19:31:33 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2df9995 sci-libs/datasets: fix librosa import Closes: https://bugs.gentoo.org/905938 Signed-off-by: Alfredo Tupone gentoo.org> .../datasets/files/datasets-2.11.0-tests.patch | 28 ++++++++++++---------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/sci-libs/datasets/files/datasets-2.11.0-tests.patch b/sci-libs/datasets/files/datasets-2.11.0-tests.patch index 01e5d9c70e7b..0bbf200acbd0 100644 --- a/sci-libs/datasets/files/datasets-2.11.0-tests.patch +++ b/sci-libs/datasets/files/datasets-2.11.0-tests.patch @@ -59,7 +59,7 @@ @pytest.mark.parametrize( "build_example", [ -@@ -82,6 +82,7 @@ +@@ -81,6 +82,7 @@ assert decoded_example.keys() == {"path", "array", "sampling_rate"} @@ -75,7 +75,7 @@ @pytest.mark.parametrize("sampling_rate", [16_000, 48_000]) def test_audio_decode_example_pcm(shared_datadir, sampling_rate): audio_path = str(shared_datadir / "test_audio_16000.pcm") -@@ -416,6 +417,7 @@ +@@ -414,6 +417,7 @@ assert column[0]["sampling_rate"] == 16000 @@ -83,7 +83,7 @@ @pytest.mark.parametrize( "build_data", [ -@@ -440,6 +442,7 @@ +@@ -438,6 +442,7 @@ assert item["audio"].keys() == {"path", "array", "sampling_rate"} @@ -91,7 +91,7 @@ def test_dataset_concatenate_audio_features(shared_datadir): # we use a different data structure between 1 and 2 to make sure they are compatible with each other audio_path = str(shared_datadir / "test_audio_44100.wav") -@@ -453,6 +456,7 @@ +@@ -451,6 +456,7 @@ assert concatenated_dataset[1]["audio"]["array"].shape == dset2[0]["audio"]["array"].shape @@ -99,7 +99,7 @@ def test_dataset_concatenate_nested_audio_features(shared_datadir): # we use a different data structure between 1 and 2 to make sure they are compatible with each other audio_path = str(shared_datadir / "test_audio_44100.wav") -@@ -616,6 +616,7 @@ +@@ -610,6 +616,7 @@ assert isinstance(ds, Dataset) @@ -107,7 +107,7 @@ def test_dataset_with_audio_feature_undecoded(shared_datadir): audio_path = str(shared_datadir / "test_audio_44100.wav") data = {"audio": [audio_path]} -@@ -633,6 +634,7 @@ +@@ -627,6 +634,7 @@ assert column[0] == {"path": audio_path, "bytes": None} @@ -115,7 +115,7 @@ def test_formatted_dataset_with_audio_feature_undecoded(shared_datadir): audio_path = str(shared_datadir / "test_audio_44100.wav") data = {"audio": [audio_path]} -@@ -664,6 +666,7 @@ +@@ -658,6 +666,7 @@ assert column[0] == {"path": audio_path, "bytes": None} @@ -135,24 +135,26 @@ wrong_scheme = "ERROR" --- a/tests/packaged_modules/test_audiofolder.py 2023-05-06 14:00:39.560876163 +0200 +++ b/tests/packaged_modules/test_audiofolder.py 2023-05-06 14:01:26.005212423 +0200 -@@ -4,7 +4,6 @@ - import librosa +@@ -1,10 +1,8 @@ + import shutil + import textwrap + +-import librosa import numpy as np import pytest -import soundfile as sf from datasets import Audio, ClassLabel, Features, Value from datasets.data_files import DataFilesDict, get_data_patterns_locally -@@ -191,9 +190,11 @@ - assert len(data_files_with_two_splits_and_metadata["test"]) == 2 +@@ -192,8 +190,11 @@ return data_files_with_two_splits_and_metadata -- + +@pytest.mark.skip(reason="require soundfile") @pytest.fixture def data_files_with_zip_archives(tmp_path, audio_file): + import soundfile as sf -+ ++ import librosa data_dir = tmp_path / "audiofolder_data_dir_with_zip_archives" data_dir.mkdir(parents=True, exist_ok=True) archive_dir = data_dir / "archive"