Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -104,18 +100,18 @@ 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
with:
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
Expand All @@ -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:
Expand All @@ -149,18 +145,18 @@ 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
with:
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
Expand Down
12 changes: 4 additions & 8 deletions tests/test_file_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
Loading