-
Notifications
You must be signed in to change notification settings - Fork 126
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
dire need: BIDSFile helper #452
Comments
... to help parse entities from BIDS filenames, as suggested in nipy#452. It adds one use case (in `get_key_info_for_fmap_assignment`), and the corresponding unit tests. TO DO: RF the code using BIDSFile whenever we need to parse a BIDS filename.
@pvelasco -- ha, I started to RF to address this issue and I see that you have implemented BIDSFile helper already in cbinyu@2886525 etc. So that I neither have to "steal" nor "duplicate" your work, could you please add your code (submit a PR from the top of that branch) to https://github.com/nipy/heudiconv/tree/enh-bids to replace my initial class https://github.com/nipy/heudiconv/blob/enh-bids/heudiconv/bids/schema.py#L18 -- just keep that loading of entities from files (could even make it into a lazy property which would load only after first asked for values). If you have no time, no problem -- let me know. I will "steal" and tune your code then into a PR. |
To be used in https://github.com/nipy/heudiconv/pull/441/files#diff-a48009f9efe6cc64ffdb74d06e831296R370 and in code introduced in #424 (number of locations like https://github.com/nipy/heudiconv/pull/424/files#diff-a48009f9efe6cc64ffdb74d06e831296R284). We need some lightweight (not yet full pybids) parsing of BIDS filenames, so we could
_key-value
pairs),_suffix
, and possibly.extension
(everything after '.`) tune upSo I envision a dict like interface (but probably not a sub-class of dict), alike
d'oh -- got carried away and almost coded it all up... so - as you can see - it should be a simple thing , just a few lines missing + tests ;) but it would provide super-powers at many points in the code ;)
The text was updated successfully, but these errors were encountered: