Remove cython code: remove the speedups module + refactor the vectorized module#1036
Merged
jorisvandenbossche merged 4 commits intoshapely:shapely-2.0from Nov 27, 2020
Conversation
| @@ -2803,33 +2803,6 @@ used in many applications and you can expect that all operations are highly | |||
| optimized. The creation of new geometries with many coordinates, however, | |||
| involves some overhead that might slow down your code. | |||
Member
Author
There was a problem hiding this comment.
This section above here will need to be rewritten a bit once the pygeos ufuncs are added to Shapely
mwtoews
reviewed
Nov 24, 2020
| # if testing without numpy explicitly remove it | ||
| - if [ "$NUMPY" == "0" ]; then pip uninstall --yes numpy; fi | ||
| # convert SPEEDUPS to --with-speedups/--without-speedups | ||
| - if [ "$SPEEDUPS" == "1" ]; then SPEEDUPS_FLAG=--with-speedups; else SPEEDUPS_FLAG=--without-speedups; fi |
Member
There was a problem hiding this comment.
We might as well further simplify this configuration to remove all logic handling NUMPY and SPEEDUPS
Member
Author
There was a problem hiding this comment.
Yes, certainly. But since we are probably going to refactor this completely (eg moving to github actions), similarly as we did in pygeos, I would maybe leave further clean-up for that change?
Member
There was a problem hiding this comment.
Sure, that can wait until then. And yes, I was thinking that we may want to refactor the CI setup based on the recent pygeos work.
c6154f3 to
3e08f95
Compare
594be70 to
99ed708
Compare
3e08f95 to
e0d3c53
Compare
99ed708 to
c4ff21a
Compare
Member
Author
|
See #1020 (comment) for failure, will deal with that separately. |
jorisvandenbossche
added a commit
that referenced
this pull request
Nov 27, 2020
jorisvandenbossche
added a commit
to jorisvandenbossche/shapely
that referenced
this pull request
Apr 5, 2021
jorisvandenbossche
added a commit
to jorisvandenbossche/shapely
that referenced
this pull request
Apr 5, 2021
jorisvandenbossche
added a commit
to jorisvandenbossche/shapely
that referenced
this pull request
May 27, 2021
jorisvandenbossche
added a commit
to jorisvandenbossche/shapely
that referenced
this pull request
May 27, 2021
jorisvandenbossche
added a commit
to jorisvandenbossche/shapely
that referenced
this pull request
Aug 20, 2021
jorisvandenbossche
added a commit
that referenced
this pull request
Aug 21, 2021
jorisvandenbossche
added a commit
to jorisvandenbossche/shapely
that referenced
this pull request
Sep 30, 2021
jorisvandenbossche
added a commit
that referenced
this pull request
Oct 27, 2021
jorisvandenbossche
added a commit
that referenced
this pull request
Oct 28, 2021
jorisvandenbossche
added a commit
that referenced
this pull request
Nov 8, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This removes all cython code that is currently present in Shapely (although we are adding cython back as a dependency in PyGEOS and thus later Shapely, but it will be different cython code):
The
shapely.speedupsmodule was no longer used after the refactorings that are already merged. So I removed the code, but kept a compatibility shim for Shapely 2.0, so we can start depecating for people doingshapely.speedups.enable()/disable().(we can't yet do that in Shapely 1.8, because for 1.8 it has an essential meaning that cannot yet be replaced, I think?)
The
shapely.vectorizedmodule is rewritten in a few lines of pygeos code to keep compatibility with the exact function signatures. We should still discuss if we want to keep those long term or want to replace with the new ufuncs, but that is again something that can be done later (we can keep them for an initial Shapely 2.0 release, potentially with deprecation warnings, since there is not yet an alternative in Shapely 1.8)