Closed pmav99 closed 10 months ago
@pmav99 Is this still an issue?
We are still pinning pandas < 2.
I released the constrained, updated the packages and run the tests. They are passing but there are a bunch of FutureWarnings
:
tests/test_dem_fix.py: 8 warnings
tests/test_mesh.py: 4 warnings
tests/test_mesh_global.py: 2 warnings
/home/panos/Prog/poseidon/pyPoseidon/pyposeidon/mjigsaw.py:146: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
npoints = int(grid.loc[2].str.split("=")[0][1])
tests/test_dem_fix.py: 8 warnings
tests/test_mesh.py: 4 warnings
tests/test_mesh_global.py: 2 warnings
/home/panos/Prog/poseidon/pyPoseidon/pyposeidon/mjigsaw.py:154: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
nedges = int(grid.loc[ie].str.split("=")[0][1])
tests/test_dem_fix.py: 8 warnings
tests/test_mesh.py: 4 warnings
tests/test_mesh_global.py: 2 warnings
/home/panos/Prog/poseidon/pyPoseidon/pyposeidon/mjigsaw.py:161: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
ntria = int(grid.loc[i3].str.split("=")[0][1])
tests/test_dem_io.py: 4 warnings
tests/test_execution_control.py: 2 warnings
tests/test_schism_mesh.py: 2 warnings
tests/test_mesh_global.py: 4 warnings
tests/test_update.py: 4 warnings
tests/test_schism.py: 1 warning
/home/panos/Prog/poseidon/pyPoseidon/pyposeidon/mesh.py:232: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
ni, nj = df.iloc[0].str.split()[0]
Do you wanna take a look? You need to upgrade pandas to 2.1 and run the tests.
confirming also for pandas<2, it conflicts when having analysea in the same conda env
Just did it. All tests run fine. creating PR
Actually not that straightforward. I am puzzled that I can't reproduced the errors on the CI though.. On my machine everything was running fine. See #170 for reference
As mentioned by @uturuncoglu here
This is also causing a test to fail when running under pandas 2.0: