string2string
string2string copied to clipboard
Add sacrebleu and rouge-score as required dependencies
Cloning the project, installing dependencies with pip install -r requirements.txt
and running tests with python3 -m pytest
currently fails since sacrebleu
and rouge-score
are not explicitly listed as dependencies:
ImportError while importing test module '/home/jlu/comparestrings/string2string/tests/test_rogue.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_rogue.py:7: in <module>
from string2string.metrics import ROUGE
string2string/metrics/__init__.py:3: in <module>
from .sbleu import sacreBLEU
string2string/metrics/sbleu.py:7: in <module>
from sacrebleu import corpus_bleu
E ModuleNotFoundError: No module named 'sacrebleu'
This PR adds the packages in question as dependencies in setup.py
and requirements.txt
, fixing the tests and solving #4.
Questions:
- Should the version number in
setup.py
be updated? - I've also added
requirements-dev.txt
with frozen package versions where the tests are known to run - which could potentially make it easier to debug breakages due to backwards-incompatible changes in dependencies. Should this file be renamed or included at all?