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

[ExternalResources] Allow to set _data_home #4127

Open
loichuder opened this issue May 30, 2024 · 0 comments
Open

[ExternalResources] Allow to set _data_home #4127

loichuder opened this issue May 30, 2024 · 0 comments
Milestone

Comments

@loichuder
Copy link
Member

loichuder commented May 30, 2024

When using ExternalResources in a pytest test, I want the downloaded data to be put in the tmpdir provided by the pytest fixture.

But so far, there is no way of setting data_home, be it in the constructor of ExternalResources or via a setter, forcing me to do:

silx_resources = ExternalResources(
      PROJECT_NAME, url_base="http://www.silx.org/pub"
  )
silx_resources._data_home = tmpdir

I think adding a way of setting data_home via the constructor is quite sensible. I can do a PR if you agree.

@t20100 t20100 added this to the Next release milestone May 31, 2024
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

No branches or pull requests

2 participants