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

Redefine minimal dependency versions #577

Closed
10 tasks done
veenstrajelmer opened this issue Oct 11, 2023 · 0 comments · Fixed by #581
Closed
10 tasks done

Redefine minimal dependency versions #577

veenstrajelmer opened this issue Oct 11, 2023 · 0 comments · Fixed by #581

Comments

@veenstrajelmer
Copy link
Collaborator

veenstrajelmer commented Oct 11, 2023

Several compatibilty issues have been found with older versions of dependent packages. Update the minimal versions in setup.cfg and requirements.txt to versions that work indeed. A first setup for requirements_minimal.txt is this:

scipy==1.6.0 #pip install fails with scipy<1.6.0 in py39, is also 3 years old
numpy==1.22 #numpy 1.21 is EOL since june 2023
matplotlib==3.7.0 #contour colorbar on uniform values fails with matplotlib<3.7.0, several other features with matplotlib<3.6.0
pandas==1.4.0 #xarray 2023.3.0 requires pandas>=1.4. TODO: if pandas>=2.0.0 is installed, xarray>=2023.3.0 is required
shapely==2.0.0 #shapely<2.0.0 give "AttributeError: module 'shapely' has no attribute 'GeometryType'"
geopandas==0.13.0 #geopandas<0.13.0 require shapely<2.0.0
fiona==1.9 #fiona<1.9 does not contain sql where filter
contextily==1.0.0 #contextily<1.0.0 is from April 2020
xarray==2022.6.0 #xarray<2022.6.0 did not find certain variable in dataset in test_data_map testcase.
dask==2022.6.0 #aligned with xarray, no particular reason
netcdf4==1.5.4 #pip install fails with netcdf4<1.5.4 in py39
bottleneck==1.3.3 #pip install fails with bottleneck<1.3.3 in py39
xugrid==0.6.5 #xugrid 0.6.5 supports wider xarray version range. TODO: xugrid>=0.6.5 requires xarray>=2022.11.0 without explicitly stating this, will be solved in next version (https://github.com/Deltares/xugrid/issues/167)
cdsapi==0.6.1 #cdsapi<0.6.1 is from Feb 2021 and does not support newer python versions
pydap==3.4.0 #pydap<3.4.0 is from May 2017 and does not support newer python versions
pooch==1.1.0 #pooch<1.1.0 do not have attribute retrieve
hydrolib-core==0.5.1 #hydrolib-core<0.5.1 does not yet contain 3D z-sigma mdu settings and many other essentials
meshkernel==2.1.0 #meshkernel<2.1.0 does not yet contain mesh2d_refine_based_on_gridded_samples and other essentials

TODO:

  • add fixed versions behind all libraries (probably only works for py39, since many minimal versions are not pip installable in py311 environment)
  • test lower versions for xarray with xugrid from main
  • test lower versions of scipy, contextily and maybe others
  • pip install -r requirements_minimal.txt
  • pytest -m "not acceptance"
  • Support older xarray versions or require minimal xarray version xugrid#167
  • pytest and create unittest if something fails
  • translate fixed versions to minimal versions for setup.cfg and requirements.txt
  • add github testcase with these minimal versions by replacing >= in requirements.txt with == and installing env from that file.
  • update whatsnew
@veenstrajelmer veenstrajelmer linked a pull request Oct 13, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant