Problem
0.6.0 renamed fl_valley_confine()'s field argument to a required area_field (#47) and kept
field as a deprecated alias that warns and forwards. That shim is a one-release courtesy, not a
permanent second spelling — while it exists, field = "channel_width" still runs, warning but
producing the wrong floodplain.
Remove it once the known callers have moved.
Known callers still on field =
floodplains/scripts/floodplain_lcc/02_floodplain_model.R:148 — the production driver. Works
today on the deprecation warning; needs a one-word edit to area_field.
Nothing inside flooded uses it: every vignette, example, test and the README moved in the same PR.
What removal looks like
- Drop
field = NULL from the signature and the shim block in R/fl_valley_confine.R
- Drop
@param field from the roxygen
- Drop the three shim tests in
tests/testthat/test-fl_valley_confine.R
("deprecated field= warns and forwards", "area_field wins when both spellings are supplied", and
the expect_no_warning negative control's counterpart)
- Note the removal in
NEWS.md — it is a hard break for anyone who ignored the warning
Not covered by removal
The residual from #47 that no argument change can close: fl_valley_confine() accepts a
pre-rasterized SpatRaster and cannot inspect what quantity its cells hold. 0.6.0 warns when the
layer is named after fl_stream_rasterize()'s "channel_width" default, which catches the one
composition the package's defaults lead you into, but a raster burned from any other wrong column
is undetectable. That is stated in the roxygen and in NEWS rather than guarded, deliberately — a
magnitude guard cannot separate a small headwater basin from a channel width.
Problem
0.6.0 renamed
fl_valley_confine()'sfieldargument to a requiredarea_field(#47) and keptfieldas a deprecated alias that warns and forwards. That shim is a one-release courtesy, not apermanent second spelling — while it exists,
field = "channel_width"still runs, warning butproducing the wrong floodplain.
Remove it once the known callers have moved.
Known callers still on
field =floodplains/scripts/floodplain_lcc/02_floodplain_model.R:148— the production driver. Workstoday on the deprecation warning; needs a one-word edit to
area_field.Nothing inside
floodeduses it: every vignette, example, test and the README moved in the same PR.What removal looks like
field = NULLfrom the signature and the shim block inR/fl_valley_confine.R@param fieldfrom the roxygentests/testthat/test-fl_valley_confine.R("deprecated field= warns and forwards", "area_field wins when both spellings are supplied", and
the
expect_no_warningnegative control's counterpart)NEWS.md— it is a hard break for anyone who ignored the warningNot covered by removal
The residual from #47 that no argument change can close:
fl_valley_confine()accepts apre-rasterized
SpatRasterand cannot inspect what quantity its cells hold. 0.6.0 warns when thelayer is named after
fl_stream_rasterize()'s"channel_width"default, which catches the onecomposition the package's defaults lead you into, but a raster burned from any other wrong column
is undetectable. That is stated in the roxygen and in NEWS rather than guarded, deliberately — a
magnitude guard cannot separate a small headwater basin from a channel width.