From 15d3bf8deac967a7b8ac7312f8faa1ab05f01c1c Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 13:42:03 +0100 Subject: [PATCH 01/41] DOC: remove upper supported versions --- README.md | 10 ++++------ docs/source/install.md | 16 +++++++--------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 647c2ae1..5833f7dd 100644 --- a/README.md +++ b/README.md @@ -26,12 +26,10 @@ Read the documentation for more information: ## Requirements -Supports Python 3.10 - 3.14 and GDAL 3.6.x - 3.11.x. - -Reading to GeoDataFrames requires `geopandas>=0.12` with `shapely>=2`. - -Additionally, installing `pyarrow` in combination with GDAL 3.6+ enables -a further speed-up when specifying `use_arrow=True`. +- Python >= 3.10 +- GDAL >= 3.6 +- Reading to GeoDataFrames requires `geopandas>=0.12` and `shapely>=2`. Additionally, + installing `pyarrow` enables a further speed-up when specifying `use_arrow=True`. ## Installation diff --git a/docs/source/install.md b/docs/source/install.md index af1ff813..ff86e071 100644 --- a/docs/source/install.md +++ b/docs/source/install.md @@ -2,12 +2,10 @@ ## Requirements -Supports Python 3.10 - 3.14 and GDAL 3.6.x - 3.11.x - -Reading to GeoDataFrames requires `geopandas>=0.12` with `shapely>=2`. - -Additionally, installing `pyarrow` in combination with GDAL 3.6+ enables -a further speed-up when specifying `use_arrow=True`. +- Python >= 3.10 +- GDAL >= 3.6 +- Reading to GeoDataFrames requires `geopandas>=0.12` and `shapely>=2`. Additionally, + installing `pyarrow` enables a further speed-up when specifying `use_arrow=True`. ## Installation @@ -49,9 +47,9 @@ source distribution because the available wheels are not compatible with your platform. The binary wheels available on PyPI include the core GDAL drivers (GeoJSON, -ESRI Shapefile, GPKG, FGB, OpenFileGDB, etc) but do not include more advanced -drivers such as LIBKML and Spatialite. If you need such drivers, we recommend -that you use conda-forge to install pyogrio as explained above. +ESRI Shapefile, GPKG, FGB, OpenFileGDB, etc). You can use :meth:`~list_drivers` +to list the included drivers. If you need drivers that are not included, we +recommend that you use conda-forge to install pyogrio as explained above. ### Troubleshooting installation errors From a85221dce1a3cd836fc517ad492c285cc7cdfcd3 Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 13:58:58 +0100 Subject: [PATCH 02/41] Update install.md --- docs/source/install.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/source/install.md b/docs/source/install.md index ff86e071..8dd0b6da 100644 --- a/docs/source/install.md +++ b/docs/source/install.md @@ -47,9 +47,10 @@ source distribution because the available wheels are not compatible with your platform. The binary wheels available on PyPI include the core GDAL drivers (GeoJSON, -ESRI Shapefile, GPKG, FGB, OpenFileGDB, etc). You can use :meth:`~list_drivers` -to list the included drivers. If you need drivers that are not included, we -recommend that you use conda-forge to install pyogrio as explained above. +ESRI Shapefile, GPKG, FGB, OpenFileGDB, etc). You can use +:func:`~pyogrio.list_drivers` to list the included drivers. If you need drivers +that are not included, we recommend that you use conda-forge to install pyogrio +as explained above. ### Troubleshooting installation errors From c7fb040cbb737c8564bedc6d6ce9258ace38b9ac Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 14:04:14 +0100 Subject: [PATCH 03/41] Update install.md --- docs/source/install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/install.md b/docs/source/install.md index 8dd0b6da..179b3adf 100644 --- a/docs/source/install.md +++ b/docs/source/install.md @@ -48,7 +48,7 @@ platform. The binary wheels available on PyPI include the core GDAL drivers (GeoJSON, ESRI Shapefile, GPKG, FGB, OpenFileGDB, etc). You can use -:func:`~pyogrio.list_drivers` to list the included drivers. If you need drivers +{func}`pyogrio.list_drivers` to list the included drivers. If you need drivers that are not included, we recommend that you use conda-forge to install pyogrio as explained above. From 54964a949252c148757d77e8989a074e017a6f2a Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 14:15:35 +0100 Subject: [PATCH 04/41] Add some more cross-references to the functions --- docs/source/install.md | 2 +- docs/source/introduction.md | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/source/install.md b/docs/source/install.md index 179b3adf..4bb9329c 100644 --- a/docs/source/install.md +++ b/docs/source/install.md @@ -48,7 +48,7 @@ platform. The binary wheels available on PyPI include the core GDAL drivers (GeoJSON, ESRI Shapefile, GPKG, FGB, OpenFileGDB, etc). You can use -{func}`pyogrio.list_drivers` to list the included drivers. If you need drivers +{func}`pyogrio.list_drivers()` to list the included drivers. If you need drivers that are not included, we recommend that you use conda-forge to install pyogrio as explained above. diff --git a/docs/source/introduction.md b/docs/source/introduction.md index b24862d4..2195002a 100644 --- a/docs/source/introduction.md +++ b/docs/source/introduction.md @@ -10,7 +10,7 @@ You can display the GDAL version that Pyogrio was compiled against by ## List available drivers -Use `pyogrio.list_drivers()` to list all available drivers in your installation +Use {func}`pyogrio.list_drivers()` to list all available drivers in your installation of GDAL. However, just because a driver is listed does not mean that it is currently compatible with Pyogrio. @@ -53,7 +53,7 @@ The following drivers are known to be well-supported and tested in Pyogrio: ## List available layers -To list layers available in a data source: +To list layers available in a data source, use {func}`pyogrio.list_layers()`: ```python >>> from pyogrio import list_layers @@ -68,9 +68,9 @@ be nonspatial. In this case, the geometry type will be `None`. ## Read basic information about a data layer -To list information about a data layer in a data source, use the name of the layer -or its index (0-based) within the data source. By default, this reads from the -first layer. +To list information about a data layer in a data source, use +{func}`pyogrio.read_info()`. You can specify the name of the layer or its index +(0-based) within the data source. By default, this reads from the first layer. ```python >>> from pyogrio import read_info @@ -102,8 +102,9 @@ To read from a layer using name or index (the following are equivalent): ## Read a data layer into a GeoPandas GeoDataFrame -To read all features from a spatial data layer. By default, this operates on -the first layer unless `layer` is specified using layer name or index. +To read all features from a spatial data layer, use {func}`pyogrio.read_dataframe()`. +By default, this operates on the first layer unless `layer` is specified using layer +name or index. ```python >>> from pyogrio import read_dataframe @@ -368,7 +369,7 @@ This function supports options to subset features from the dataset: ## Write a GeoPandas GeoDataFrame -You can write a `GeoDataFrame` `df` to a file as follows: +You can write a `GeoDataFrame` `df` to a file as with {func}`pyogrio.write_dataframe()`: ```python >>> from pyogrio import write_dataframe From 72c86c9643e0e46d47892e76018da3cdbf9898dd Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 14:28:15 +0100 Subject: [PATCH 05/41] Shorten links --- docs/source/introduction.md | 19 ++++++++++--------- docs/source/known_issues.md | 11 ++++++----- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/docs/source/introduction.md b/docs/source/introduction.md index 2195002a..f354d169 100644 --- a/docs/source/introduction.md +++ b/docs/source/introduction.md @@ -10,7 +10,7 @@ You can display the GDAL version that Pyogrio was compiled against by ## List available drivers -Use {func}`pyogrio.list_drivers()` to list all available drivers in your installation +Use {func}`~pyogrio.list_drivers()` to list all available drivers in your installation of GDAL. However, just because a driver is listed does not mean that it is currently compatible with Pyogrio. @@ -53,7 +53,7 @@ The following drivers are known to be well-supported and tested in Pyogrio: ## List available layers -To list layers available in a data source, use {func}`pyogrio.list_layers()`: +To list layers available in a data source, use {func}`~pyogrio.list_layers()`: ```python >>> from pyogrio import list_layers @@ -69,7 +69,7 @@ be nonspatial. In this case, the geometry type will be `None`. ## Read basic information about a data layer To list information about a data layer in a data source, use -{func}`pyogrio.read_info()`. You can specify the name of the layer or its index +{func}`~pyogrio.read_info()`. You can specify the name of the layer or its index (0-based) within the data source. By default, this reads from the first layer. ```python @@ -102,7 +102,7 @@ To read from a layer using name or index (the following are equivalent): ## Read a data layer into a GeoPandas GeoDataFrame -To read all features from a spatial data layer, use {func}`pyogrio.read_dataframe()`. +To read all features from a spatial data layer, use {func}`~pyogrio.read_dataframe()`. By default, this operates on the first layer unless `layer` is specified using layer name or index. @@ -346,7 +346,8 @@ or a DBF file, directly into a Pandas `DataFrame`. ## Read feature bounds You can read the bounds of all or a subset of features in the dataset in order -to create a spatial index of features without reading all underlying geometries. +to create a spatial index of features without reading all underlying geometries +with {func}`~pyogrio.read_bounds()`. This is typically 2-3x faster than reading full feature data, but the main benefit is to avoid reading all feature data into memory for very large datasets. @@ -369,7 +370,7 @@ This function supports options to subset features from the dataset: ## Write a GeoPandas GeoDataFrame -You can write a `GeoDataFrame` `df` to a file as with {func}`pyogrio.write_dataframe()`: +You can write a `GeoDataFrame` `df` to a file with {func}`~pyogrio.write_dataframe()`: ```python >>> from pyogrio import write_dataframe @@ -473,7 +474,7 @@ You can also read from a URL with this syntax: GDAL only supports datetimes at a millisecond resolution. Reading data will thus give at most millisecond resolution (`datetime64[ms]` data type). With pandas 2.0 -`pyogrio.read_dataframe()` will return datetime data as `datetime64[ms]` +{func}`~pyogrio.read_dataframe()` will return datetime data as `datetime64[ms]` correspondingly. For previous versions of pandas, `datetime64[ns]` is used as ms precision was not supported. When writing, only precision up to ms is retained. @@ -486,7 +487,7 @@ Timezone information is preserved where possible, however GDAL only represents time zones as UTC offsets, whilst pandas uses IANA time zones (via `pytz` or `zoneinfo`). This means that dataframes with columns containing multiple offsets (e.g. when switching from standard time to summer time) will be written correctly, -but when read via `pyogrio.read_dataframe()` will be returned as a UTC datetime +but when read via {func}`~pyogrio.read_dataframe()` will be returned as a UTC datetime column, as there is no way to reconstruct the original timezone from the individual offsets present. @@ -495,7 +496,7 @@ offsets present. It is possible to use dataset and layer creation options available for a given driver in GDAL (see the relevant [GDAL driver page](https://gdal.org/drivers/vector/index.html)). These -can be passed in as additional `kwargs` to `write_dataframe` or using +can be passed in as additional `kwargs` to {func}`~write_dataframe` or using dictionaries for dataset or layer-level options. Where possible, Pyogrio uses the metadata of the driver to determine if a diff --git a/docs/source/known_issues.md b/docs/source/known_issues.md index 1a26efac..ad57aacc 100644 --- a/docs/source/known_issues.md +++ b/docs/source/known_issues.md @@ -15,7 +15,8 @@ encountered, the following occurs: Note: detection of NULL or otherwise unset field values is limited to the subset of records that are read from the data layer, which means that reading different subsets of records may yield different data types for the same columns. You -can use `read_info()` to determine the original data types of each column. +can use {func}`~pyogrio.read_info()` to determine the original data types of each +column. ## No support for measured geometries @@ -105,9 +106,9 @@ We recommend the following to sidestep performance issues: ## Incorrect results when using a spatial filter and Arrow interface Due to [a bug in GDAL](https://github.com/OSGeo/gdal/issues/8347), when using -the Arrow interface (e.g., via `use_arrow` on `read_dataframe`) certain drivers -(e.g., GPKG, FlatGeobuf, Arrow, Parquet) returned features whose bounding boxes -intersected the bounding box specified by `bbox` or `mask` geometry instead of -those whose geometry intersected the `bbox` or `mask`. +the Arrow interface (e.g., via `use_arrow` on {func}`~pyogrio.read_dataframe`) +certain drivers (e.g., GPKG, FlatGeobuf, Arrow, Parquet) returned features whose +bounding boxes intersected the bounding box specified by `bbox` or `mask` geometry +instead of those whose geometry intersected the `bbox` or `mask`. A fix is expected in GDAL 3.8.0. From 1123bf1cf60832d1cf25f328380232b5250882ec Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 15:02:16 +0100 Subject: [PATCH 06/41] Clarify the GDAL version in the wheels --- docs/source/install.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/source/install.md b/docs/source/install.md index 4bb9329c..a7d7823e 100644 --- a/docs/source/install.md +++ b/docs/source/install.md @@ -46,11 +46,15 @@ most likely due to the installation process falling back to installing from the source distribution because the available wheels are not compatible with your platform. -The binary wheels available on PyPI include the core GDAL drivers (GeoJSON, -ESRI Shapefile, GPKG, FGB, OpenFileGDB, etc). You can use -{func}`pyogrio.list_drivers()` to list the included drivers. If you need drivers -that are not included, we recommend that you use conda-forge to install pyogrio -as explained above. +Note that the GDAL version included in the wheels is not always the latest version. +Use {func}`pyogrio.__gdal_version_string__` to get the GDAL version included. +The wheels also include only the core GDAL drivers (GeoJSON, ESRI Shapefile, GPKG, +FGB, OpenFileGDB, etc). You can use {func}`pyogrio.list_drivers()` to list the +included drivers. + +If you need drivers that are not included, or if you need `pyogrio` to use a newer +version of GDAL, it is recommended to use conda-forge to install pyogrio as +explained above. ### Troubleshooting installation errors From 76c2aeba256e905e855b69f3a316ae13515e52c0 Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 15:14:23 +0100 Subject: [PATCH 07/41] Update install.md --- docs/source/install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/install.md b/docs/source/install.md index a7d7823e..a41e62bb 100644 --- a/docs/source/install.md +++ b/docs/source/install.md @@ -47,7 +47,7 @@ source distribution because the available wheels are not compatible with your platform. Note that the GDAL version included in the wheels is not always the latest version. -Use {func}`pyogrio.__gdal_version_string__` to get the GDAL version included. +Use {attr}`pyogrio.__gdal_version_string__` to get the GDAL version included. The wheels also include only the core GDAL drivers (GeoJSON, ESRI Shapefile, GPKG, FGB, OpenFileGDB, etc). You can use {func}`pyogrio.list_drivers()` to list the included drivers. From fd474e7e48eed5a4b1a2b449f546ee52842630a8 Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 15:20:50 +0100 Subject: [PATCH 08/41] Fix api doc for special members --- docs/source/api.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/source/api.rst b/docs/source/api.rst index 105fbb3f..5c939e6f 100644 --- a/docs/source/api.rst +++ b/docs/source/api.rst @@ -5,7 +5,8 @@ Core ---- .. automodule:: pyogrio - :members: list_drivers, detect_write_driver, list_layers, read_bounds, read_info, set_gdal_config_options, get_gdal_config_option, vsi_listtree, vsi_rmtree, vsi_unlink, __gdal_version__, __gdal_version_string__ + :members: list_drivers, detect_write_driver, list_layers, read_bounds, read_info, set_gdal_config_options, get_gdal_config_option, vsi_listtree, vsi_rmtree, vsi_unlink + :special-members: __version__, __gdal_version__, __gdal_version_string__ GeoPandas integration --------------------- From 425b9ef565d901643c3bb77c78d58bb3804c0925 Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 15:28:48 +0100 Subject: [PATCH 09/41] Update core.py --- pyogrio/core.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyogrio/core.py b/pyogrio/core.py index 4e0fe3c1..d99c440b 100644 --- a/pyogrio/core.py +++ b/pyogrio/core.py @@ -36,8 +36,11 @@ _register_drivers() _register_error_handler() + """The GDAL version used as a tuple of integers.""" __gdal_version__ = get_gdal_version() + """The GDAL version used as a string.""" __gdal_version_string__ = get_gdal_version_string() + """The GEOS version in included in GDAL as a tuple of integers.""" __gdal_geos_version__ = get_gdal_geos_version() From c0ad86ea3637812f5954b21e7ee2400939da978c Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 16:05:01 +0100 Subject: [PATCH 10/41] Update core.py --- pyogrio/core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyogrio/core.py b/pyogrio/core.py index d99c440b..4e3c8291 100644 --- a/pyogrio/core.py +++ b/pyogrio/core.py @@ -36,11 +36,11 @@ _register_drivers() _register_error_handler() - """The GDAL version used as a tuple of integers.""" + #: The GDAL version used as a tuple of integers. __gdal_version__ = get_gdal_version() - """The GDAL version used as a string.""" + #: The GDAL version used as a string. __gdal_version_string__ = get_gdal_version_string() - """The GEOS version in included in GDAL as a tuple of integers.""" + #: The GEOS version in included in GDAL as a tuple of integers. __gdal_geos_version__ = get_gdal_geos_version() From bc7d399d9075b649ade4b7f83b59cce14bd05001 Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 16:19:34 +0100 Subject: [PATCH 11/41] Update doc environment --- docs/environment.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/environment.yml b/docs/environment.yml index 0c3679c7..4b0a9ee9 100644 --- a/docs/environment.yml +++ b/docs/environment.yml @@ -2,12 +2,11 @@ name: pyogrio channels: - conda-forge dependencies: - - python==3.10.* - - gdal - - numpy==1.24.* - - numpydoc==1.1.* - - Cython==0.29.* - - docutils==0.16.* + - python=3.13 + - libgdal-core + - numpy + - numpydoc + - docutils - myst-parser - pip - pip: From 9b426cb8df03838e33410bf968bd58d4df87316f Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 16:28:51 +0100 Subject: [PATCH 12/41] Update core.py --- pyogrio/core.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pyogrio/core.py b/pyogrio/core.py index 4e3c8291..82107d9e 100644 --- a/pyogrio/core.py +++ b/pyogrio/core.py @@ -9,6 +9,14 @@ get_vsi_path_or_buffer, ) +# Define version variables here already with docstrings for Sphinx +#: The GDAL version used as a tuple of integers. +__gdal_version__ = None +#: The GDAL version used as a string. +__gdal_version_string__ = None +#: The GEOS version in included in GDAL as a tuple of integers. +__gdal_geos_version__ = None + with GDALEnv(): from pyogrio._err import _register_error_handler from pyogrio._io import ogr_list_layers, ogr_read_bounds, ogr_read_info @@ -36,11 +44,8 @@ _register_drivers() _register_error_handler() - #: The GDAL version used as a tuple of integers. __gdal_version__ = get_gdal_version() - #: The GDAL version used as a string. __gdal_version_string__ = get_gdal_version_string() - #: The GEOS version in included in GDAL as a tuple of integers. __gdal_geos_version__ = get_gdal_geos_version() From 6be6bff6d6d8caf7bf7d6920525a997ee1ca4f8c Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 16:35:03 +0100 Subject: [PATCH 13/41] Update core.py --- pyogrio/core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyogrio/core.py b/pyogrio/core.py index 82107d9e..870e71fc 100644 --- a/pyogrio/core.py +++ b/pyogrio/core.py @@ -10,11 +10,11 @@ ) # Define version variables here already with docstrings for Sphinx -#: The GDAL version used as a tuple of integers. +"""The GDAL version used as a tuple of integers.""" __gdal_version__ = None -#: The GDAL version used as a string. +"""The GDAL version used as a string.""" __gdal_version_string__ = None -#: The GEOS version in included in GDAL as a tuple of integers. +"""The GEOS version in included in GDAL as a tuple of integers.""" __gdal_geos_version__ = None with GDALEnv(): From 6f2576cf1d5a828b2c5c2df95c45b06a5ff1b7ad Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 16:59:15 +0100 Subject: [PATCH 14/41] Update core.py --- pyogrio/core.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pyogrio/core.py b/pyogrio/core.py index 870e71fc..02f3b979 100644 --- a/pyogrio/core.py +++ b/pyogrio/core.py @@ -9,14 +9,6 @@ get_vsi_path_or_buffer, ) -# Define version variables here already with docstrings for Sphinx -"""The GDAL version used as a tuple of integers.""" -__gdal_version__ = None -"""The GDAL version used as a string.""" -__gdal_version_string__ = None -"""The GEOS version in included in GDAL as a tuple of integers.""" -__gdal_geos_version__ = None - with GDALEnv(): from pyogrio._err import _register_error_handler from pyogrio._io import ogr_list_layers, ogr_read_bounds, ogr_read_info @@ -44,8 +36,12 @@ _register_drivers() _register_error_handler() + # Define version variables here already with docstrings for Sphinx + """The GDAL version used as a tuple of integers.""" __gdal_version__ = get_gdal_version() + """The GDAL version used as a string.""" __gdal_version_string__ = get_gdal_version_string() + """The GEOS version in included in GDAL as a tuple of integers.""" __gdal_geos_version__ = get_gdal_geos_version() From c50b29d3b01d9baa2ccd8fb10929c2579ce671e3 Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 16:59:33 +0100 Subject: [PATCH 15/41] Update core.py --- pyogrio/core.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pyogrio/core.py b/pyogrio/core.py index 02f3b979..d99c440b 100644 --- a/pyogrio/core.py +++ b/pyogrio/core.py @@ -36,7 +36,6 @@ _register_drivers() _register_error_handler() - # Define version variables here already with docstrings for Sphinx """The GDAL version used as a tuple of integers.""" __gdal_version__ = get_gdal_version() """The GDAL version used as a string.""" From 3bb1e1c279bbb328f560e678c6965b38571eeb5b Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 17:09:56 +0100 Subject: [PATCH 16/41] Update api.rst --- docs/source/api.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/api.rst b/docs/source/api.rst index 5c939e6f..5e841bd0 100644 --- a/docs/source/api.rst +++ b/docs/source/api.rst @@ -6,7 +6,7 @@ Core .. automodule:: pyogrio :members: list_drivers, detect_write_driver, list_layers, read_bounds, read_info, set_gdal_config_options, get_gdal_config_option, vsi_listtree, vsi_rmtree, vsi_unlink - :special-members: __version__, __gdal_version__, __gdal_version_string__ + :undoc-members: __version__, __gdal_version__, __gdal_version_string__ GeoPandas integration --------------------- From 037f75676158ca572c63620e38d12afebb68749b Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 17:15:40 +0100 Subject: [PATCH 17/41] Update __init__.py --- pyogrio/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyogrio/__init__.py b/pyogrio/__init__.py index 17db8339..bec69758 100644 --- a/pyogrio/__init__.py +++ b/pyogrio/__init__.py @@ -1,4 +1,4 @@ -"""Vectorized vector I/O using OGR.""" +"""Bulk-oriented vector I/O using OGR.""" try: # we try importing shapely, to ensure it is imported (and it can load its @@ -30,6 +30,7 @@ from pyogrio.geopandas import read_dataframe, write_dataframe from pyogrio.raw import open_arrow, read_arrow, write_arrow +"""The version of pyogrio as a string.""" __version__ = get_versions()["version"] del get_versions From 5b4c9044e8976f9fec79f953a6138f9d0ca9ac10 Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 17:22:22 +0100 Subject: [PATCH 18/41] Update api.rst --- docs/source/api.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/source/api.rst b/docs/source/api.rst index 5e841bd0..09e145d6 100644 --- a/docs/source/api.rst +++ b/docs/source/api.rst @@ -6,7 +6,10 @@ Core .. automodule:: pyogrio :members: list_drivers, detect_write_driver, list_layers, read_bounds, read_info, set_gdal_config_options, get_gdal_config_option, vsi_listtree, vsi_rmtree, vsi_unlink - :undoc-members: __version__, __gdal_version__, __gdal_version_string__ + +.. autoproperty:: pyogrio.__version__ +.. autoproperty:: pyogrio.__gdal_version__ +.. autoproperty:: pyogrio.__gdal_version_string__ GeoPandas integration --------------------- From b3389274462d75db9ad5a743567256560156b1ba Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 17:28:49 +0100 Subject: [PATCH 19/41] Update api.rst --- docs/source/api.rst | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/source/api.rst b/docs/source/api.rst index 09e145d6..a5dbb4ea 100644 --- a/docs/source/api.rst +++ b/docs/source/api.rst @@ -4,8 +4,18 @@ API reference Core ---- -.. automodule:: pyogrio - :members: list_drivers, detect_write_driver, list_layers, read_bounds, read_info, set_gdal_config_options, get_gdal_config_option, vsi_listtree, vsi_rmtree, vsi_unlink +.. autofunction:: pyogrio.list_drivers +.. autofunction:: pyogrio.detect_write_driver +.. autofunction:: pyogrio.list_layers +.. autofunction:: pyogrio.read_bounds +.. autofunction:: pyogrio.read_info +.. autofunction:: read_bounds +.. autofunction:: read_info +.. autofunction:: set_gdal_config_options +.. autofunction:: get_gdal_config_option +.. autofunction:: vsi_listtree +.. autofunction:: vsi_rmtree +.. autofunction:: vsi_unlink .. autoproperty:: pyogrio.__version__ .. autoproperty:: pyogrio.__gdal_version__ From 81d20de88acd0f0a5f9ebed41e197ad408f7e8f0 Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 17:33:44 +0100 Subject: [PATCH 20/41] Update api.rst --- docs/source/api.rst | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/docs/source/api.rst b/docs/source/api.rst index a5dbb4ea..72392759 100644 --- a/docs/source/api.rst +++ b/docs/source/api.rst @@ -4,22 +4,12 @@ API reference Core ---- -.. autofunction:: pyogrio.list_drivers -.. autofunction:: pyogrio.detect_write_driver -.. autofunction:: pyogrio.list_layers -.. autofunction:: pyogrio.read_bounds -.. autofunction:: pyogrio.read_info -.. autofunction:: read_bounds -.. autofunction:: read_info -.. autofunction:: set_gdal_config_options -.. autofunction:: get_gdal_config_option -.. autofunction:: vsi_listtree -.. autofunction:: vsi_rmtree -.. autofunction:: vsi_unlink +.. automodule:: pyogrio + :members: list_drivers, detect_write_driver, list_layers, read_bounds, read_info, set_gdal_config_options, get_gdal_config_option, vsi_listtree, vsi_rmtree, vsi_unlink -.. autoproperty:: pyogrio.__version__ -.. autoproperty:: pyogrio.__gdal_version__ -.. autoproperty:: pyogrio.__gdal_version_string__ +.. autoproperty:: __version__ +.. autoproperty:: __gdal_version__ +.. autoproperty:: __gdal_version_string__ GeoPandas integration --------------------- From 68128823ac5807d0fa4ad871faefbb469a2d8bcb Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 17:36:52 +0100 Subject: [PATCH 21/41] Update api.rst --- docs/source/api.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/source/api.rst b/docs/source/api.rst index 72392759..74bf6877 100644 --- a/docs/source/api.rst +++ b/docs/source/api.rst @@ -1,3 +1,5 @@ +.. currentmodule:: pyogrio + API reference ============= From 6b09a7b10916aaa328db4410f0c53cdad20f4fe3 Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 17:45:37 +0100 Subject: [PATCH 22/41] Update api.rst --- docs/source/api.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/api.rst b/docs/source/api.rst index 74bf6877..ab252b9a 100644 --- a/docs/source/api.rst +++ b/docs/source/api.rst @@ -1,4 +1,4 @@ -.. currentmodule:: pyogrio +.. py:currentmodule:: pyogrio API reference ============= @@ -9,9 +9,9 @@ Core .. automodule:: pyogrio :members: list_drivers, detect_write_driver, list_layers, read_bounds, read_info, set_gdal_config_options, get_gdal_config_option, vsi_listtree, vsi_rmtree, vsi_unlink -.. autoproperty:: __version__ -.. autoproperty:: __gdal_version__ -.. autoproperty:: __gdal_version_string__ +.. py:attribute:: __version__ +.. py:attribute:: __gdal_version__ +.. py:attribute:: __gdal_version_string__ GeoPandas integration --------------------- From 4e51eab26e2b989770c24bc1653618c0553906f7 Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 17:55:04 +0100 Subject: [PATCH 23/41] Update __init__.py --- pyogrio/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyogrio/__init__.py b/pyogrio/__init__.py index bec69758..325994b3 100644 --- a/pyogrio/__init__.py +++ b/pyogrio/__init__.py @@ -30,8 +30,9 @@ from pyogrio.geopandas import read_dataframe, write_dataframe from pyogrio.raw import open_arrow, read_arrow, write_arrow -"""The version of pyogrio as a string.""" __version__ = get_versions()["version"] +"""The version of pyogrio as a string.""" + del get_versions __all__ = [ From 3ef1051edf234433bffdddd730f501c46679b270 Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 20:12:52 +0100 Subject: [PATCH 24/41] Update core.py --- pyogrio/core.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pyogrio/core.py b/pyogrio/core.py index d99c440b..c384f07f 100644 --- a/pyogrio/core.py +++ b/pyogrio/core.py @@ -36,12 +36,14 @@ _register_drivers() _register_error_handler() - """The GDAL version used as a tuple of integers.""" __gdal_version__ = get_gdal_version() - """The GDAL version used as a string.""" + """The GDAL version used by pyogrio as a tuple of integers.""" + __gdal_version_string__ = get_gdal_version_string() - """The GEOS version in included in GDAL as a tuple of integers.""" + """The GDAL version used by pyogrio as a string.""" + __gdal_geos_version__ = get_gdal_geos_version() + """The version of GEOS used by GDAL as a tuple of integers.""" def list_drivers(read=False, write=False): From 020741dcf370148cbb34ea11b73585894a96d9b2 Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 20:13:51 +0100 Subject: [PATCH 25/41] Update api.rst --- docs/source/api.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/api.rst b/docs/source/api.rst index ab252b9a..4f508ea5 100644 --- a/docs/source/api.rst +++ b/docs/source/api.rst @@ -12,6 +12,7 @@ Core .. py:attribute:: __version__ .. py:attribute:: __gdal_version__ .. py:attribute:: __gdal_version_string__ +.. py:attribute:: __gdal_geos_version__ GeoPandas integration --------------------- From 8ac7ca473a926187073de306a1d4830256dc4e66 Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 20:22:27 +0100 Subject: [PATCH 26/41] Update core.py --- pyogrio/core.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pyogrio/core.py b/pyogrio/core.py index c384f07f..df77e929 100644 --- a/pyogrio/core.py +++ b/pyogrio/core.py @@ -9,6 +9,15 @@ get_vsi_path_or_buffer, ) +__gdal_version__ = None +"""The GDAL version used by pyogrio as a tuple of integers.""" + +__gdal_version_string__ = None +"""The GDAL version used by pyogrio as a string.""" + +__gdal_geos_version__ = None +"""The version of GEOS used by GDAL as a tuple of integers.""" + with GDALEnv(): from pyogrio._err import _register_error_handler from pyogrio._io import ogr_list_layers, ogr_read_bounds, ogr_read_info @@ -37,13 +46,8 @@ _register_error_handler() __gdal_version__ = get_gdal_version() - """The GDAL version used by pyogrio as a tuple of integers.""" - __gdal_version_string__ = get_gdal_version_string() - """The GDAL version used by pyogrio as a string.""" - __gdal_geos_version__ = get_gdal_geos_version() - """The version of GEOS used by GDAL as a tuple of integers.""" def list_drivers(read=False, write=False): From 419f971f9adb088ce97753ef896f13fbbc34bb48 Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 20:27:58 +0100 Subject: [PATCH 27/41] Update conf.py --- docs/source/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/conf.py b/docs/source/conf.py index bf2d45e9..141b9992 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -42,6 +42,7 @@ "sphinx.ext.autosummary", "sphinx_rtd_theme", "myst_parser", + "sphinx.ext.napoleon", ] # Add any paths that contain templates here, relative to this directory. From b482c0aac8b2e3e74d4695f23eb76c9659ecd81b Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 20:54:20 +0100 Subject: [PATCH 28/41] Another try... --- docs/environment.yml | 2 +- docs/source/conf.py | 1 - pyogrio/core.py | 6 +++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/environment.yml b/docs/environment.yml index 4b0a9ee9..e1cd374f 100644 --- a/docs/environment.yml +++ b/docs/environment.yml @@ -5,7 +5,7 @@ dependencies: - python=3.13 - libgdal-core - numpy - - numpydoc + - numpydoc=1.9 - docutils - myst-parser - pip diff --git a/docs/source/conf.py b/docs/source/conf.py index 141b9992..bf2d45e9 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -42,7 +42,6 @@ "sphinx.ext.autosummary", "sphinx_rtd_theme", "myst_parser", - "sphinx.ext.napoleon", ] # Add any paths that contain templates here, relative to this directory. diff --git a/pyogrio/core.py b/pyogrio/core.py index df77e929..c7512533 100644 --- a/pyogrio/core.py +++ b/pyogrio/core.py @@ -10,13 +10,13 @@ ) __gdal_version__ = None -"""The GDAL version used by pyogrio as a tuple of integers.""" +"""The GDAL version used by pyogrio (`tuple of int`).""" __gdal_version_string__ = None -"""The GDAL version used by pyogrio as a string.""" +"""The GDAL version used by pyogrio (`str`).""" __gdal_geos_version__ = None -"""The version of GEOS used by GDAL as a tuple of integers.""" +"""The version of GEOS used by GDAL (`tuple of int`).""" with GDALEnv(): from pyogrio._err import _register_error_handler From e8168c65a29d891aaecda9a45b8292da2ffd5ba6 Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 20:55:21 +0100 Subject: [PATCH 29/41] Update core.py --- pyogrio/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyogrio/core.py b/pyogrio/core.py index c7512533..a7be0032 100644 --- a/pyogrio/core.py +++ b/pyogrio/core.py @@ -10,13 +10,13 @@ ) __gdal_version__ = None -"""The GDAL version used by pyogrio (`tuple of int`).""" +"""The GDAL version used by pyogrio (`tuple` of `int`).""" __gdal_version_string__ = None """The GDAL version used by pyogrio (`str`).""" __gdal_geos_version__ = None -"""The version of GEOS used by GDAL (`tuple of int`).""" +"""The version of GEOS used by GDAL (`tuple` of `int`).""" with GDALEnv(): from pyogrio._err import _register_error_handler From 3b4beb0e4a275915f6c31869864046cb1ea16e55 Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 21:21:06 +0100 Subject: [PATCH 30/41] Try making the version dunders properties --- pyogrio/core.py | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/pyogrio/core.py b/pyogrio/core.py index a7be0032..64831f15 100644 --- a/pyogrio/core.py +++ b/pyogrio/core.py @@ -9,15 +9,6 @@ get_vsi_path_or_buffer, ) -__gdal_version__ = None -"""The GDAL version used by pyogrio (`tuple` of `int`).""" - -__gdal_version_string__ = None -"""The GDAL version used by pyogrio (`str`).""" - -__gdal_geos_version__ = None -"""The version of GEOS used by GDAL (`tuple` of `int`).""" - with GDALEnv(): from pyogrio._err import _register_error_handler from pyogrio._io import ogr_list_layers, ogr_read_bounds, ogr_read_info @@ -45,9 +36,27 @@ _register_drivers() _register_error_handler() - __gdal_version__ = get_gdal_version() - __gdal_version_string__ = get_gdal_version_string() - __gdal_geos_version__ = get_gdal_geos_version() + _gdal_version = get_gdal_version() + _gdal_version_string = get_gdal_version_string() + _gdal_geos_version = get_gdal_geos_version() + + +@property +def __gdal_version__(): + """The GDAL version used by pyogrio (`tuple` of `int`).""" + return _gdal_version + + +@property +def __gdal_version_string__(): + """The GDAL version used by pyogrio (`str`).""" + return _gdal_version_string + + +@property +def __gdal_geos_version__(): + """The version of GEOS used by GDAL (`tuple` of `int`).""" + return _gdal_geos_version def list_drivers(read=False, write=False): From 4b5b3d0e67dc52d2b29dc98eb0d8dd327aaa892e Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 21:50:58 +0100 Subject: [PATCH 31/41] Revert "Try making the version dunders properties" This reverts commit 3b4beb0e4a275915f6c31869864046cb1ea16e55. --- pyogrio/core.py | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/pyogrio/core.py b/pyogrio/core.py index 64831f15..a7be0032 100644 --- a/pyogrio/core.py +++ b/pyogrio/core.py @@ -9,6 +9,15 @@ get_vsi_path_or_buffer, ) +__gdal_version__ = None +"""The GDAL version used by pyogrio (`tuple` of `int`).""" + +__gdal_version_string__ = None +"""The GDAL version used by pyogrio (`str`).""" + +__gdal_geos_version__ = None +"""The version of GEOS used by GDAL (`tuple` of `int`).""" + with GDALEnv(): from pyogrio._err import _register_error_handler from pyogrio._io import ogr_list_layers, ogr_read_bounds, ogr_read_info @@ -36,27 +45,9 @@ _register_drivers() _register_error_handler() - _gdal_version = get_gdal_version() - _gdal_version_string = get_gdal_version_string() - _gdal_geos_version = get_gdal_geos_version() - - -@property -def __gdal_version__(): - """The GDAL version used by pyogrio (`tuple` of `int`).""" - return _gdal_version - - -@property -def __gdal_version_string__(): - """The GDAL version used by pyogrio (`str`).""" - return _gdal_version_string - - -@property -def __gdal_geos_version__(): - """The version of GEOS used by GDAL (`tuple` of `int`).""" - return _gdal_geos_version + __gdal_version__ = get_gdal_version() + __gdal_version_string__ = get_gdal_version_string() + __gdal_geos_version__ = get_gdal_geos_version() def list_drivers(read=False, write=False): From 01f48095a2ca5cc864d912f7cc7ee29c5f9def0a Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 21:52:44 +0100 Subject: [PATCH 32/41] Update core.py --- pyogrio/core.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/pyogrio/core.py b/pyogrio/core.py index a7be0032..440719a6 100644 --- a/pyogrio/core.py +++ b/pyogrio/core.py @@ -9,15 +9,6 @@ get_vsi_path_or_buffer, ) -__gdal_version__ = None -"""The GDAL version used by pyogrio (`tuple` of `int`).""" - -__gdal_version_string__ = None -"""The GDAL version used by pyogrio (`str`).""" - -__gdal_geos_version__ = None -"""The version of GEOS used by GDAL (`tuple` of `int`).""" - with GDALEnv(): from pyogrio._err import _register_error_handler from pyogrio._io import ogr_list_layers, ogr_read_bounds, ogr_read_info @@ -46,8 +37,11 @@ _register_error_handler() __gdal_version__ = get_gdal_version() + """The GDAL version used by pyogrio (`tuple` of `int`).""" __gdal_version_string__ = get_gdal_version_string() + """The GDAL version used by pyogrio (`str`).""" __gdal_geos_version__ = get_gdal_geos_version() + """The version of GEOS used by GDAL (`tuple` of `int`).""" def list_drivers(read=False, write=False): From 2c61cff8f6be5f05797166a2524c707efb316888 Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 21:59:28 +0100 Subject: [PATCH 33/41] Update core.py --- pyogrio/core.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pyogrio/core.py b/pyogrio/core.py index 440719a6..0e2fc6e7 100644 --- a/pyogrio/core.py +++ b/pyogrio/core.py @@ -36,12 +36,14 @@ _register_drivers() _register_error_handler() + #: The GDAL version used by pyogrio (`tuple` of `int`). __gdal_version__ = get_gdal_version() - """The GDAL version used by pyogrio (`tuple` of `int`).""" + + #: The GDAL version used by pyogrio (`str`). __gdal_version_string__ = get_gdal_version_string() - """The GDAL version used by pyogrio (`str`).""" + + #: The version of GEOS used by GDAL (`tuple` of `int`). __gdal_geos_version__ = get_gdal_geos_version() - """The version of GEOS used by GDAL (`tuple` of `int`).""" def list_drivers(read=False, write=False): From 7602f9326d817f57d49ec2d4aebf81b45f7988e0 Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 22:13:37 +0100 Subject: [PATCH 34/41] Update api.rst --- docs/source/api.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/api.rst b/docs/source/api.rst index 4f508ea5..060f8932 100644 --- a/docs/source/api.rst +++ b/docs/source/api.rst @@ -8,6 +8,7 @@ Core .. automodule:: pyogrio :members: list_drivers, detect_write_driver, list_layers, read_bounds, read_info, set_gdal_config_options, get_gdal_config_option, vsi_listtree, vsi_rmtree, vsi_unlink + :special-members: .. py:attribute:: __version__ .. py:attribute:: __gdal_version__ From db7a65174b0544dd0d6671a7f815d76b84ec7e90 Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 22:29:39 +0100 Subject: [PATCH 35/41] Try manual doc for module special attributes --- docs/source/api.rst | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/source/api.rst b/docs/source/api.rst index 060f8932..e00cd4f5 100644 --- a/docs/source/api.rst +++ b/docs/source/api.rst @@ -8,13 +8,24 @@ Core .. automodule:: pyogrio :members: list_drivers, detect_write_driver, list_layers, read_bounds, read_info, set_gdal_config_options, get_gdal_config_option, vsi_listtree, vsi_rmtree, vsi_unlink - :special-members: .. py:attribute:: __version__ + + The pyogrio version (`str`). + .. py:attribute:: __gdal_version__ + + The GDAL version used by pyogrio (`tuple` of `int`). + .. py:attribute:: __gdal_version_string__ + + The GDAL version used by pyogrio (`str`). + .. py:attribute:: __gdal_geos_version__ + The version of GEOS used by GDAL (`tuple` of `int`). + + GeoPandas integration --------------------- From 81c8f252d2472f15d7f68eb8a61a4a277e937948 Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 22:50:21 +0100 Subject: [PATCH 36/41] Comment why explicit doc + cleanup --- docs/source/api.rst | 4 ++++ pyogrio/core.py | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/source/api.rst b/docs/source/api.rst index e00cd4f5..e0255581 100644 --- a/docs/source/api.rst +++ b/docs/source/api.rst @@ -9,6 +9,10 @@ Core .. automodule:: pyogrio :members: list_drivers, detect_write_driver, list_layers, read_bounds, read_info, set_gdal_config_options, get_gdal_config_option, vsi_listtree, vsi_rmtree, vsi_unlink +.. + For the special attributes/dunder attributes, the inline docstrings weren't + picked up by autodoc, so they are documented explicitly here. + .. py:attribute:: __version__ The pyogrio version (`str`). diff --git a/pyogrio/core.py b/pyogrio/core.py index 0e2fc6e7..4e0fe3c1 100644 --- a/pyogrio/core.py +++ b/pyogrio/core.py @@ -36,13 +36,8 @@ _register_drivers() _register_error_handler() - #: The GDAL version used by pyogrio (`tuple` of `int`). __gdal_version__ = get_gdal_version() - - #: The GDAL version used by pyogrio (`str`). __gdal_version_string__ = get_gdal_version_string() - - #: The version of GEOS used by GDAL (`tuple` of `int`). __gdal_geos_version__ = get_gdal_geos_version() From 7fb0990a9eff0256244f712e2754ca55ef339f4c Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 22:51:08 +0100 Subject: [PATCH 37/41] Update __init__.py --- pyogrio/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pyogrio/__init__.py b/pyogrio/__init__.py index 325994b3..704429ba 100644 --- a/pyogrio/__init__.py +++ b/pyogrio/__init__.py @@ -31,7 +31,6 @@ from pyogrio.raw import open_arrow, read_arrow, write_arrow __version__ = get_versions()["version"] -"""The version of pyogrio as a string.""" del get_versions From f3339323e6f31ba982212e33f2eef37442846709 Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 22:52:32 +0100 Subject: [PATCH 38/41] Update __init__.py --- pyogrio/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pyogrio/__init__.py b/pyogrio/__init__.py index 704429ba..7ec02dda 100644 --- a/pyogrio/__init__.py +++ b/pyogrio/__init__.py @@ -31,7 +31,6 @@ from pyogrio.raw import open_arrow, read_arrow, write_arrow __version__ = get_versions()["version"] - del get_versions __all__ = [ From 05eb4a6dd3ce5d339de31fe0d76dae17871aa194 Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 23:19:09 +0100 Subject: [PATCH 39/41] Update install.md --- docs/source/install.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/source/install.md b/docs/source/install.md index a41e62bb..51148e82 100644 --- a/docs/source/install.md +++ b/docs/source/install.md @@ -46,11 +46,12 @@ most likely due to the installation process falling back to installing from the source distribution because the available wheels are not compatible with your platform. -Note that the GDAL version included in the wheels is not always the latest version. -Use {attr}`pyogrio.__gdal_version_string__` to get the GDAL version included. -The wheels also include only the core GDAL drivers (GeoJSON, ESRI Shapefile, GPKG, -FGB, OpenFileGDB, etc). You can use {func}`pyogrio.list_drivers()` to list the -included drivers. +Note that the GDAL version included in the binary wheels is not always the latest +version and is likely to be a different version than the system GDAL. Please use +{attr}`pyogrio.__gdal_version_string__` to get the GDAL version being used by pyogrio. +The wheels include the most common GDAL vector drivers (GeoJSON, ESRI Shapefile, +GPKG, FGB, OpenFileGDB, etc), but not all drivers. Use {func}`pyogrio.list_drivers()` +to list the drivers available in pyogrio. If you need drivers that are not included, or if you need `pyogrio` to use a newer version of GDAL, it is recommended to use conda-forge to install pyogrio as From a3cc9293cfc31019c6cd6c7ef6ca2282fdb55730 Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 23:30:13 +0100 Subject: [PATCH 40/41] Update install.md --- docs/source/install.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/source/install.md b/docs/source/install.md index 51148e82..84a25fd0 100644 --- a/docs/source/install.md +++ b/docs/source/install.md @@ -48,13 +48,13 @@ platform. Note that the GDAL version included in the binary wheels is not always the latest version and is likely to be a different version than the system GDAL. Please use -{attr}`pyogrio.__gdal_version_string__` to get the GDAL version being used by pyogrio. -The wheels include the most common GDAL vector drivers (GeoJSON, ESRI Shapefile, -GPKG, FGB, OpenFileGDB, etc), but not all drivers. Use {func}`pyogrio.list_drivers()` -to list the drivers available in pyogrio. +{attr}`pyogrio.__gdal_version_string__` to get the GDAL version being used by +Pyogrio. Also note that the wheels include the most common GDAL vector drivers +(GeoJSON, ESRI Shapefile, GPKG, FGB, OpenFileGDB, etc), but not all drivers. Use +{func}`pyogrio.list_drivers()` to list the drivers available in Pyogrio. -If you need drivers that are not included, or if you need `pyogrio` to use a newer -version of GDAL, it is recommended to use conda-forge to install pyogrio as +If you need drivers that are not included in the wheels, or if you need Pyogrio +to use a newer version of GDAL, consider using `conda-forge` to install Pyogrio as explained above. ### Troubleshooting installation errors From 075cb54ef078e4d0f5a4be6c42055291d494b87c Mon Sep 17 00:00:00 2001 From: Pieter Roggemans Date: Thu, 20 Nov 2025 23:56:38 +0100 Subject: [PATCH 41/41] Small details --- docs/source/install.md | 8 ++++---- docs/source/introduction.md | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/source/install.md b/docs/source/install.md index 84a25fd0..fea515d5 100644 --- a/docs/source/install.md +++ b/docs/source/install.md @@ -49,12 +49,12 @@ platform. Note that the GDAL version included in the binary wheels is not always the latest version and is likely to be a different version than the system GDAL. Please use {attr}`pyogrio.__gdal_version_string__` to get the GDAL version being used by -Pyogrio. Also note that the wheels include the most common GDAL vector drivers +pyogrio. Also note that the wheels include the most common GDAL vector drivers (GeoJSON, ESRI Shapefile, GPKG, FGB, OpenFileGDB, etc), but not all drivers. Use -{func}`pyogrio.list_drivers()` to list the drivers available in Pyogrio. +{func}`pyogrio.list_drivers()` to list the drivers available in pyogrio. -If you need drivers that are not included in the wheels, or if you need Pyogrio -to use a newer version of GDAL, consider using `conda-forge` to install Pyogrio as +If you need drivers that are not included in the wheels, or if you need pyogrio +to use a newer version of GDAL, consider using `conda-forge` to install pyogrio as explained above. ### Troubleshooting installation errors diff --git a/docs/source/introduction.md b/docs/source/introduction.md index f354d169..3e60cae7 100644 --- a/docs/source/introduction.md +++ b/docs/source/introduction.md @@ -213,7 +213,7 @@ Note: the `bbox` values must be in the same CRS as the dataset. Note: if GEOS is present and used by GDAL, only geometries that intersect `bbox` will be returned; if GEOS is not available or not used by GDAL, all geometries with bounding boxes that intersect this bbox will be returned. -`pyogrio.__gdal_geos_version__` will be `None` if GEOS is not detected. +{func}`pyogrio.__gdal_geos_version__` will be `None` if GEOS is not detected. ## Filter records by a geometry @@ -239,7 +239,7 @@ need to convert it to a Shapely geometry before using `mask`. Note: if GEOS is present and used by GDAL, only geometries that intersect `mask` will be returned; if GEOS is not available or not used by GDAL, all geometries with bounding boxes that intersect the bounding box of `mask` will be returned. -`pyogrio.__gdal_geos_version__` will be `None` if GEOS is not detected. +{func}`pyogrio.__gdal_geos_version__` will be `None` if GEOS is not detected. ## Execute a sql query @@ -496,7 +496,7 @@ offsets present. It is possible to use dataset and layer creation options available for a given driver in GDAL (see the relevant [GDAL driver page](https://gdal.org/drivers/vector/index.html)). These -can be passed in as additional `kwargs` to {func}`~write_dataframe` or using +can be passed in as additional `kwargs` to {func}`~pyogrio.write_dataframe` or using dictionaries for dataset or layer-level options. Where possible, Pyogrio uses the metadata of the driver to determine if a