Skip to content

Commit

Permalink
Add a nibabel import pytest work-around (github issue #193)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelzwiers committed Aug 14, 2023
1 parent 505dee3 commit e558982
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bidscoin/plugins/dcm2niix2bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@
from bids_validator import BIDSValidator
from typing import Union
from pathlib import Path
from nibabel.testing import data_path
from bidscoin import bcoin, bids
from bidscoin.utilities import physio
try:
from nibabel.testing import data_path
except ImportError:
from importlib.resources import files # PY38: from importlib_resources import files ???
data_path = files('nibabel')/'tests'/'data'

LOGGER = logging.getLogger(__name__)

Expand Down

0 comments on commit e558982

Please sign in to comment.