Skip to content

Add missing API reference docs for ~30 undocumented functions #941

@brendancol

Description

@brendancol

Author of Proposal: xarray-spatial contributors

Reason or Problem

About 30 public functions exported from xrspatial/__init__.py have no entries in the API reference docs under docs/source/reference/. Several module categories (hydrology, terrain metrics, interpolation) have no .rst files at all, and classification.rst only covers 4 of its 10 exported functions.

Proposal

Design:

Add missing entries to existing .rst files and create new .rst pages for undocumented categories:

  1. classification.rst -- add binary, box_plot, head_tail_breaks, maximum_breaks, percentiles, std_mean
  2. hydrology.rst (new) -- flow_accumulation, flow_direction, flow_direction_dinf, flow_length, flow_path, sink, fill, hand, basin, basins, watershed, snap_pour_point, stream_link, stream_order, twi
  3. terrain_metrics.rst (new) -- roughness, tpi, tri
  4. interpolation.rst (new) -- idw, kriging, spline
  5. proximity.rst -- add surface_distance, surface_allocation, surface_direction
  6. surface.rst -- add erode
  7. utilities.rst (new) -- mahalanobis, emerging_hotspots, polygonize, diagnose
  8. index.rst -- add new pages to the toctree

Usage:

After this change, every public function in the package has an API reference entry.

Value:

Gets API reference coverage from ~60% to 100% of exported functions.

Stakeholders and Impacts

Documentation only. No code changes.

Drawbacks

More .rst files to maintain, but they mirror the source modules and follow a mechanical pattern.

Alternatives

Could use a single autodoc directive against __init__.py, but explicit .rst files give better control over grouping.

Unresolved Questions

None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions