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

Upgrade shapely to v2.0.1 #655

Closed
Evelyn-M opened this issue Feb 15, 2023 · 4 comments
Closed

Upgrade shapely to v2.0.1 #655

Evelyn-M opened this issue Feb 15, 2023 · 4 comments

Comments

@Evelyn-M
Copy link
Collaborator

Shapely 2.0 is out, which brings many useful functionalities, most importantly the integration of pygeos functionalities (for vectorized operations!). A lot of other packages (such as geopandas etc., may require shapely 2.X in the future, too).
We should check out what other changes this entails, a lot of our operations in climada currently trigger warnings that they will fail under this new version, such as multi-part geometries ceasing to be iterables. A lot of other packages (such as geopandas etc., may require shapely 2.X in the future, too).

We're currently at 1.8, some migration instructions (and updates):
https://shapely.readthedocs.io/en/stable/migration.html

@peanutfun
Copy link
Member

peanutfun commented Feb 16, 2023

We do not restrict the version of shapely ourselves. The packages that require shapely in our dependency tree are geopandas and cartopy. Geopandas >=0.12 supports shapely 2.0, but cartopy does not. We cannot upgrade to shapely 2.0 until a release of cartopy supports it.

@emanuel-schmid
Copy link
Collaborator

Looks like cartopy can deal with it now
conda-forge/cartopy-feedstock@61104dd
SciTools/cartopy#2076

@peanutfun
Copy link
Member

@Evelyn-M Do you want to give this a try? You will have to remove the version pin on Cartopy and build a new conda environment. This should install cartopy v0.21.1, which is compatible with shapely v2.

@peanutfun peanutfun mentioned this issue Apr 4, 2023
13 tasks
@peanutfun
Copy link
Member

After #682, we support shapely v2.0. Upgrading makes sense because it provides a significant performance boost.

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

No branches or pull requests

3 participants