noaa-ocs-modeling / EnsemblePerturbation

perturbation of coupled model input over a space of input variables
https://ensembleperturbation.readthedocs.io
Creative Commons Zero v1.0 Universal
7 stars 3 forks source link

Incompatible with `pandas >= 1.5.0` due to `SettingWithCopyWarning` #89

Closed SorooshMani-NOAA closed 1 year ago

SorooshMani-NOAA commented 2 years ago

Pandas new version has moved the class to a new location, it should be imported as:

from pandas.errors import SettingWithCopyWarning

The error in EnsemblePerturbation:

2022-09-23T13:57:14.885421+00:00  INFO     File "/home/ondemand-user/icogsc/lib/python3.9/site-packages/ensembleperturbation/perturbation/atcf.py", line 22, in <module>
2022-09-23T13:57:14.885463+00:00  INFO     from pandas.core.common import SettingWithCopyWarning
2022-09-23T13:57:14.885506+00:00  INFO     ImportError: cannot import name 'SettingWithCopyWarning' from 'pandas.core.common' (/home/ondemand-user/icogsc/lib/python3.9/site-packages/pandas/core/common.py)

Also check for other incompatibilities After the fix revert https://github.com/noaa-ocs-modeling/EnsemblePerturbation/commit/33141b8c4586c22a6e3923d6f3fff7ed95c4b9b3