Skip to content

Document the name parameter in perlin() docstring#3468

Merged
brendancol merged 4 commits into
mainfrom
deep-sweep-api-consistency-perlin-2026-06-23
Jun 24, 2026
Merged

Document the name parameter in perlin() docstring#3468
brendancol merged 4 commits into
mainfrom
deep-sweep-api-consistency-perlin-2026-06-23

Conversation

@brendancol

Copy link
Copy Markdown
Contributor

Closes #3465

perlin() accepts a name parameter that sets the output DataArray name, but the docstring's Parameters section never mentioned it. The sibling generate_terrain() documents the same parameter, so this aligns the two.

  • Add a name : str, default='perlin' entry to the perlin() docstring, matching the generate_terrain style.
  • Add tests: name default and custom value are honored, and the docstring documents the parameter.

Docstring only. No signature change, no behavior change. Backends unaffected (numpy / cupy / dask+numpy / dask+cupy).

Test plan:

  • pytest xrspatial/tests/test_perlin.py (14 passed, GPU paths included on a CUDA host)

@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.

Domain-aware review (API-consistency sweep, perlin module).

Scope check: the diff is exactly the docstring entry plus two focused tests. No signature, behavior, or backend-dispatch changes. The name wording and default='perlin' match the sibling generate_terrain() convention, which is the consistency target.

Blockers: none.

Suggestions: none. test_perlin_name_param covers default and custom values on the numpy path; the name plumbing in perlin() is backend-agnostic (set on the wrapping DataArray after dispatch), so a numpy-only assertion is sufficient and a per-backend matrix would add no signal.

Nits: none.

Verified: pytest xrspatial/tests/test_perlin.py passes 14/14 including the GPU paths on a CUDA host.

@brendancol brendancol merged commit bfaa210 into main Jun 24, 2026
10 checks passed
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.

perlin(): docstring omits the name parameter present in the signature

1 participant