Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Work around MNE change #1128

Merged
merged 4 commits into from Mar 22, 2023
Merged

MAINT: Work around MNE change #1128

merged 4 commits into from Mar 22, 2023

Conversation

larsoner
Copy link
Member

Don't use mne.utils.has_nibabel since it's gone as of mne-tools/mne-python#11578. Instead, use the _import_nibabel pattern which gives a nicer traceback (I think) more compactly:

$ python -c "import mne_bids.utils; mne_bids.utils._import_nibabel()"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/larsoner/python/mne-bids/mne_bids/utils.py", line 465, in _import_nibabel
    raise exc.__class__(
ModuleNotFoundError: nibabel is required to work with MRI data but could not be imported, got: No module named 'nibabel'

@sappelhoff
Copy link
Member

Thanks for having an eye on this @larsoner

@codecov
Copy link

codecov bot commented Mar 22, 2023

Codecov Report

Merging #1128 (ca2877d) into main (f053191) will decrease coverage by 0.03%.
The diff coverage is 91.66%.

@@            Coverage Diff             @@
##             main    #1128      +/-   ##
==========================================
- Coverage   95.29%   95.27%   -0.03%     
==========================================
  Files          40       40              
  Lines        8677     8679       +2     
==========================================
  Hits         8269     8269              
- Misses        408      410       +2     
Impacted Files Coverage Δ
mne_bids/utils.py 94.92% <66.66%> (-0.89%) ⬇️
mne_bids/dig.py 98.24% <100.00%> (ø)
mne_bids/read.py 95.80% <100.00%> (ø)
mne_bids/tests/test_read.py 98.47% <100.00%> (-0.01%) ⬇️
mne_bids/tests/test_update.py 100.00% <100.00%> (ø)
mne_bids/tests/test_write.py 90.31% <100.00%> (-0.01%) ⬇️
mne_bids/write.py 97.28% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@larsoner
Copy link
Member Author

All good except codecov which I think we can ignore

@hoechenberger
Copy link
Member

Great, can you add a changelog entry? Something like, "support latest MNE-Python" or so?

@hoechenberger hoechenberger enabled auto-merge (squash) March 22, 2023 19:28
@hoechenberger hoechenberger merged commit ee09799 into mne-tools:main Mar 22, 2023
11 of 13 checks passed
@larsoner larsoner deleted the cis branch March 22, 2023 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants