-
Notifications
You must be signed in to change notification settings - Fork 84
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
BUG: Fix API for candidates #1093
Conversation
... can I make |
Codecov Report
@@ Coverage Diff @@
## main #1093 +/- ##
=======================================
Coverage 95.20% 95.21%
=======================================
Files 24 24
Lines 3861 3867 +6
=======================================
+ Hits 3676 3682 +6
Misses 185 185
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Okay I pushed a |
@@ -19,7 +19,7 @@ | |||
BIDSPath, write_raw_bids, read_raw_bids, | |||
write_meg_calibration, write_meg_crosstalk) | |||
from mne_bids.path import (_parse_ext, get_entities_from_fname, | |||
_find_best_candidates, _find_matching_sidecar, | |||
_find_best_candidates, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the private _find_matching_sidecar
calls in this file to use the public interface. There are other places the private function is used like test_write.py
but it doesn't seem necessary to change them all here (code churn / blame obfuscation with little benefit)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems sensible from a top level view, and code changes look clean as well.
thx @larsoner |
PR Description
So in #1083 I added
return_candidates=True
, but this doesn't really solve the use case. The "list all candidates" step needs to be separate from the "traverse and read all candidates", and it's not currently. This PR splits them. Now instead of doing:you do
And the
get_empty_room_candidates
does not read any files, just lists/globs filenames so should be very fast (and negligible I/O overhead).Merge checklist
Maintainer, please confirm the following before merging.
If applicable: