netneurolab / netneurotools

Useful tools from the Network Neuroscience Lab
https://netneurolab.github.io/netneurotools
BSD 3-Clause "New" or "Revised" License
57 stars 33 forks source link

fix: resolve import error when importing _fetch_files from nilearn #130

Closed NicolasGensollen closed 7 months ago

NicolasGensollen commented 7 months ago

Hi there,

It seems like netneurotools is importing some private utilities from nilearn like _fetch_files. Recently, nilearn made some changes to its structure and moved this utility function from nilearn.datasets.utils into a private nilearn.datasets._utils module (the function was also renamed fetch_files since it is now within a private module). There was no deprecation warnings as this is not part of the nilearn public API.

This is impacting the Clinica project on which I am working (because it depends on Brainstats which depends on netneurotools).

This PR proposes to fix the broken import in a backward compatible way using a simple try/except.

If this solution is acceptable, could you make a patch release soonish such that we can fix this dependency issue on our side.

Many thanks !

ghisvail commented 7 months ago

Closes #132

liuzhenqi77 commented 7 months ago

Thanks a lot for the PR! We will work on fixing some more things and make a release soon.

NicolasGensollen commented 7 months ago

@liuzhenqi77 Great ! Thanks ! 👍

ghisvail commented 7 months ago

Thank you, @liuzhenqi77. Looking forward to a release soon.