Skip to content
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

[ENH]: Use junifer-data datalad dataset for fetching data #418

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

synchon
Copy link
Member

@synchon synchon commented Jan 8, 2025

  • description of feature/fix
  • tests added/passed
  • add an entry for the latest changes

This PR adapts junifer-data datalad dataset at https://github.com/juaml/junifer-data to provide data for junifer.

Copy link

github-actions bot commented Jan 8, 2025

PR Preview Action v1.6.0

🚀 View preview at
https://juaml.github.io/junifer/pr-preview/pr-418/

Built to branch gh-pages at 2025-01-24 17:22 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@synchon synchon requested a review from fraimondo January 8, 2025 15:23
@synchon synchon added enhancement New feature or request parcellation Issues or pull requests related to parcellations (atlases) coordinate Issues or pull requests related to coordinates (ROIs) mask Issues or pull requests related to masks labels Jan 8, 2025
@synchon synchon added this to the 0.0.6 (alpha 5) milestone Jan 8, 2025
Copy link

codecov bot commented Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.01%. Comparing base (b8459c8) to head (16c1a16).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff           @@
##            main    #418    +/-   ##
======================================
  Coverage   0.01%   0.01%            
======================================
  Files        133     133            
  Lines       5764    5498   -266     
======================================
  Hits           1       1            
+ Misses      5763    5497   -266     
Flag Coverage Δ
docs 100.00% <ø> (ø)

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

Files with missing lines Coverage Δ
junifer/data/coordinates/_coordinates.py 0.00% <ø> (ø)
junifer/data/masks/_masks.py 0.00% <ø> (ø)
junifer/data/parcellations/_parcellations.py 0.00% <ø> (ø)
junifer/data/template_spaces.py 0.00% <ø> (ø)
junifer/data/utils.py 0.00% <ø> (ø)

@@ -114,3 +122,96 @@ def get_native_warper(
)

return possible_warpers[0]


def check_dataset() -> dl.Dataset:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function needs to check that we are also using/cloning the exact junifer data version that we want.

In our last discussion, we said we will have a subdirectory inside the junifer_data with the corresponding version to be used with the currently running junifer version.

So somewhere in junifer code, we will have a JUNIFER_DATA_VERSION variable with a string/number/id.

Then we will look if the directory junifer_data/{JUNIFER_DATA_VERSION} exists, that its a datalad dataset, it's clean and its tag corresponds to JUNIFER_DATA_VERSION.

This way we can keep junifer data for several installed junifer versions, each one consistently using the data.

Copy link
Member Author

@synchon synchon Jan 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is part of that migration and serves to move manual inconsistent asset downloads to using junifer-data via datalad. The idea is to move all dataset validating and data fetching machinery to https://github.com/juaml/junifer-data-client and junifer using its API to fetch data as required using the technique you described. v1.0.0 image of junifer-data is being built and will be published soon.

The next PR will adapt the usage of junifer-data-client API while taking care of versions.

junifer/data/utils.py Outdated Show resolved Hide resolved
@synchon
Copy link
Member Author

synchon commented Jan 24, 2025

Needs to go before #363

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coordinate Issues or pull requests related to coordinates (ROIs) enhancement New feature or request mask Issues or pull requests related to masks parcellation Issues or pull requests related to parcellations (atlases)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants