Skip to content

Remove the deprecated field argument from fl_valley_confine() #53

Description

@NewGraphEnvironment

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions