Open bcbnz opened 2 months ago
Hi @bcbnz thanks for raising the issue and I'm glad you found a way to fix it
indeed we exclude the test data from the pypi distribution because it is about 420Mb in size, while the entire code only is about a few Mb, and we don't want to clutter the package with data that won't be used by most installers
if you have some indications with regards to:
thanks for your feedbacks !
Hi @gmaze
In my case this is for an Arch AUR package which allows Arch users to build a package which can then be installed system-wide by the system package manager. Standard practice for Python packages is to get the source code, build a wheel locally, test it and then generate an Arch package from it. Where possible, I like to use sources from PyPI because (a) they have a checksum of the uploaded file available and (b) GitHub has changed the way they generate archives in the past, which means the checksum changes even if the contents are identical, which breaks packaging. (Note that the current Arch system version of xarray is not compatible with NumPy 2.0 so I am advising users to use a virtual environment if that causes them problems -- for use in developing other projects this should be preferred anyway, but sometimes it is useful to have a system-wide install).
I can think of three options to avoid this issue:
argopy/tests/helpers/mocked_http.py
to check if the data is available, and if not raise a RuntimeError or similar with instructions of how to get the test data to make the problem clear (it took some investigation to figure out what was causing the error in my original report as it is not obvious).Ok I understand better the use case, thanks for the explanation and your propositions !
argopy/tests/helpers/mocked_http.py
to be more verbose in case test_data are missing
I was trying to build a distribution package from the 0.1.16 source tarball on PyPI. Running the tests gave the following error during startup:
Working back through the code, I found the underlying problem was that
argopy/tests/test_data
is not included in the PyPI source tarball. Switching to the tarball that GitHib provides from the 0.1.16 tag works as that includes the test data.