Repository navigation
Description
Looks like test suite files are added to list of files which are installed.
Details
+ /usr/bin/python3 -sBm build -w --no-isolation
* Getting build dependencies for wheel...
[numcodecs] setting up Blosc extension
[numcodecs] setting up Zstandard extension
[numcodecs] setting up LZ4 extension
[numcodecs] setting up compat extension
[numcodecs] setting up shuffle extension
[numcodecs] setting up vlen extension
[numcodecs] setting up fletcher32 extension
[numcodecs] setting up jenkins extension
running egg_info
creating numcodecs.egg-info
writing numcodecs.egg-info/PKG-INFO
writing dependency_links to numcodecs.egg-info/dependency_links.txt
writing requirements to numcodecs.egg-info/requires.txt
writing top-level names to numcodecs.egg-info/top_level.txt
writing manifest file 'numcodecs.egg-info/SOURCES.txt'
reading manifest file 'numcodecs.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE.txt'
writing manifest file 'numcodecs.egg-info/SOURCES.txt'
* Building wheel...
[numcodecs] setting up Blosc extension
[numcodecs] setting up Zstandard extension
[numcodecs] setting up LZ4 extension
[numcodecs] setting up compat extension
[numcodecs] setting up shuffle extension
[numcodecs] setting up vlen extension
[numcodecs] setting up fletcher32 extension
[numcodecs] setting up jenkins extension
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-38
creating build/lib.linux-x86_64-cpython-38/numcodecs
copying ./numcodecs/__init__.py -> build/lib.linux-x86_64-cpython-38/numcodecs
copying ./numcodecs/abc.py -> build/lib.linux-x86_64-cpython-38/numcodecs
copying ./numcodecs/astype.py -> build/lib.linux-x86_64-cpython-38/numcodecs
copying ./numcodecs/base64.py -> build/lib.linux-x86_64-cpython-38/numcodecs
copying ./numcodecs/bitround.py -> build/lib.linux-x86_64-cpython-38/numcodecs
copying ./numcodecs/bz2.py -> build/lib.linux-x86_64-cpython-38/numcodecs
copying ./numcodecs/categorize.py -> build/lib.linux-x86_64-cpython-38/numcodecs
copying ./numcodecs/checksum32.py -> build/lib.linux-x86_64-cpython-38/numcodecs
copying ./numcodecs/compat.py -> build/lib.linux-x86_64-cpython-38/numcodecs
copying ./numcodecs/delta.py -> build/lib.linux-x86_64-cpython-38/numcodecs
copying ./numcodecs/fixedscaleoffset.py -> build/lib.linux-x86_64-cpython-38/numcodecs
copying ./numcodecs/gzip.py -> build/lib.linux-x86_64-cpython-38/numcodecs
copying ./numcodecs/json.py -> build/lib.linux-x86_64-cpython-38/numcodecs
copying ./numcodecs/lzma.py -> build/lib.linux-x86_64-cpython-38/numcodecs
copying ./numcodecs/msgpacks.py -> build/lib.linux-x86_64-cpython-38/numcodecs
copying ./numcodecs/ndarray_like.py -> build/lib.linux-x86_64-cpython-38/numcodecs
copying ./numcodecs/packbits.py -> build/lib.linux-x86_64-cpython-38/numcodecs
copying ./numcodecs/pickles.py -> build/lib.linux-x86_64-cpython-38/numcodecs
copying ./numcodecs/quantize.py -> build/lib.linux-x86_64-cpython-38/numcodecs
copying ./numcodecs/registry.py -> build/lib.linux-x86_64-cpython-38/numcodecs
copying ./numcodecs/shuffle.py -> build/lib.linux-x86_64-cpython-38/numcodecs
copying ./numcodecs/zfpy.py -> build/lib.linux-x86_64-cpython-38/numcodecs
copying ./numcodecs/zlib.py -> build/lib.linux-x86_64-cpython-38/numcodecs
copying ./numcodecs/version.py -> build/lib.linux-x86_64-cpython-38/numcodecs
creating build/lib.linux-x86_64-cpython-38/numcodecs/tests <<<<< FROM HERE
copying ./numcodecs/tests/__init__.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/common.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_astype.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_base64.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_bitround.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_bz2.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_categorize.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_checksum32.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_compat.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_delta.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_entrypoints.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_entrypoints_backport.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_fixedscaleoffset.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_fletcher32.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_gzip.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_jenkins.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_json.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_lz4.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_lzma.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_msgpacks.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_ndarray_like.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_packbits.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_pickles.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_quantize.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_registry.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_shuffle.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_vlen_array.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_vlen_bytes.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_vlen_utf8.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_zfpy.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_zlib.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_zstd.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests
copying ./numcodecs/tests/test_blosc.py -> build/lib.linux-x86_64-cpython-38/numcodecs/tests <<<<< TO HERE
running egg_infoEasiest way to sort out out would be move numcodecs/tests/ to tests/
Metadata
Metadata
Assignees
Labels
No labels
Activity
dstansby commentedon May 22, 2024
Is there a good reason to not include them in the installation? For re-packaging on conda-forge it is much easier to test if the tests are part of the package: https://conda-forge.org/docs/maintainer/adding_pkgs/#tests-outside-of-the-package
dstansby commentedon Aug 11, 2024
Since there's no large test data in the test directory, I think having tests as part of the installable resources is fine (and makes life easier for conda-forge), so I'll close this. Thanks for opening though!
kloczek commentedon Aug 12, 2024
Conda works perfectly fine when test suite is in tests/.
d-v-b commentedon Aug 12, 2024
if anyone has the appetite for it, I would suggest moving to
src/numcodecslayout with an external test suite intests. This makes it much easier to ensure proper isolation of the test suite.dstansby commentedon Aug 12, 2024
I checked again for conda, and I didn't realise it was possible to copy a folder outside the package to run tests: https://conda-forge.org/docs/maintainer/adding_pkgs/#copying-test-files
In that case 👍 for this, I will re-open
jakirkham commentedon Apr 11, 2025
Yeah agree with this suggestion
Think the reason sometimes developers opt for including tests in the distribution is that it provides a way for the user who installed the package to test it simply after the fact
For example, NumPy supplies
numpy.test(), which lets the end user install and run the tests on the installed packageThat said, in a world where most users are getting prebuilt binaries and package builders are often running the test suite, this is not as necessary as it was when most users installed from source
Even in the case of building from source, a user has the tests available in the source artifact they used to build from
Mostly what I see is users run into subtle problems due to the structure of nesting tests within the source code. Like discovery or
importissues of the sort it seems you have run into. Unpicking them is tricky and may involve others help to unpick. This erodes a lot of the value of including tests within the source code in my viewSo yeah agree it would be good to pull the tests out into their own directory and not ship them with the package. We can update the Conda recipe after. Have done the same thing in other projects. Honestly find the test suite more easy to work with in Conda package builds when split out