docs(flood): add missing reference entries, examples, and backend notes#3502
Merged
Conversation
Three public flood functions (vegetation_roughness, vegetation_curve_number, flood_depth_vegetation) were exported but listed in no autosummary block, so they were absent from the rendered API reference. Add them to docs/source/reference/flood.rst. None of the seven public functions had an Examples section or stated which array backends they support. Add a runnable example and a backend note to each docstring, matching the convention used elsewhere in xrspatial. Document NaN propagation for curve_number_runoff and travel_time, which previously omitted it. Documentation only; no behavior changes. Examples were executed against all backends available on the build host.
…ion-flood-2026-06-25 # Conflicts: # .claude/sweep-documentation-state.csv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documentation-only fixes for the flood module, found during a documentation sweep.
API reference
Three public functions were exported in
xrspatial/__init__.pybut listed in noautosummary block, so they did not appear anywhere in the rendered API reference:
vegetation_roughness,vegetation_curve_number, andflood_depth_vegetation.Added them to
docs/source/reference/flood.rst.Examples
None of the seven public functions had an Examples section. Added a runnable
sourcecodeexample to each, matching the convention used by other modules. Everyexample was executed against the backends available on the build host and ran
without error.
Backend notes
No docstring stated which array backends the functions support. All seven dispatch
to NumPy, CuPy, Dask+NumPy, and Dask+CuPy. Added a backend note to each, following
the convention pinned by
test_proximity.test_docstring_states_all_backends(issue #3091).
NaN handling
curve_number_runoffandtravel_timepropagate NaN from their inputs but did notsay so. Added a note to each. The other five functions already documented their NaN
behavior.
Scope
Docstrings, examples, and the
.rstreference page only. No behavior changes.Found by the documentation sweep (deep-sweep).