OGGM / massbalance-sandbox

New generation of OGGM mass-balance models
BSD 3-Clause "New" or "Revised" License
6 stars 11 forks source link

fixes for pandas deprecated syntax #52

Open bearecinos opened 6 months ago

bearecinos commented 6 months ago

hi @fmaussion and @lilianschuster,

Here is the latest attempt to fix all the pytests.

This commit fixes #50 #48

For one of the test I did a hard change by messing with some tolerances (these two changes test_hydro.py LINE#726 and test_hydro.pyLINES#734-747 needs checking).

I will open a new issue for the tests that are failing but if you pull this with the latest version of oggm:commit#1702 should have only be 3 test failing due to the issues that I listed here #51 :

================================================================================================== short test summary info ==================================================================================================
FAILED MBsandbox/tests/test_mb_modules_oneflowline.py::Test_directobs_hydro10::test_TIModel_monthly - AttributeError: module 'oggm.core.massbalance' has no attribute 'PastMassBalance'
FAILED MBsandbox/tests/test_mb_modules_oneflowline.py::Test_directobs_hydro10::test_loop - oggm.exceptions.InvalidParamsError: there is no gradient available in chosen climatefile, try instead e.g. ERA5_daily or ERA5dr e.
g.oggm.shop.ecmwf.process_ecmwf_data(gd, dataset="ERA5dr")
FAILED MBsandbox/tests/test_mb_modules_oneflowline.py::Test_directobs_hydro10::test_pseudo_daily_N_temp_std_const_from_hist - oggm.exceptions.InvalidParamsError: there is no gradient available in chosen climatefile, try i
nstead e.g. ERA5_daily or ERA5dr e.g.oggm.shop.ecmwf.process_ecmwf_data(gd, dataset="ERA5dr")
==================================================================== 3 failed, 32 passed, 21 skipped, 11 deselected, 5298 warnings in 329.09s (0:05:29) =====================================================================