AlexsLemonade / refinebio

Refine.bio harmonizes petabytes of publicly available biological data into ready-to-use datasets for cancer researchers and AI/ML scientists.
https://www.refine.bio/
Other
128 stars 19 forks source link

Fix test_smasher module 'numpy.random' has no attribute 'Generator' error #3207

Closed arkid15r closed 1 year ago

arkid15r commented 1 year ago

Context

In order to restore staging/prod deploy process CI/CD tests need to be fixed.

Problem or idea

System check identified no issues (0 silenced).
E
======================================================================
ERROR: test_compendia_imports (tests.processors.test_imports.ImportTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/user/tests/processors/test_imports.py", line 53, in test_compendia_imports
    import tests.processors.test_compendia
  File "/home/user/tests/processors/test_compendia.py", line 13, in <module>
    import pandas as pd
  File "/usr/local/lib/python3.8/dist-packages/pandas/__init__.py", line 22, in <module>
    from pandas.compat import is_numpy_dev as _is_numpy_dev  # pyright: ignore # noqa:F401
  File "/usr/local/lib/python3.8/dist-packages/pandas/compat/__init__.py", line 17, in <module>
    from pandas._typing import F
  File "/usr/local/lib/python3.8/dist-packages/pandas/_typing.py", line 132, in <module>
    np.random.Generator,
AttributeError: module 'numpy.random' has no attribute 'Generator'

Solution or next step

Resolve AttributeError exception problem.

arkid15r commented 1 year ago

Resolved in https://github.com/AlexsLemonade/refinebio/pull/3233