diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b66b12cecd0..128266b5e48 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,11 +72,7 @@ jobs: run: uv pip install --system "datasets[tests] @ ." - name: Install dependencies (latest versions) if: ${{ matrix.deps_versions == 'deps-latest' }} - run: | - uv pip install --system --upgrade pyarrow huggingface-hub "dill<0.3.9" - # TODO: remove once transformers v5 / huggingface_hub v1 are released officially - uv pip uninstall --system transformers huggingface_hub - uv pip install --system --prerelease=allow git+https://github.com/huggingface/transformers.git + run: uv pip install --system --upgrade pyarrow huggingface-hub "dill<0.3.9" - name: Install dependencies (minimum versions) if: ${{ matrix.deps_versions != 'deps-latest' }} run: uv pip install --system pyarrow==21.0.0 huggingface-hub==0.25.0 transformers dill==0.3.1.1 @@ -86,7 +82,7 @@ jobs: run: | python -m pytest -rfExX -m ${{ matrix.test }} -n 2 --dist loadfile -sv ./tests/ - test_py311: + test_py312: needs: check_code_quality strategy: matrix: @@ -104,10 +100,10 @@ jobs: run: | sudo apt update sudo apt install -y ffmpeg - - name: Set up Python 3.11 + - name: Set up Python 3.12 uses: actions/setup-python@v5 with: - python-version: "3.11" + python-version: "3.12" - name: Setup conda env (windows) if: ${{ matrix.os == 'windows-latest' }} uses: conda-incubator/setup-miniconda@v2 @@ -115,7 +111,7 @@ jobs: auto-update-conda: true miniconda-version: "latest" activate-environment: test - python-version: "3.11" + python-version: "3.12" - name: Setup FFmpeg (windows) if: ${{ matrix.os == 'windows-latest' }} run: conda install "ffmpeg=7.0.1" -c conda-forge @@ -131,7 +127,7 @@ jobs: run: | python -m pytest -rfExX -m ${{ matrix.test }} -n 2 --dist loadfile -sv ./tests/ - test_py311_numpy2: + test_py312_future: needs: check_code_quality strategy: matrix: @@ -149,10 +145,10 @@ jobs: run: | sudo apt update sudo apt install -y ffmpeg - - name: Set up Python 3.11 + - name: Set up Python 3.12 uses: actions/setup-python@v5 with: - python-version: "3.11" + python-version: "3.12" - name: Setup conda env (windows) if: ${{ matrix.os == 'windows-latest' }} uses: conda-incubator/setup-miniconda@v2 @@ -160,7 +156,7 @@ jobs: auto-update-conda: true miniconda-version: "latest" activate-environment: test - python-version: "3.11" + python-version: "3.12" - name: Setup FFmpeg (windows) if: ${{ matrix.os == 'windows-latest' }} run: conda install "ffmpeg=7.0.1" -c conda-forge diff --git a/tests/test_file_utils.py b/tests/test_file_utils.py index 7f91e237578..675e3c4e564 100644 --- a/tests/test_file_utils.py +++ b/tests/test_file_utils.py @@ -760,12 +760,10 @@ def test_xpath_exists(self, input_path, exists, tmp_path, mock_fsspec2): def test_xpath_glob(self, input_path, pattern, expected_paths, tmp_path, mock_fsspec2): if input_path == "tmp_path": input_path = tmp_path - expected_paths = [tmp_path / file for file in expected_paths] + expected_paths = [str(tmp_path / file) for file in expected_paths] for file in ["file1.txt", "file2.txt", "README.md"]: (tmp_path / file).touch() - else: - expected_paths = [Path(file) for file in expected_paths] - output_paths = sorted(xPath(input_path).glob(pattern)) + output_paths = sorted([str(path) for path in xPath(input_path).glob(pattern)]) assert output_paths == expected_paths @pytest.mark.parametrize( @@ -817,12 +815,10 @@ def test_xpath_rglob(self, input_path, pattern, expected_paths, tmp_path, mock_f input_path = tmp_path dir_path = tmp_path / "dir" dir_path.mkdir() - expected_paths = [dir_path / file for file in expected_paths] + expected_paths = [str(dir_path / file) for file in expected_paths] for file in ["file1.txt", "file2.txt", "README.md"]: (dir_path / file).touch() - else: - expected_paths = [Path(file) for file in expected_paths] - output_paths = sorted(xPath(input_path).rglob(pattern)) + output_paths = sorted([str(path) for path in xPath(input_path).rglob(pattern)]) assert output_paths == expected_paths @pytest.mark.parametrize(