-
Notifications
You must be signed in to change notification settings - Fork 92
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
WIP Rework mne bids path match #1355
base: main
Are you sure you want to change the base?
Conversation
…h are not files. Are there more folders in different datatypes allowed?
Hello! 👋 Thanks for opening your first pull request here! |
pyproject.toml
Outdated
@@ -52,6 +52,7 @@ doc = [ | |||
"numpydoc", | |||
"openneuro-py", | |||
"pandas", | |||
"pathlib", |
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.
it's part of the standard library and doesn't need to be listed here
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.
thx, this comes up though 🤔
/home/circleci/project/mne_bids/path.py:docstring of mne_bids.BIDSPath.root:1: WARNING: py:class reference target not found: pathlib._local.Path [ref.class]
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.
See #1358 (comment) . #1353 includes a work around for this but hasn't been merged yet
412aaef
to
09ba143
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1355 +/- ##
==========================================
+ Coverage 97.43% 97.46% +0.03%
==========================================
Files 40 40
Lines 8966 9009 +43
==========================================
+ Hits 8736 8781 +45
+ Misses 230 228 -2 ☔ View full report in Codecov by Sentry. |
thanks @waldie11! we have a bit of a backlog right now so please don't worry if we take a bit longer to get back to you. |
@sappelhoff happy new year! |
4863705
to
c71a41f
Compare
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.
Hey @waldie11 could you please add an example for the feature that you introduce? Either by modifying an actual example that already exists, or by adding a numpy docstr example below the ones that already exist.
Could you please also resolve the conflicts AND follow the steps for first time contributors here? -->#1354
102eb3d
to
0480497
Compare
12c4f89
to
def6ab2
Compare
Hi @sappelhoff , I think the true meat is rather a rework of
(BIDS v1.8.0-1 p. 214) |
Idk how far you are interested in diving into this: in This benchmark is eating up some CI runtime though. I tried keeping it lightweight. |
66b4e1c
to
824649e
Compare
PR Description
The workflow of using
pathlib.Path.rglob
and subsequently filtering i.e. by each path starting withroot/sub-*
is rather non-performant, especially on polluted storage trees.For starters, by using
glob.glob
recursively directly, it is possible to apply this filter equivalent immediately.In an extension, I am suggesting to introduce the option of
include_match
toget_entity_vals
.Open to suggestions, or stripping this down.
Remark: I failed to join the CI as my email adress is considered work mail for some reason by MS.
Merge checklist
Maintainer, please confirm the following before merging.
If applicable: