Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

test: fix deepdiff transient dep #638

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

dimaqq
Copy link
Contributor

@dimaqq dimaqq commented Aug 28, 2024

Unit tests failing with

collected 110 items / 2 errors

========================================================================================================================== ERRORS ===========================================================================================================================
___________________________________________________________________________________________________ ERROR collecting tests/unit/test_endpoint_provider.py ___________________________________________________________________________________________________
ImportError while importing test module '/code/prometheus-k8s-operator/tests/unit/test_endpoint_provider.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/opt/homebrew/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/unit/test_endpoint_provider.py:22: in <module>
    from deepdiff import DeepDiff
    black {[vars]all_path}

[testenv:lint]
description = Check code against coding style standards
deps =
    black
    ruff
    codespell
commands =
.tox/unit/lib/python3.12/site-packages/deepdiff/__init__.py:10: in <module>
    from .diff import DeepDiff
.tox/unit/lib/python3.12/site-packages/deepdiff/diff.py:30: in <module>
    from deepdiff.distance import DistanceMixin, logarithmic_similarity
.tox/unit/lib/python3.12/site-packages/deepdiff/distance.py:1: in <module>
    import numpy as np
E   ModuleNotFoundError: No module named 'numpy'
_______________________________________________________________________________________________________ ERROR collecting tests/unit/test_functions.py _______________________________________________________________________________________________________
test: fix deepdiff transient dep
ImportError while importing test module '/code/prometheus-k8s-operator/tests/unit/test_functions.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/opt/homebrew/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/unit/test_functions.py:7: in <module>
    import deepdiff
.tox/unit/lib/python3.12/site-packages/deepdiff/__init__.py:10: in <module>
    from .diff import DeepDiff
.tox/unit/lib/python3.12/site-packages/deepdiff/diff.py:30: in <module>
    from deepdiff.distance import DistanceMixin, logarithmic_similarity
.tox/unit/lib/python3.12/site-packages/deepdiff/distance.py:1: in <module>
    import numpy as np
E   ModuleNotFoundError: No module named 'numpy'
===================================================================================================================== warnings summary ======================================================================================================================

see seperman/deepdiff#478

@dimaqq
Copy link
Contributor Author

dimaqq commented Aug 28, 2024

An alternative would be to ask for deepdiff<8.

@dimaqq dimaqq force-pushed the fix-deepdiff-transient-dep branch from 6d9a45a to 12602d1 Compare August 28, 2024 07:49
@PietroPasotti PietroPasotti merged commit 27025e5 into canonical:main Aug 28, 2024
12 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants