Skip to content

docs: fix current API keywords in usage examples - #524

Open
dajiaohuang wants to merge 1 commit into
DataverseLabs:mainfrom
dajiaohuang:docs/current-api-examples-20261016
Open

dajiaohuang wants to merge 1 commit into
DataverseLabs:mainfrom
dajiaohuang:docs/current-api-examples-20261016

Conversation

@dajiaohuang

Copy link
Copy Markdown

Package version (main branch)

1.2.1

Description

Correct documentation examples that currently raise TypeError because their keyword arguments no longer match the public APIs:

  • README: ordinary_kriging(..., unknown_location=...) → unknown_locations=...; index the single returned row before describing its fields.
  • IDW example: unknown_locations=... → unknown_location=....
  • PointSupport examples: ps_blocks=BLOCKS → blocks=BLOCKS in the constructor examples across the API docstrings.
  • README: point dependency information to the existing pyproject.toml, rather than nonexistent SETUP.md/setup.cfg, and correct test to tests.

No runtime behavior, signatures, models, dependencies, or license terms change.

Problem

Copying the current examples fails before interpolation/point-support construction. The README also shows a flat result although ordinary kriging returns one row per location.

Validation

  • Installed the project with Python 3.13.8 on Windows.
  • Executed README steps 2–5 with an invented, fixed-seed 24-point GeoDataFrame in place of the external dataset load, and the documented IDW/PointSupport call expressions with invented point/polygon data. Before: unsupported-keyword errors; after: all 19 selected expressions/snippets pass.
  • Selected existing synthetic tests: pytest -q tests/test_idw/test_idw.py tests/test_core/test_points_data_models.py — 17 passed, one existing GeoPandas FutureWarning.
  • Checked that all changed Python ASTs are identical after stripping docstrings; git diff --check passes.

Package check

  • Full test suite: not run locally; validation was limited to synthetic fixtures and the affected documentation calls, without running bundled geographic/health-data fixtures or full notebooks.
  • Documentation sources updated.
  • All tutorials: not executed; generated Sphinx HTML not regenerated.

The synthetic checks validate these API examples, not the scientific accuracy of every interpolation method or a cross-platform test matrix.

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.

1 participant