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

shapely as a dependency (descartes) #15

Open
espg opened this issue May 13, 2021 · 2 comments
Open

shapely as a dependency (descartes) #15

espg opened this issue May 13, 2021 · 2 comments

Comments

@espg
Copy link
Contributor

espg commented May 13, 2021

I'm working on implementing geojson data structure storage for the ui, and as I'm reading up on the specification, it does look and seem like shapely is very standard in the python ecosystem for dealing with this type of data. We finally got the docker builds working (thanks @fperez !), in part by removing geopandas and shapely, which were causing build problems since descartes wasn't able to build. I think that geopandas is a bit of a dependency mess, and I'm happy to leave it out as a requirement, but shapely does have some obvious use, and a tight build structure. This is shapely's environment list:

dependencies:

  • python==3.6.*
  • geos==3.8.*
  • matplotlib
  • descartes

...all of which are reasonable--except for descartes, which besides breaking our build is marked as broken in several build systems, and is pinned to a static legacy version in their requirements-dev.txt (descartes==1.0.1). Initially, I thought this was referencing this library from descartes-labs, but it appears to be an older matplotlib adjacent library that implements mostly just PolygonPatch ... which as far as I can tell is used as an external import when using shapely.

@whyjz do you know if I'm missing something and this is used elsewhere in shapely? I'm thinking it may be worth a pull request to shapely to remove the dependency from shapely after the EarthCube poster is wrapped up, so we can pull shapely in at some point....

@whyjz
Copy link
Contributor

whyjz commented May 13, 2021

I am going to give a stab at it now, but I actually talked about the descartes dependency issue with the icepyx team (see icesat2py/icepyx#171). So the geopandas team is aware of this issue, and since geopandas is built on shapely, I guess the shapely team is tracking this too. We can still try to open an issue or PR to shapely to see what they actually think!

@espg
Copy link
Contributor Author

espg commented May 13, 2021

@whyjz Honestly, the descartes code is really, really tiny-- 55 lines in one file with a single line __init__, some tests, and a setup.py. Looking at earlier it occurred to me that the correct resolution might be a PR to merge it into matplotlib. All the other shapely and geopandas have it as requirement because they have examples and documentation that uses descartes for plots... but if it was in matplotlib, they could remove the dependency and not change any code (just import calls for examples and documentation)

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

No branches or pull requests

2 participants