stanfordnlp/dspy

semver dependency error when setting up dev container

Closed this issue · 2 comments

Tests do not run when setting up devcontainer from clean repo clone, due to missing semver dependency.

Steps to reproduce

As per instructions in CONTRIBUTING.md

  1. Clone repo
  2. Select "Dev Containers: Rebuild and Reopen in container"
  3. Ensure poetry interpreter selected
  4. Run pytest

Output:

============================================================================================================================================== test session starts ===============================================================================================================================================
platform linux -- Python 3.9.19, pytest-6.2.5, py-1.11.0, pluggy-1.5.0
rootdir: /workspaces/dspy
plugins: anyio-4.4.0, mock-3.14.0
collected 165 items / 1 error / 1 skipped / 163 selected                                                                                                                                                                                                                                                         

===================================================================================================================================================== ERRORS =====================================================================================================================================================
__________________________________________________________________________________________________________________________________ ERROR collecting build_utils/test_version.py __________________________________________________________________________________________________________________________________
ImportError while importing test module '/workspaces/dspy/build_utils/test_version.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
build_utils/test_version.py:5: in <module>
    import semver
E   ModuleNotFoundError: No module named 'semver'
============================================================================================================================================ short test summary info =============================================================================================================================================
ERROR build_utils/test_version.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
========================================================================================================================================== 1 skipped, 1 error in 9.21s ===========================================================================================================================================

Suggested fix

  • Add semver as a project dev dependency

Proposed fix: #1299

Thank you!