Skip to content

Resolve #4: audit \dontrun{} usage and add missing examples#33

Merged
danmcgraw94 merged 3 commits into
mainfrom
docs/audit-examples
May 13, 2026
Merged

Resolve #4: audit \dontrun{} usage and add missing examples#33
danmcgraw94 merged 3 commits into
mainfrom
docs/audit-examples

Conversation

@danmcgraw94
Copy link
Copy Markdown
Collaborator

@danmcgraw94 danmcgraw94 commented May 13, 2026

\dontrun{} audit

  • Removed wrappers from aep2stage, stage2aep, bootstrap_vfc, flow_frequency_sampler_expected, and hydrograph_setup
  • Added @details to stage2aep documenting the expected approx() ties warning at reservoir discharge capacity ceiling
  • Added inline GEV/LP3 comments to bootstrap_vfc examples
  • Kept \dontrun{} on rfa_simulate with explanatory comment (Expected + Median ~30s, Full ~3-4 hours)

Bug fix

  • rfa_simulate Expected-mode example used jmd_vfc_parameters (single posterior mode row), but Expected mode requires Nbin * Mevent rows. Swapped to jmd_bf_parameter_sets across all three example modes for consistency.

Missing examples

  • theme_rfar_conceptual was rendering near-blank — added example, @return, and fleshed-out description
  • interpolate_aep_matrix, interpolate_stage_matrix, and stage_frequency_curve are @keywords internal and should not appear in user-facing reference; no examples added (pushback on issue scope)
  • Dataset docs already had examples; corrected stale @format row/column counts on jmd_hydro_may1955 (241→121 rows, 2→4 cols), jmd_hydro_pmf (2→4 cols), jmd_hydro_sdf (2→4 cols)

Related

  • Moved ggplot2 from Suggests to Imports (called unconditionally in theme_rfar_conceptual)
  • Dropped tidyverse from Suggests (redundant with specific tidyverse packages already listed)

Notes from R CMD check

  • 0 errors, 0 warnings, 2 environmental NOTEs (USACE firewall blocking CRAN mirror, non-standard CONTRIBUTING.md at top level)
  • Examples >5s callouts: bootstrap_vfc (~7.8s) and flow_frequency_sampler_expected (~7.5s) — both demonstrate realistic pipelines and runtime is dominated by the bootstrap step; retained at full size
  • CONTRIBUTING.md .Rbuildignore fix handled in separate issue

Related Issue

Resolves #4.

(bootstrap_vfc): remove \dontrun{}, clarify GEV/LP3 examples

docs(rfa_simulate): fix Expected-mode parameter set, document runtime
Audit of \dontrun{} usage:

- Remove wrappers from aep2stage, stage2aep, bootstrap_vfc, flow_frequency_sampler_expected, hydrograph_setup

- Add @details to stage2aep documenting expected approx() ties warning

- Add inline GEV/LP3 comments to bootstrap_vfc

- Keep wrapper on rfa_simulate with runtime comment

Bug fix: rfa_simulate Expected-mode example used jmd_vfc_parameters (single posterior mode row) where Nbin*Mevent rows are required. Swapped to jmd_bf_parameter_sets across all three modes.

Missing examples: added example and @return to theme_rfar_conceptual (was rendering blank). Internal helpers (interpolate_aep_matrix, interpolate_stage_matrix, stage_frequency_curve) intentionally left unexposed per @Keywords i
@danmcgraw94 danmcgraw94 changed the title Docs/audit examples Resolve #4: audit \dontrun{} usage and add missing examples May 13, 2026
@danmcgraw94 danmcgraw94 merged commit 11b627f into main May 13, 2026
6 checks passed
@danmcgraw94 danmcgraw94 deleted the docs/audit-examples branch May 13, 2026 21:03
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.

Audit \dontrun{} usage and add missing examples to reference docs

1 participant