Skip to content

CI: Do not use geopandas 0.13.0 in docs #2545

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

Merged
merged 2 commits into from
May 27, 2023
Merged

CI: Do not use geopandas 0.13.0 in docs #2545

merged 2 commits into from
May 27, 2023

Conversation

seisman
Copy link
Member

@seisman seisman commented May 26, 2023

Description of proposed changes

As mentioned in #2536 (comment), our docs CI fail due to changes with the geopandas 0.13.0 release (geopandas/geopandas#2796 (comment)), which is an unexpected regression.

Before the next geopandas patch version is released, we need to skip geopandas 0.13.0 in the docs workflow so that the docs can be correctly built and updated.

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If wrapping a new module, open a 'Wrap new GMT module' issue and submit reasonably-sized PRs.
  • If adding new functionality, add an example to docstrings or tutorials.
  • Use underscores (not hyphens) in names of Python files and directories.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash commands are:

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

@seisman seisman added this to the 0.10.0 milestone May 26, 2023
@seisman seisman added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog needs review This PR has higher priority and needs review. labels May 26, 2023
@seisman seisman requested a review from weiji14 May 26, 2023 15:18
@seisman seisman merged commit 68070fa into main May 27, 2023
@seisman seisman deleted the geopandas branch May 27, 2023 01:17
@seisman seisman removed the needs review This PR has higher priority and needs review. label May 27, 2023
@weiji14
Copy link
Member

weiji14 commented Jun 1, 2023

Upstream issue opened at geopandas/geopandas#2908. For reference, this was the traceback from the readthedocs build failure:

Unexpected failing examples:
/home/docs/checkouts/readthedocs.org/user_builds/pygmt-dev/checkouts/2536/examples/gallery/lines/roads.py failed leaving traceback:
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/pygmt-dev/checkouts/2536/examples/gallery/lines/roads.py", line 16, in <module>
    gdf = gpd.read_file(
          ^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/pygmt-dev/conda/2536/lib/python3.11/site-packages/geopandas/io/file.py", line 248, in _read_file
    return _read_file_fiona(
           ^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/pygmt-dev/conda/2536/lib/python3.11/site-packages/geopandas/io/file.py", line 289, in _read_file_fiona
    with reader(path_or_bytes, **kwargs) as features:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/pygmt-dev/conda/2536/lib/python3.11/site-packages/fiona/env.py", line 457, in wrapper
    return f(*args, **kwds)
           ^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/pygmt-dev/conda/2536/lib/python3.11/site-packages/fiona/__init__.py", line 336, in open
    colxn = Collection(
            ^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/pygmt-dev/conda/2536/lib/python3.11/site-packages/fiona/collection.py", line 243, in __init__
    self.session.start(self, **kwargs)
  File "fiona/ogrext.pyx", line 588, in fiona.ogrext.Session.start
  File "fiona/ogrext.pyx", line 143, in fiona.ogrext.gdal_open_vector
fiona.errors.DriverError: '/vsizip/vsicurl/http://www2.census.gov/geo/tiger/TIGER2015/PRISECROADS/tl_2015_15_prisecroads.zip' does not exist in the file system, and is not recognized as a supported dataset name.

@jorisvandenbossche
Copy link

This is a bit strange: while working on fixing the mentioned issue, this specific URL actually does work for me with geopandas 0.13.0:

In [3]: geopandas.read_file("http://www2.census.gov/geo/tiger/TIGER2015/PRISECROADS/tl_2015_15_prisecroads.zip")
Out[3]: 
           LINEARID           FULLNAME RTTYP  MTFCC                                           geometry
0     1104258643968       Puainako Exd     M  S1200  LINESTRING (-155.11039 19.69256, -155.11070 19...
1     1103933153286        Puanako Exd     M  S1200  LINESTRING (-155.14804 19.68121, -155.14938 19...
2     1103890709860       Puainako Exd     M  S1200  LINESTRING (-155.15660 19.68084, -155.15641 19...
3     1104486222576          Keaau Byp     M  S1200  LINESTRING (-155.03130 19.62267, -155.03204 19...
4     1104486197669          Keaau Byp     M  S1200  LINESTRING (-155.02989 19.61407, -155.02981 19...
...             ...                ...   ...    ...                                                ...
1089  1104692157960     Old Volcano Rd     M  S1200  LINESTRING (-155.19523 19.45009, -155.19573 19...
1090  1102513212913     Old Volcano Rd     M  S1200  LINESTRING (-155.04047 19.62094, -155.04028 19...
1091  1102513212938     Old Volcano Rd     M  S1200  LINESTRING (-155.04051 19.62089, -155.04086 19...
1092  1103790894549     Old Camp Rd 17     M  S1200  LINESTRING (-155.84356 20.23890, -155.84360 20...
1093    11057872535  Old Haleakala Hwy     M  S1200  LINESTRING (-156.34957 20.84938, -156.34956 20...

[1094 rows x 5 columns]

In [4]: geopandas.__version__
Out[4]: '0.13.0'

and also works with /vsizip/vsicurl/ using ogrinfo:

$ ogrinfo /vsizip/vsicurl/http://www2.census.gov/geo/tiger/TIGER2015/PRISECROADS/tl_2015_15_prisecroads.zip
INFO: Open of `/vsizip/vsicurl/http://www2.census.gov/geo/tiger/TIGER2015/PRISECROADS/tl_2015_15_prisecroads.zip'
      using driver `ESRI Shapefile' successful.
1: tl_2015_15_prisecroads (Line String)

So for this specific url, it might be related to the GDAL version? (or maybe a temporary server issue?)

@weiji14
Copy link
Member

weiji14 commented Jun 8, 2023

This is a bit strange: while working on fixing the mentioned issue, this specific URL actually does work for me with geopandas 0.13.0:

So for this specific url, it might be related to the GDAL version? (or maybe a temporary server issue?)

Hmm you're right. I just tested installing geopandas=0.13.0 from conda-forge and geopandas.read_file() worked for that zip file. Looking at the CI failures at commit ea3afa9, it appears that our regular Docs builds were passing, but the readthedocs build wasn't, so maybe the readthedocs CI did use some incompatible version of GDAL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants