-
Notifications
You must be signed in to change notification settings - Fork 8
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
Geopandas v1.0.0. #162
Geopandas v1.0.0. #162
Conversation
I fixed all the unary_union calls, but we still have this: This is the function that is failing: and this is the error message: I could be wrong, but it seems that the problem is coming from the deprecated io.to_file, used by pyogrio: If that is the case, we might want to wait pyogrio to be updated. |
@felicio93 it doesn't seem like an issue with the deprecated functions. Note that the functions that are deprecated are module functions, but you're using the class methods to write. This looks like an issue related to writing a file vs folder. Maybe in the latest implementation you cannot specify a directory for the output of a geopandas dataframe and instead need to specify a file, or something along those lines. Or maybe we cannot specify an existing as a target for writing geopandas dataframe. Please check different combinations with the latest geopandas locally and see which one fails which one doesn't. I hope this helps |
Yes! you are right. I tested .to_file using the old and new geopandas versions. If the folder already exists and you try to use to_file with just the path to the folder: If the directory does not exist: if you give the the path to the file, both versions will overwrite (or append) as expected. For the test, I will just change it to append mode. That should keep the validity of the test while passing it. |
tests ctor args 4 and 6 mode='a' added to gpd.to_file
Path(tdir)
added / to Path(tdir)
tdir+"/"
I tried multiple things here. And the functions do work as expected for the new versions. in the test we have:
If I hard code the folder path, it works just fine. But for the tempdir it does not. I found this recent issue on pyogrio that seems to be related to this. |
Would it work if you do the following? with tempfile.TemporaryDirectory() as tdir:
shape_path = tdir + "/mysubdir" |
It does on my local! |
tdir + "/mysubdir"
@felicio93 it seems the latest change works ... the issue of one test is that it's using the latest scipy which is not supported on Python 3.9: https://docs.scipy.org/doc/scipy-1.14.0/release/1.14.0-notes.html |
Yes, it is all working now, thanks again Soroosh. I see, what is your recommendation for this one test then? |
I don't know why it tries to install the latest scipy ... I don't have any suggestions, maybe we can drop Py3.9 as well?! But ideally not ... maybe you can try to run the setup locally on py3.9 and see why it fails. You can also ignore that specific test for now and later address it (just create the ticket now) |
Merging this version. Ticket for Run geom build test, python 3.9 FAIL here: #163 |
Updating our scripts use geopandas 1.0.0