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

FIX: Move from pkg_resources to niworkflows.data.Loader #1199

Merged
merged 1 commit into from Mar 19, 2024

Conversation

oesteban
Copy link
Member

pkg_resources is deprecated as an API.

@oesteban oesteban merged commit e57973e into master Mar 19, 2024
7 of 9 checks passed
@oesteban oesteban deleted the fix/move-to-loader branch March 19, 2024 14:48
from nireports.assembler.report import Report
from niworkflows.data import Loader

_load_data = Loader(__package__)
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is going to work quite how you want. I'm pretty sure this will load relative to mriqc.reports.individual. I would suggest instead having data/__init__.py define load_data and import from there.

Copy link
Member Author

Choose a reason for hiding this comment

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

would _load_data = Loader("mriqc") work?

Copy link
Member

Choose a reason for hiding this comment

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

Yes.

@oesteban
Copy link
Member Author

oesteban commented Mar 19, 2024 via email

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.

None yet

2 participants