-
Notifications
You must be signed in to change notification settings - Fork 41
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 2.0 compatibility #214
Conversation
Please let me know if I can do anything to help this getting merged. I guess the CI pipeline is broken.
I have applied black and flake8, but I think that it actually ignores the cython stuff. |
@knthls Thanks a lot for helping out!! 🙂 I've been frustratingly busy with my day job, and getting back to pyrosm seem to continuesly get pushed further on my todo-list. 🤷🏻♂️ Hence, all the help with maintaining and developing this further are highly appreciated! 🙏🏻 Indeed it seems that we need to update the tests.yaml workflow which is not up-to-date anymore. I'm quite busy the coming days, so don't have time to fix this until sometime next week, but in case you want to take a look at the CI file, I'd be happy to merge a PR that fixes the pipeline, and after that we can take a closer look at this PR. |
Thanks @knthls for your work! To get the CI fixed, #215 should solve the black/linting issues.
The tz-aware Timestamp issue could be solved by fixing def unix_time_to_datetime(unix_time):
return pd.Timestamp.utcfromtimestamp(unix_time) Regarding The pandanas errors are due to pandana install issues, probably only on my side. |
Thanks @hbruch. I didn't get into this, since I am really busy too.
I will try to get into this as soon as possible. It could really could be that I introduced some errors without noticing, since the only thing that I really changes were the imports. |
I don't think, these are introduced errors. The osm dataset for test_igraph_export_by_driving is not static and hence no assertions on exact number of features should be expected (or instead one of the static Helsinki datasets be used). @HTenkanen wsa there a specific reason, why |
I've been using this branch to make sure it worked and, as mentioned by @hbruch, the errors seem entirely unrelated to that PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A big thanks for these 🙂
The test errors are not related to this PR, so will fix them separately:
|
I have made some modifications to replace PyGEOS with shapely 2.0
PyGEOS was merged with shapely, which is why shapely offers exactly the same API as PyGEOS. I have basically renamed all imports from pygeos to imports from shapely and I have eliminated the additional parts that deal with shapely/pygeos compatibility. My modifications address issues #213 and #208.
I have tested my modifications an verified that they work, given that the environment variable USE_PYGEOS is set to 0.
Please Note that my modifications introduce a hard requirement for shapely 2.0 so it may not be ready to merge, depending on your policy regarding support of older libraries. I still hope that this contribution saves you some time.