Skip to content

Commit

Permalink
MAINT: Test on Windows (hoechenberger#87)
Browse files Browse the repository at this point in the history
The failure in
conda-forge/openneuro-py-feedstock#35 is real,
we need to use `PurePosixPath` rather than `PosixPath` IIRC. But first
let's replicate the failure, then fix (TDD!).
  • Loading branch information
larsoner authored Dec 13, 2022
1 parent ade6d8a commit 5b68d3b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,18 @@ concurrency:

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# python-version: [3.7, 3.8, 3.9]
python-version: [3.7, "3.10"] # min and max supported versions

python-version: ["3.10"] # min and max supported versions
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- python-version: "3.7"
os: ubuntu-latest
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -e {0}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down
6 changes: 3 additions & 3 deletions openneuro/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from difflib import get_close_matches
import hashlib
import asyncio
from pathlib import Path, PosixPath
from pathlib import Path, PurePosixPath
import string
import json
from typing import Optional, Union
Expand Down Expand Up @@ -597,8 +597,8 @@ def _iterate_filenames(
#
# All three of these should traverse `sub-CON001` and its
# subdirectories.
n_parts = len(PosixPath(root).parts)
dir_include = [PosixPath(inc) for inc in include]
n_parts = len(PurePosixPath(root).parts)
dir_include = [PurePosixPath(inc) for inc in include]
dir_include = [ # for stuff like sub-CON001/*
'/'.join(inc.parts[:n_parts] + ('*',))
for inc in dir_include
Expand Down

0 comments on commit 5b68d3b

Please sign in to comment.