silx icon indicating copy to clipboard operation
silx copied to clipboard

[ExternalResources] Allow to set `_data_home`

Open loichuder opened this issue 1 year ago • 0 comments

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.

loichuder avatar May 30 '24 07:05 loichuder