Skip to content

Fix Package Import without Write Access #327

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

Conversation

mmschlk
Copy link
Owner

@mmschlk mmschlk commented Feb 20, 2025

This PR simply wraps the creation of the data folder in a function which will be called upon loading the datasets and not at init time of the package. This means that if the package is installed in environments without write access also possible to import.

Copy link
Collaborator

@pwhofman pwhofman left a comment

Choose a reason for hiding this comment

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

Works on my machine!

@pwhofman pwhofman merged commit 750f7c7 into main Feb 20, 2025
8 checks passed
@pwhofman pwhofman deleted the 326-importing-package-can-break-due-to-an-osmakedirs-on-initialization branch February 20, 2025 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 💣 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Importing package can break due to an os.makedirs on initialization
2 participants