bitextor / bicleaner

Bicleaner is a parallel corpus classifier/cleaner that aims at detecting noisy sentence pairs in a parallel corpus.
GNU General Public License v3.0
150 stars 22 forks source link

Tests don't pass #68

Closed cgr71ii closed 2 years ago

cgr71ii commented 2 years ago

I have run the tests but 1 didn't passed:

============================================================================================ test session starts ============================================================================================
platform linux -- Python 3.8.5, pytest-7.1.1, pluggy-1.0.0
rootdir: /home/cgarcia/Documentos/bicleaner_cgr71ii
collected 0 items / 1 error                                                                                                                                                                                 

================================================================================================== ERRORS ===================================================================================================
_________________________________________________________________________________ ERROR collecting tests/bicleaner_test.py __________________________________________________________________________________
ImportError while importing test module '/home/cgarcia/Documentos/bicleaner_cgr71ii/tests/bicleaner_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../../miniconda3/envs/cython/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
bicleaner_test.py:8: in <module>
    import bicleaner
../../../miniconda3/envs/cython/lib/python3.8/site-packages/bicleaner/__init__.py:12: in <module>
    from .features import *
../../../miniconda3/envs/cython/lib/python3.8/site-packages/bicleaner/features.py:5: in <module>
    import pycld2
E   ModuleNotFoundError: No module named 'pycld2'
========================================================================================== short test summary info ==========================================================================================
ERROR bicleaner_test.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================================================= 1 error in 0.06s ==============================================================================================

The problem seems to be related to pycld2, since it is being imported in file features.py but is not in requirements.txt.

I have installed Bicleaner from last commit

mbanon commented 2 years ago

I have been trying pytesting bicleaner but I've been unable to reproduce your issue, so I guess it was fixed at some point. Closing.

cgr71ii commented 2 years ago

I guess that commit https://github.com/bitextor/bicleaner/commit/fd990c6dc355687dd9716bc71f835cc507999176 was the one which solved it.