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

Add sacrebleu and rouge-score as required dependencies #6

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jaalu
Copy link

@jaalu jaalu commented Jul 26, 2024

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?

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

Successfully merging this pull request may close these issues.

1 participant