Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Pytests issues: pandas append deprecation #48

Open
bearecinos opened this issue Apr 1, 2024 · 0 comments
Open

Pytests issues: pandas append deprecation #48

bearecinos opened this issue Apr 1, 2024 · 0 comments

Comments

@bearecinos
Copy link
Member

bearecinos commented Apr 1, 2024

@fmaussion @lilianschuster

This is the first post (out of 4 for now) with a list of issues and possible fixes that I've found so far by trying to upgrade the mass-balance sandbox pytests and the notebooks, to be used with the latest OGGM version. We can discuss some of these on the meeting later (I'm just posting so we can keep track of things).

First issue, which sort of kills many of the pytests is the use of .append() on pandas dataframes but seem to be fix by the code below. This results with only 6 failing tests (easier to manage).

As of pandas 2.0, append (previously deprecated) was removed.

replace mbmod_daily_oneflowline.py#L3894

self._mb_debug_container = pd.concat([self._mb_debug_container, pd_out], ignore_index=True)
and

mbmod_daily_oneflowline.py#L4579

self._mb_debug_container = pd.concat([self._mb_debug_container, pd_out], ignore_index=True)

BTW: I tried to put labels but probably Lili might have the correct Repo rights to generate them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant