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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin shapely to >=2.0 #2075

Merged
merged 6 commits into from Jun 20, 2023
Merged

Pin shapely to >=2.0 #2075

merged 6 commits into from Jun 20, 2023

Conversation

valeriupredoi
Copy link
Contributor

@valeriupredoi valeriupredoi commented May 31, 2023

Description

We discussed starting from @zklaus comment and agreed that we should let shapely be modern again; we'd have to fix recipe_shapeselst.yml, as Klaus points out, but we better fix a recipe and have modern dependencies, than the other way round.


Checklist

It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 馃洜 Technical or 馃И Scientific review.


To help with the number pull requests:

@valeriupredoi valeriupredoi added the installation Installation problem label May 31, 2023
@valeriupredoi valeriupredoi added this to the v2.9.0 milestone May 31, 2023
@codecov
Copy link

codecov bot commented May 31, 2023

Codecov Report

Merging #2075 (35a57e4) into main (41f46ab) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #2075   +/-   ##
=======================================
  Coverage   93.08%   93.08%           
=======================================
  Files         237      237           
  Lines       12793    12793           
=======================================
  Hits        11909    11909           
  Misses        884      884           

@bouweandela
Copy link
Member

Why do we need versions larger than 2?

@valeriupredoi
Copy link
Contributor Author

It's not a massively important pin, but 2.0+ has introduced a lot of changes, it's not that <2.0.0 would break stuff AFAIK though. @zklaus suggested it, and in Klaus I trust when it comes to these things 馃榿

@bouweandela
Copy link
Member

I just ran some tests by creating an environment with shapely <2 (I got 1.8.5) and all our unit tests pass, so I would really like to have some better explanation of why we need this before we consider merging this.

@bouweandela
Copy link
Member

The feature freeze for the v2.9 release was yesterday, so I'm removing this from the milestone.

@bouweandela bouweandela removed this from the v2.9.0 milestone Jun 6, 2023
@valeriupredoi
Copy link
Contributor Author

no biggie, man - I think we should be perfectly safe without pinning it for now (remember you made me plop that pytest-json dep in for when an older esmpy gets installed due to an older shapely); so we can always pin if needed; let's just keep an eye on the package build for ESMValTool, there may be an issue, if at all

@valeriupredoi valeriupredoi deleted the unpin_shapely branch June 6, 2023 11:20
@zklaus zklaus restored the unpin_shapely branch June 19, 2023 10:01
@zklaus
Copy link
Contributor

zklaus commented Jun 19, 2023

Shapely 2 comes with a partly new API that facilitates much better performance due to consistent vectorization. This API is already available in version 1.8, which is a transitional version, i.e. API that is being removed in version 2 is merely deprecated in 1.8 and throws deprecation warnings.

Imho, the current situation is slightly dangerous (only slightly because, after all, shapely is not used a lot in our code base). This is because people will likely get version 1.8 and might still use the old API, ignoring the deprecation warnings. When the new version 2 comes in those parts will break. If we pin to >2 now, we will see the breakage and be able to fix it; all further use of shapely will be forced to use only the new API.

@valeriupredoi
Copy link
Contributor Author

@zklaus thanks a lot, man! I wasn't aware of the API evolution in the 2+ versions, but I had a hunch we should go for the modern ones, hence this PR - @bouweandela I'd say we should resurrect this 馃拃

@valeriupredoi valeriupredoi reopened this Jun 19, 2023
Copy link
Member

@bouweandela bouweandela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for explaining! Could you please clean up @valeriupredoi?

.github/workflows/run-tests.yml Outdated Show resolved Hide resolved
valeriupredoi and others added 2 commits June 20, 2023 16:25
Co-authored-by: Bouwe Andela <b.andela@esciencecenter.nl>
@valeriupredoi
Copy link
Contributor Author

just did, monsieur le @bouweandela 馃嵑

@bouweandela bouweandela changed the title Unpin shapely Pin shapely to >=2.0 Jun 20, 2023
@valeriupredoi
Copy link
Contributor Author

Cheers bud 馃嵑

@valeriupredoi valeriupredoi merged commit ac98c69 into main Jun 20, 2023
5 checks passed
@valeriupredoi valeriupredoi deleted the unpin_shapely branch June 20, 2023 16:40
@valeriupredoi
Copy link
Contributor Author

Ha! Merged 2min before getting off the bus, very shapely of me 馃榿

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

Successfully merging this pull request may close these issues.

None yet

3 participants