[ENH]: Refactor DataGrabber patterns #341

Merged
synchon merged 17 commits from refactor/dg-patterns into main 2024-05-14 14:47:13 +00:00
synchon commented 2024-05-13 08:03:37 +00:00 (Migrated from github.com)
  • description of feature/fix
  • tests added/passed
  • add an entry for the latest changes

This PR refactors the patterns for DataGrabbers by introducing "nested data types" like mask for particular data type like BOLD instead of BOLD_mask. This cleans up the interface and logically groups the available data while reducing the chances of silly errors like not specifying BOLD_mask in DataGrabber types when mask is desired from the dataset.

* [x] description of feature/fix * [x] tests added/passed * [x] add an entry for the latest changes This PR refactors the `patterns` for DataGrabbers by introducing "nested data types" like `mask` for particular data type like `BOLD` instead of `BOLD_mask`. This cleans up the interface and logically groups the available data while reducing the chances of silly errors like not specifying `BOLD_mask` in DataGrabber `types` when mask is desired from the dataset.
codecov[bot] commented 2024-05-13 08:04:20 +00:00 (Migrated from github.com)

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (416e2f0) to head (08a3025).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #341   +/-   ##
=========================================
  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/341?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 [(`416e2f0`)](https://app.codecov.io/gh/juaml/junifer/commit/416e2f00adca725db1331a4f690677eed872c8b5?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) to head [(`08a3025`)](https://app.codecov.io/gh/juaml/junifer/pull/341?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/341/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/341?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) ```diff @@ Coverage Diff @@ ## main #341 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 1 1 Lines 1 1 ========================================= Hits 1 1 ``` | [Flag](https://app.codecov.io/gh/juaml/junifer/pull/341/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/341/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-13 08:34:57 +00:00 (Migrated from github.com)
PR Preview Action v1.4.7
Preview removed because the pull request was closed.
2024-05-14 15:15 UTC
[PR Preview Action](https://github.com/rossjrw/pr-preview-action) v1.4.7 :---: Preview removed because the pull request was closed. 2024-05-14 15:15 UTC <!-- Sticky Pull Request Commentpr-preview -->
fraimondo (Migrated from github.com) reviewed 2024-05-14 13:05:43 +00:00
@ -180,0 +185,4 @@
to_get.append(v)
# Add nested data type path
if isinstance(v, dict) and "path" in v:
to_get.append(v["path"])
fraimondo (Migrated from github.com) commented 2024-05-14 13:05:43 +00:00

Ok. Only two levels supported for now.

Ok. Only two levels supported for now.
synchon (Migrated from github.com) reviewed 2024-05-14 13:07:23 +00:00
@ -180,0 +185,4 @@
to_get.append(v)
# Add nested data type path
if isinstance(v, dict) and "path" in v:
to_get.append(v["path"])
synchon (Migrated from github.com) commented 2024-05-14 13:07:23 +00:00

Yeah I don't see a case of going further in a while (hopefully wouldn't need to).

Yeah I don't see a case of going further in a while (hopefully wouldn't need to).
fraimondo (Migrated from github.com) approved these changes 2024-05-14 13:12:41 +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!341
No description provided.