Practical steps towards Shapely 2.0
See original GitHub issueTODO before final release:
- update list of contributors again
TODO items for the Shapely / PyGEOS merge:
- Merge packages into a single shapely package:
- Merge the python source code of both packages into a single, minimal working
shapely
package -> https://github.com/Toblerity/Shapely/pull/1237 - Consolidate both
strtree.py
files -> https://github.com/Toblerity/Shapely/pull/1251
- Merge the python source code of both packages into a single, minimal working
- Continuous Integration:
- Update and consolidate the github action workflow for testing -> https://github.com/Toblerity/Shapely/pull/1241
- Update the github action workflow for wheel building / releasing -> https://github.com/Toblerity/Shapely/pull/1253
- Ensure Travis CI is running (after moving to the shapely org?)
- Packaging:
- Consolidate the
setup.py
parameters -> https://github.com/shapely/shapely/pull/1376 - Consolidate pyproject.toml and setup.cfg
- Consolidate MANIFEST.in, ensure sdist/wheel creation is working -> https://github.com/Toblerity/Shapely/pull/1249
- Ensure versioneer is working and has a correct shapely 2.0.0.dev+… version
- Consolidate the
- Tests
- Documentation
- Update docstrings
- Merge the sphinx documentation sources -> https://github.com/shapely/shapely/pull/1377, https://github.com/shapely/shapely/pull/1402
Opening an issue to discuss the more practical aspects of the work on Shapely 2.0 (https://github.com/shapely/shapely-rfc/pull/1/). Changes needed in Shapely 1.8 (deprecations, etc) related to this are tracked in https://github.com/Toblerity/Shapely/issues/932
The general route I am now trying out is to, iteratively, refactor the shapely code in-place. But @caspervdw mentioned at https://github.com/Toblerity/Shapely/issues/782/#issuecomment-592058242 also the option of starting “fresh” (for the code, not for the existing tests and things like that).
For both ways, the work can be done in a separate branch, and then using the normal PR workflow (with PRs targetting that branch). This branch has already been created: https://github.com/Toblerity/Shapely/tree/shapely-2.0 (but is already a bit behind master).
First question: how to keep this branch updated while master is still for 1.8? I would like to propose to initially rebase shapely-2.0
regularly on master. In an initial phase where there is still a lot of activity for 1.8 on master and only few people contribute to the shapely-2.0
branch, this seems easier / cleaner (there are eg also still some things to be merged in master on which we depend for shapely 2.0). Once the development focus shifts more to shapely-2.0, we can use the normal merging strategy already being used for the different branches right now. Does that sound good?
(I can volunteer to do the rebases / fix conflicts 😃)
At some point we should probably move the source code of PyGEOS into Shapely (I would propose to do this in its entirety, and keeping its commit history (for proper attribution), and then clean-up / integrate in subsequent steps). But initially, I am actually already testing some things (eg the Geometry subclasses) with using pygeos as an external package.
cc @sgillies @mwtoews @tomplex @caspervdw
Practical steps (to further fill in while we go, but to keep track of the items we already have/know):
- Remove the functionality deprecated in Shapely 1.8 (https://github.com/Toblerity/Shapely/issues/932)
- Mutability -> PR https://github.com/Toblerity/Shapely/pull/960
- Adapter/proxy classes -> PR https://github.com/Toblerity/Shapely/pull/961
- Ctypes / array interface
- Refactor the Geometry classes as subclasses of pygeos.Geometry -> https://github.com/Toblerity/Shapely/pull/983
- Remove
shapely.geos.lgeos
and its usage (use pygeos where needed instead) -> https://github.com/Toblerity/Shapely/pull/1163 - Move all above changes into the
main
branch (-> https://github.com/Toblerity/Shapely/pull/1211) - Move the source code of PyGEOS into Shapely (-> https://github.com/Toblerity/Shapely/pull/1221)
- …
Issue Analytics
- State:
- Created 3 years ago
- Comments:47 (41 by maintainers)
Top GitHub Comments
Heads up: the first step (merging the pygeos source code and history into this repo) has been done!
This will require lots of follow-up to clean up and consolidate the merged repo (will make a more detailed checklist in the top post), but I started with a first step to get the package working again: https://github.com/Toblerity/Shapely/pull/1237
All of https://github.com/shapely/shapely/pull/1451, https://github.com/shapely/shapely/pull/1391 and https://github.com/shapely/shapely/pull/1426 are merged (as well as the update to require Python >= 3.7), so I am planning to tag a first alpha.