silx icon indicating copy to clipboard operation
silx copied to clipboard

[2.1.0] Debian build and how to skip ascent downloading ?

Open picca opened this issue 1 year ago • 3 comments

Hello, while preparing the Debian package of silx.

I have this failure. ''' Downloading file 'ascent.dat' from 'https://raw.githubusercontent.com/scipy/dataset-ascent/main/ascent.dat' to '/builds/science-team/silx/debian/output/source_dir/.pybuild/cpython3_3.11_silx/.cache/scipy-data'. '''

the full log is here.

https://salsa.debian.org/science-team/silx/-/jobs/5622288

is it possible to skip these test easily ?

For security reason, it is not allow to have network connetion during a Debian build.

thanks for your advices.

Fred

picca avatar Apr 21 '24 18:04 picca

Hi,

Here are a couple of options I can come up with:

  • If scipy is not installed, those tests will be skipped (but other tests will also be skipped). Is it easy to do so in the packaging config?

  • Otherwise, is it possible to copy the ascent.dat in the packaging repo and then copy it to /builds/science-team/silx/debian/output/source_dir/.pybuild/cpython3_3.11_silx/.cache/scipy-data/? The pooch package used by scipy would then find it.

  • I don't know what is the usual Debian way, but the scipy packaging could also embed the data files: The cache folder can be changed by patching the following line in scipy: https://github.com/scipy/scipy/blob/c0fa9e36168c24ce6772e054653c82c73e083d56/scipy/datasets/_fetchers.py#L14 That would be a generic way to fix it.

  • Finally, we could also embed the ascent.dat file in silx (it's "public domain"), but that would be for another release.

Let me know what you think of those approaches.

t20100 avatar May 02 '24 08:05 t20100

I will discuss with the scipy/pooch maintainer in order to find a solution to this problem.

thanks a lot

Fred

----- Le 2 Mai 24, à 10:16, Thomas VINCENT @.*** a écrit :

Hi,

Here are a couple of options I can come up with:

  • If scipy is not installed, those tests will be skipped (but other tests will also be skipped). Is it easy to do so in the packaging config?

not that simple since the dependencies are automatically computed from packages installed in the chroot during the build. So I need to install scipy in order to have the correct dependencies. This computation is done via dh-python3.

I can indeed un-activate the test during the build and run them only via the CI... but I prefer to have an early failure during the build in order to avoid uploading a broken package.

  • Otherwise, is it possible to copy the ascent.dat in the packaging repo and then copy it to /builds/science-team/silx/debian/output/source_dir/.pybuild/cpython3_3.11_silx/.cache/scipy-data/? The pooch package used by scipy would then find it.

This doesn not seems a resonable solution, but maybe providing a dedicated package with the data files expected by scipy could, would possible. I do not know the size of these datasets... Debian-science could be the place to discuss about this.

  • I don't know what is the usual Debian way, but the scipy packaging could also embed the data files: The cache folder can be changed by patching the following line in scipy: https://github.com/scipy/scipy/blob/c0fa9e36168c24ce6772e054653c82c73e083d56/scipy/datasets/_fetchers.py#L14 That would be a generic way to fix it.

yes :)

  • Finally, we could also embed the ascent.dat file in silx (it's "public domain"), but that would be for another release.

I think that it is a bad idea :)). :p

I will put this on my TODO list :).

once again. Thanks a lot.

Fred

picca avatar May 02 '24 09:05 picca

  • Finally, we could also embed the ascent.dat file in silx (it's "public domain"), but that would be for another release.

I think that it is a bad idea :)). :p

Fully agreed! That was my last option ;)

once again. Thanks a lot.

You're welcome, and thanks a lot for all the packaging effort!

t20100 avatar May 02 '24 11:05 t20100

I'm closing this issue since it looks to have been fixed in the Debian packaging project: https://salsa.debian.org/science-team/silx/-/commit/31d61a4b6a375f545472c5e2580f6b0889b73ba7

Please reopen if needed

t20100 avatar Jul 08 '24 14:07 t20100