Open baconYao opened 2 months ago
Hi @kissiel and @fernando79513, I noticed that unittest cannot find the module numpy
, may I know how can I solve it?
==================================== ERRORS ====================================
_____________ ERROR collecting checkbox_support/tests/test_psnr.py _____________
ImportError while importing test module '/home/runner/work/checkbox/checkbox/checkbox-support/checkbox_support/tests/test_psnr.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
checkbox_support/tests/test_psnr.py:2: in <module>
import numpy as np
E ModuleNotFoundError: No module named 'numpy'
Hi @kissiel and @fernando79513, I noticed that unittest cannot find the module
numpy
, may I know how can I solve it?==================================== ERRORS ==================================== _____________ ERROR collecting checkbox_support/tests/test_psnr.py _____________ ImportError while importing test module '/home/runner/work/checkbox/checkbox/checkbox-support/checkbox_support/tests/test_psnr.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/importlib/__init__.py:127: in import_module return _bootstrap._gcd_import(name[level:], package, level) checkbox_support/tests/test_psnr.py:2: in <module> import numpy as np E ModuleNotFoundError: No module named 'numpy'
At the moment the numpy module is not installed for checkbox support tests. On the base provider, we are installing opencv in the github runners. This can be done including the dependency on the tox.ini
files.
Regarding if we should include numpy in checkbox-support, its a great point to be made. As @kissiel mentioned, numpy is quite a big library. It takes about 100MB of space, so maybe we should try to avoid including it in checkbox-support
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 43.50%. Comparing base (
ec16636
) to head (92f27db
). Report is 27 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Description
Implement the PSNR algorithm in Checkbox Support by reference the OpenCV official document.
Why I propose this PR?
Resolved issues
N/A
Documentation
OpenCV official document:
Tests