Skip to content

[GH-3490] Document the GeoPandas API, STAC and SedonaContext parameters - #3491

Merged
jiayuasu merged 1 commit into
apache:masterfrom
jiayuasu:docs/geopandas-stac-docstrings
Oct 20, 2026
Merged

jiayuasu merged 1 commit into
apache:masterfrom
jiayuasu:docs/geopandas-stac-docstrings

Conversation

@jiayuasu

Copy link
Copy Markdown
Member

Did you read the Contributor Guide?

Is this PR related to a ticket?

What changes were proposed in this PR?

Docstring changes in python/sedona/spark/geopandas, python/sedona/spark/stac/collection_client.py and python/sedona/spark/SedonaContext.py, plus the removal of one duplicate property:

  • Note: lines in NumPy-style docstrings become Notes sections or plain prose in GeoDataFrame.to_arrow, GeoDataFrame.to_feather, GeoSeries.to_json, and SpatialIndex with its query, nearest and intersection methods, so parsers read their Parameters sections correctly.
  • Every parameter now has a description. This covers the GeoDataFrame constructor (dtype, copy), GeoDataFrame.sjoin_nearest (taken from sedona.spark.geopandas.sjoin_nearest), rename_geometry, GeoSeries.from_xy, fillna (inplace), GeoSeries.to_file (schema, not applicable as in GeoDataFrame.to_file), plot (*args, **kwargs), read_parquet (path), SpatialIndex (geometry) and CollectionClient.load_items_df (taken from get_dataframe).
  • **kwargs are documented as what the code does with them: ignored in the GeoDataFrame and GeoSeries constructors, buffer and fillna; passed to json.dumps in to_json and to read_file in GeoSeries.from_file; only table_name read by read_file; ignored with a warning by read_parquet.
  • New docstrings for GeoDataFrame.crs, GeoSeries.geometry, GeoSeries.to_geoframe, GeoSeries.to_spark_pandas and the SedonaContext class.
  • Corrections: GeoSeries.plot no longer documents an s parameter, GeoSeries.from_file creates a GeoSeries, GeoSeries.from_xy says only name is accepted through **kwargs, and read_parquet's example no longer claims to select columns.
  • Removed the second GeoSeries.geometry definition, which was identical to the first and overrode it. There are no other code changes.

How was this patch tested?

  • Parsed the package with griffe and checked every public member's documented parameters against its signature, using the generator for an API reference built from these docstrings. The 59 gaps in the GeoPandas API and STAC client go to none, apart from six GeoPandas methods that raise NotImplementedError and are left out of the reference, and the SedonaContext gap is closed. The rendered pages show every parameter, and the notes render as notes.
  • The files compile, and pre-commit run on them passes.

Did this PR include necessary documentation updates?

  • Yes, this PR updates the Python docstrings.

@jiayuasu jiayuasu added this to the sedona-2.0.0 milestone Oct 20, 2026
@jiayuasu
jiayuasu merged commit b445fe6 into apache:master Oct 20, 2026
33 checks passed
@jiayuasu
jiayuasu deleted the docs/geopandas-stac-docstrings branch October 20, 2026 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GeoPandas API and STAC docstrings leave parameters undocumented or misparsed

1 participant