dask / crick

Streaming and approximate algorithms. WIP, use at own risk.
BSD 3-Clause "New" or "Revised" License
23 stars 17 forks source link

0.0.6: test suite fails with pytest 8.2.1 #51

Open kloczek opened 3 months ago

kloczek commented 3 months ago

I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

Here is pytest output: ```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-crick-0.0.6-2.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-crick-0.0.6-2.fc37.x86_64/usr/lib/python3.10/site-packages + /usr/bin/pytest -ra -m 'not network' --import-mode=importlib ==================================================================================== test session starts ==================================================================================== platform linux -- Python 3.10.14, pytest-8.2.1, pluggy-1.5.0 rootdir: /home/tkloczko/rpmbuild/BUILD/crick-0.0.6 configfile: setup.cfg plugins: vcr-1.0.2 collected 0 items / 3 errors ========================================================================================== ERRORS =========================================================================================== _____________________________________________________________________ ERROR collecting crick/tests/test_space_saving.py _____________________________________________________________________ ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/crick-0.0.6/crick/tests/test_space_saving.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: crick/__init__.py:4: in from .space_saving import SpaceSaving E ModuleNotFoundError: No module named 'crick.space_saving' ________________________________________________________________________ ERROR collecting crick/tests/test_stats.py _________________________________________________________________________ ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/crick-0.0.6/crick/tests/test_stats.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: crick/tests/test_stats.py:7: in from crick import SummaryStats E ImportError: cannot import name 'SummaryStats' from 'crick' (/home/tkloczko/rpmbuild/BUILD/crick-0.0.6/crick/__init__.py) _______________________________________________________________________ ERROR collecting crick/tests/test_tdigest.py ________________________________________________________________________ ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/crick-0.0.6/crick/tests/test_tdigest.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: crick/tests/test_tdigest.py:6: in from crick import TDigest E ImportError: cannot import name 'TDigest' from 'crick' (/home/tkloczko/rpmbuild/BUILD/crick-0.0.6/crick/__init__.py) ================================================================================== short test summary info ================================================================================== ERROR crick/tests/test_space_saving.py ERROR crick/tests/test_stats.py ERROR crick/tests/test_tdigest.py !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 3 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ===================================================================================== 3 errors in 0.24s ===================================================================================== ```
List of installed modules in build env: ```console Package Version ------------------ ----------- build 1.2.1 Cython 3.0.10 exceptiongroup 1.1.3 importlib_metadata 7.1.0 iniconfig 2.0.0 installer 0.7.0 numpy 1.26.4 packaging 24.0 pluggy 1.5.0 pyproject_hooks 1.0.0 pytest 8.2.1 python-dateutil 2.9.0.post0 scipy 1.12.0 setuptools 69.4.0 setuptools-scm 8.1.0 tokenize_rt 5.2.0 tomli 2.0.1 versioneer 0.29 wheel 0.43.0 zipp 3.19.0 ```

Please let me know if you need more details or want me to perform some diagnostics.

j08lue commented 4 weeks ago

Is it intentional that crick is not installed in the build env? Should you not at least pip install -e it?

Why do the tests even run during the build? 🤔