Closed brendan-ward closed 9 months ago
I wonder, regarding the following remark in #285 :
The issue is that OGR will give different results if GEOS is or is not compiled into GDAL. Using shapely afterward ensures precise results.
Is there now a test environment available in the CI where gdal is compiled without geos?
Is there now a test environment available in the CI where gdal is compiled without geos?
Not that I am aware of; I think we'd have to compile GDAL from source to get that setup. For #285, I opted to use the same approach as for bbox
, which means it is limited by GDAL rather than an operation we implement on our end (using shapely). We can sidestep the issue a bit by making sure that GDAL in our wheels is always compiled using GEOS.
Is there now a test environment available in the CI where gdal is compiled without geos?
Not that I am aware of; I think we'd have to compile GDAL from source to get that setup. For #285, I opted to use the same approach as for
bbox
, which means it is limited by GDAL rather than an operation we implement on our end (using shapely). We can sidestep the issue a bit by making sure that GDAL in our wheels is always compiled using GEOS.
Ah, OK, I didn't "read" the PR yet. If GDAL is being used for the filtering and it is not planned to implement a fallback (for now) if GDAL isn't compiled with geos it is not as important to have such a test environment.
If a testing environment with GDAL without geos support would be wanted, the alpine-small probably is an easy candidate as mentioned in this comment: https://github.com/geopandas/pyogrio/issues/277#issuecomment-1702612350
I added 3.4 back in as minimum supported version; the one issue I wanted out of the way - detecting GEOS via GDAL - was limited to < 3.4, so this should be fine. Just to stay safe from version-specific behavior, it is probably a good idea for us to continue testing all versions between our minimum and latest, and they are reasonably fast.
This raises the minimum supported version of GDAL to 3.5.* (note: no compatibility change, just dropping old versions from CI).
This updates the CI matrix to use newer Docker images from ghcr.io (current home of GDAL images).
This adds
_compat.py
to check the state of optional dependencies and GDAL features like Arrow API or GEOS. This will give us a place in later PRs to set variables to use Arrow by default.This drops shim to use PyGEOS; otherwise the conditional presence of it was cluttering up tests esp. those around #285. While GeoPandas support should continue to work with PyGEOS instead of Shapely 2.0, we no longer test that specifically and no longer list that as a compatible setup. The tests assume that if GeoPandas is present that Shapely >= 2.0 is present.
This adds a new parametrize
@use_arrow
which will provide a boolean value of at leastFalse
and will includeTrue
if arrow support is enabled. This should make it easier to mark additional tests to test with and without arrow support.This adds new pytest marks to make skipping tests a little easier:
requires_arrow_api
: skip tests if pyarrow is absent or GDAL < 3.6requires_gdal_geos
: skip tests if GDAL was not compiled with GEOSrequires_shapely
: skip tests if Shapely >= 2.0 is absentThis drops direct tests that use
.json
extension without specifying driver, because recent versions of GDAL added another driver for that extension and we raise errors when there are multiple. Since this comes from GDAL rather than an intentional breaking change on our end, I didn't note this in the changelog (should we?).