mne-tools / mne-bids

MNE-BIDS is a Python package that allows you to read and write BIDS-compatible datasets with the help of MNE-Python.
https://mne.tools/mne-bids/
BSD 3-Clause "New" or "Revised" License
131 stars 86 forks source link

[MRG] _return_root_paths now only looks in subfolders of root starting with 'sub-' #1253

Closed kaare-mikkelsen closed 2 months ago

kaare-mikkelsen commented 4 months ago

PR Description

In relation to this issue: https://github.com/mne-tools/mne-bids/issues/1127

I now submit this pull request. It's a pretty simple solution - after calling root.rglob(pattern), returned paths are filtered such that only those starting with root / 'sub-' are sent on.

This closes #1127

Merge checklist

Maintainer, please confirm the following before merging. If applicable:

welcome[bot] commented 4 months ago

Hello! 👋 Thanks for opening your first pull request here! ❤️ We will try to get back to you soon. 🚴🏽‍♂️

kaare-mikkelsen commented 4 months ago

so, I can see that my commit fails a lot of tests, despite being a very minor change? besides changing the length of line 2444 to be compatible with the style guide, what else should I do?

sappelhoff commented 4 months ago

@kaare-mikkelsen there were some unrelated failures that should now be fixed in main. I have merged these changes into your branch -- let's see how the CI comes back.

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.45%. Comparing base (87eea28) to head (a92016a). Report is 26 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1253 +/- ## ========================================== - Coverage 97.61% 97.45% -0.17% ========================================== Files 40 40 Lines 8685 8687 +2 ========================================== - Hits 8478 8466 -12 - Misses 207 221 +14 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

hoechenberger commented 4 months ago

@sappelhoff We should probably set up the autofix.ci bot to make contributors' lives easier

sappelhoff commented 3 months ago

@kaare-mikkelsen I plan to have a look at this within the next three weeks -- thanks for your patience!

sappelhoff commented 2 months ago

please see #1281, which replaces this PR.