Skip to content

perlin: document name param, float-dtype requirement, and ValueError#3467

Merged
brendancol merged 2 commits into
mainfrom
deep-sweep-documentation-perlin-2026-06-23
Jun 23, 2026
Merged

perlin: document name param, float-dtype requirement, and ValueError#3467
brendancol merged 2 commits into
mainfrom
deep-sweep-documentation-perlin-2026-06-23

Conversation

@brendancol

Copy link
Copy Markdown
Contributor

Documentation-only fix for perlin() docstring drift found by the documentation sweep.

The docstring listed only agg, freq, and seed in Parameters, but the signature is perlin(agg, freq=(1, 1), seed=5, name='perlin'). It also said nothing about the float-dtype requirement the function enforces.

No behavior change. Only the docstring was edited.

Backends: not applicable (no code path touched; all four backends unchanged).

Test plan:

  • pytest xrspatial/tests/test_perlin.py -> 12 passed
  • docstring example runs and reproduces the documented output array
  • every signature parameter except agg now appears in Parameters; Raises section present

Note: the upstream repo has GitHub issues disabled, so there is no linked issue number.

The perlin() docstring listed only agg, freq, and seed in Parameters,
omitting the name parameter. It also said nothing about the float-dtype
requirement that the function enforces, nor the ValueError it raises on
integer input (guarded by test_perlin_rejects_integer_dtype, regression
from #1232).

Documents name, notes the float-dtype requirement on agg, and adds a
Raises section. Docstring-only; no behavior change. Records the
documentation sweep state for perlin.

@brendancol brendancol left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review: perlin docstring fix

Documentation-only change. The diff edits the perlin() docstring and adds a sweep-state CSV row. No source behavior changes.

Blockers

None.

Suggestions

None.

Nits

None.

What looks good

  • The new Parameters entry for name matches the signature default ('perlin') and the actual use at the return site.
  • The float-dtype note and Raises section match the real guard in perlin() and the contract codified by test_perlin_rejects_integer_dtype (regression from #1232).
  • The docstring example still reproduces its documented output array; the perlin test suite passes (12/12).
  • Every signature parameter except agg now appears in Parameters.

Checklist

  • Algorithm matches reference/paper: n/a (no code change)
  • All implemented backends produce consistent results: n/a (no code change)
  • NaN handling correct: n/a
  • Edge cases covered by tests: existing coverage unchanged and passing
  • Dask chunk boundaries handled correctly: n/a
  • No premature materialization: n/a
  • Benchmark exists or not needed: not needed
  • README feature matrix updated: not applicable (no new function, no backend change)
  • Docstrings present and accurate: yes, this PR fixes the drift

@brendancol brendancol merged commit 60560f8 into main Jun 23, 2026
10 checks passed
@brendancol brendancol deleted the deep-sweep-documentation-perlin-2026-06-23 branch June 25, 2026 14:55
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