Skip to content

Enable remote data downloading#142

Open
kaitj wants to merge 8 commits into
mainfrom
enh/remote-data
Open

Enable remote data downloading#142
kaitj wants to merge 8 commits into
mainfrom
enh/remote-data

Conversation

@kaitj
Copy link
Copy Markdown
Contributor

@kaitj kaitj commented May 8, 2026

This PR adds the ability to download data from OSF remote storage and facilitates the ability to add on additional storage locations in the future. This also changes how the data_dir is used, from pointing to where the data is originally stored to the cache directory. This means that:

  1. Any file paths provided in the YAML file are now assumed to be saved at the location provided. There is no longer an assumption that the file is saved in self.data_dir / file_path.
  2. Any data fetched from the remote servers are downloaded to this cache directory and neuromaps will handle this automatically

Data still needs to moved to OSF, would hold off on merging this until we have the data uploaded and / or the graphs updated to absolute paths / uris

Partially addresses #70; still need to move the data

kaitj added 5 commits May 7, 2026 11:52
- Enables fetching from OSF urls; currently want full URLs to be able to handle other storage cases
- Update existing codebase to handle fetching from either remote (if not exist) or local cache
- Update existing tests (new tests to be added)
- Update fetcher docstring to reflect error raised
- Remove unnecessary pytest cli args
- Add new tests for osf fetcher

TODO: Add integration tests for fetching from remote uri's once graph is populated
- Do this in one go rather than one at a time
@kaitj kaitj requested review from jpillai00 and tamsinrogers May 8, 2026 19:24
Comment thread src/neuromaps_prime/fetcher.py Fixed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

Coverage

Coverage Report
FileStmtsMissCoverMissing
neuromaps_prime
   __init__.py00100% 
   fetcher.py190100% 
   niwrap.py560100% 
neuromaps_prime/graph
   __init__.py80100% 
   builder.py112298%329, 397
   cache.py1130100% 
   core.py920100% 
   models.py840100% 
   utils.py530100% 
neuromaps_prime/graph/transforms
   __init__.py00100% 
   surface.py970100% 
   volume.py400100% 
neuromaps_prime/remote
   __init__.py20100% 
   osf.py310100% 
neuromaps_prime/resources
   __init__.py120100% 
neuromaps_prime/transforms
   __init__.py00100% 
   surface.py350100% 
   utils.py290100% 
   volume.py190100% 
TOTAL802299% 

Tests Skipped Failures Errors Time
238 2 💤 0 ❌ 0 🔥 15.930s ⏱️

Comment thread src/neuromaps_prime/fetcher.py Fixed
@kaitj kaitj force-pushed the enh/remote-data branch from ad59a4f to 8172137 Compare May 8, 2026 19:39
Copy link
Copy Markdown
Collaborator

@tamsinrogers tamsinrogers left a comment

Choose a reason for hiding this comment

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

looks great!

- Added human nodes from OG neuromaps sources. Note neuromaps used the method of passing the target as the source and source as the target to perform inverse transformations between the spaces (this is hard-coded in their code). Files were extracted from zipped OSF so singular path could be provided
- Added NCBR resource node with placeholder paths.

- NA: Generate midthickness surfaces in these human spaces as a reference
@kaitj kaitj linked an issue May 28, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resource: Add neuromaps url

3 participants