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: Don't import optional deps at the top-level #167

Merged
merged 6 commits into from
Sep 3, 2024

Conversation

scott-huberty
Copy link
Member

#138 imported openneuro at the top of the datasets module, but openneuro-py is not a hard dependency of pylossless.

This PR creates a soft import function that gets called only if/when a user calls the function in pylossless.datasets that needs openneuro-py, and raises an informative error if they don't have it installed.

This will likely become handy if we need to do similar soft imports in the future.

@scott-huberty
Copy link
Member Author

Waiting for #168 to land, then CI's should be happy..

This removes the WIP test for a simpler approach, first step of the CI after installing the hard deps is to import pylossless
@scott-huberty scott-huberty merged commit 5f2c341 into lina-usc:main Sep 3, 2024
3 checks passed
@scott-huberty scott-huberty deleted the soft_import branch September 3, 2024 16:19
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.

1 participant