opensearch-project / opensearch-py-ml

Apache License 2.0
34 stars 63 forks source link

[BUG] `deprecated` library missing from `install_requires` list #315

Closed miguelsousa closed 8 months ago

miguelsousa commented 1 year ago

What is the bug? The deprecated library is used in ml_commons_client.py but opensearch-py-ml doesn't install it by default.

How can one reproduce the bug? Steps to reproduce the behavior:

  1. Install opensearch-py-ml
  2. Use from opensearch_py_ml.ml_commons import MLCommonClient in your code
  3. ModuleNotFoundError happens
    Traceback (most recent call last):
    File "client.py", line 24, in <module>
    from opensearch_py_ml.ml_commons import MLCommonClient
    File "lib/python3.10/site-packages/opensearch_py_ml/ml_commons/__init__.py", line 10, in <module>
    from opensearch_py_ml.ml_commons.ml_commons_client import MLCommonClient
    File "lib/python3.10/site-packages/opensearch_py_ml/ml_commons/ml_commons_client.py", line 13, in <module>
    from deprecated.sphinx import deprecated
    ModuleNotFoundError: No module named 'deprecated'

What is the expected behavior? No crash.

Proposed fix Add deprecated to install_requires in setup.py.

Vinay-Vinod commented 1 year ago

Can I be assigned to this issue?

dhrubo-os commented 1 year ago

Sure, assigning it to you.

wuzhijing0127 commented 1 year ago

Can I be assigned to this issue?

dhrubo-os commented 1 year ago

@wuzhijing0127 this issue is already assigned to @Vinay-Vinod and he also raised a PR. Please ping me if you don't see any other issue. Thanks.