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

0.12.1: numcodecs/tests is part of the installable resources #509

Open
kloczek opened this issue Feb 15, 2024 · 5 comments
Open

0.12.1: numcodecs/tests is part of the installable resources #509

kloczek opened this issue Feb 15, 2024 · 5 comments

Comments

@kloczek
Copy link

kloczek commented Feb 15, 2024

Looks like test suite files are added to list of files which are installed.

+ /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_info

Easiest way to sort out out would be move numcodecs/tests/ to tests/

@dstansby
Copy link
Contributor

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
Copy link
Contributor

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!

@dstansby dstansby closed this as not planned Won't fix, can't repro, duplicate, stale Aug 11, 2024
@kloczek
Copy link
Author

kloczek commented Aug 12, 2024

Conda works perfectly fine when test suite is in tests/.

@d-v-b
Copy link
Contributor

d-v-b commented Aug 12, 2024

if anyone has the appetite for it, I would suggest moving to src/numcodecs layout with an external test suite in tests. This makes it much easier to ensure proper isolation of the test suite.

@dstansby
Copy link
Contributor

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

@dstansby dstansby reopened this Aug 12, 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

3 participants