[ENH]: Unix path expansion directives support for PatternDataGrabber #345

Merged
synchon merged 4 commits from feat/unix-path-expansion-pattern-dg into main 2024-05-22 17:18:14 +00:00
synchon commented 2024-05-21 13:37:38 +00:00 (Migrated from github.com)
  • description of feature/fix
  • tests added/passed
  • add an entry for the latest changes

This PR adds support for specifying Unix path expansion directives like [], [!] for PatternDataGrabber patterns. This is an improvement which is needed for supporting FreeSurfer data type. For example, fsaverage directory is at the same level as subjects like sub-0001 for AOMIC datasets and [!f] allows to not glob the fsaverage directory without overriding get_elements() method. As the .mgz and other outputs of FreeSurfer are not unique by subject (and/or task / session) prefix, globbing doesn't work as usual (at least for the AOMIC datasets). This also enables one to have the pattern: .../T1.mg[z] to make it work.

* [x] description of feature/fix * [x] tests added/passed * [x] add an entry for the latest changes This PR adds support for specifying Unix path expansion directives like `[], [!]` for `PatternDataGrabber` patterns. This is an improvement which is needed for supporting `FreeSurfer` data type. For example, `fsaverage` directory is at the same level as subjects like `sub-0001` for AOMIC datasets and `[!f]` allows to not glob the `fsaverage` directory without overriding `get_elements()` method. As the `.mgz` and other outputs of `FreeSurfer` are not unique by subject (and/or task / session) prefix, globbing doesn't work as usual (at least for the AOMIC datasets). This also enables one to have the pattern: `.../T1.mg[z]` to make it work.
synchon commented 2024-05-21 13:38:48 +00:00 (Migrated from github.com)

Needs to go before #344

Needs to go before #344
codecov[bot] commented 2024-05-21 13:45:12 +00:00 (Migrated from github.com)

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (299b471) to head (f8f2c9f).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #345   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines            1         1           
=========================================
  Hits             1         1           
Flag Coverage Δ
docs 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

## [Codecov](https://app.codecov.io/gh/juaml/junifer/pull/345?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) Report All modified and coverable lines are covered by tests :white_check_mark: > Project coverage is 100.00%. Comparing base [(`299b471`)](https://app.codecov.io/gh/juaml/junifer/commit/299b4710bb8935c90e8154e5ba6a1a1158e41591?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) to head [(`f8f2c9f`)](https://app.codecov.io/gh/juaml/junifer/pull/345?dropdown=coverage&src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml). <details><summary>Additional details and impacted files</summary> [![Impacted file tree graph](https://app.codecov.io/gh/juaml/junifer/pull/345/graphs/tree.svg?width=650&height=150&src=pr&token=5H21JuZXMw&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml)](https://app.codecov.io/gh/juaml/junifer/pull/345?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) ```diff @@ Coverage Diff @@ ## main #345 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 1 1 Lines 1 1 ========================================= Hits 1 1 ``` | [Flag](https://app.codecov.io/gh/juaml/junifer/pull/345/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) | Coverage Δ | | |---|---|---| | [docs](https://app.codecov.io/gh/juaml/junifer/pull/345/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) | `100.00% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#carryforward-flags-in-the-pull-request-comment) to find out more. </details>
github-actions[bot] commented 2024-05-21 13:56:45 +00:00 (Migrated from github.com)
PR Preview Action v1.4.7
Preview removed because the pull request was closed.
2024-05-22 17:37 UTC
[PR Preview Action](https://github.com/rossjrw/pr-preview-action) v1.4.7 :---: Preview removed because the pull request was closed. 2024-05-22 17:37 UTC <!-- Sticky Pull Request Commentpr-preview -->
fraimondo (Migrated from github.com) requested changes 2024-05-22 12:13:59 +00:00
fraimondo (Migrated from github.com) left a comment

Can you also improve the docs to reflect this change?

Can you also improve the docs to reflect this change?
fraimondo (Migrated from github.com) approved these changes 2024-05-22 16:43:58 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
juaml/junifer!345
No description provided.