Skip to content

docs: standardize roxygen tag @return to @returns across R/ (#1363) - #1417

Open
wangzhengdna-lang wants to merge 2 commits into
pharmaverse:mainfrom
wangzhengdna-lang:1363-docs/roxygen-returns-tag
Open

docs: standardize roxygen tag @return to @returns across R/ (#1363)#1417
wangzhengdna-lang wants to merge 2 commits into
pharmaverse:mainfrom
wangzhengdna-lang:1363-docs/roxygen-returns-tag

Conversation

@wangzhengdna-lang

Copy link
Copy Markdown

Issue

Closes #1363

Description

Project convention (AGENTS.md, and the majority of the codebase) is the roxygen tag @returns, but 12 files still used @return (31 occurrences). This PR is a pure find-replace to @returns, plus one line wrap in R/l_pkcl01.R where the extra character pushed a doc line past the 100-character lint limit.

Files touched: R/exploration_plots.R, R/pk_dose_qc_plot.R, R/filter_breaks.R, R/PKNCA_extra_parameters.R, R/utils-slope_selector.R, R/PKNCA.R, R/flexible_violinboxplot.R, R/utils-plots.R, R/label_operators.R, R/export_cdisc.R, R/get_session_code.R, R/l_pkcl01.R.

No man/ changes: both tags generate identical \value{} sections, so the regenerated documentation is byte-identical.

Definition of Done

  • No @return (without the s) remains in R/
  • devtools::document() run to regenerate man/ (no output changes)
  • lintr and tests pass

How to test

Documentation-only change; no behavior affected. Verified: zero @return (without s) left in R/, lintr::lint_package() 0 lints, full test suite 2005 PASS / 0 FAIL, spellcheck clean.

Contributor checklist

  • Code passes lintr checks
  • Code passes all unit tests
  • New logic covered by unit tests
  • New logic is documented
  • App or package changes are reflected in NEWS
  • Package version is incremented
  • R script works with the new implementation (if applicable)
  • Settings upload works with the new implementation (if applicable)
  • If any .scss change was done, run data-raw/compile_css.R
  • If a package dependency was added/changed, run data-raw/test_suggests_hidden.R

Notes to reviewer

Docs regenerated under the project RoxygenNote 7.3.3 standard produce no man/ diff, so the PR contains only the roxygen source edits.

…rse#1363)

Project convention (AGENTS.md) is @returns; 12 files still used @return
(31 occurrences). Pure find-replace plus one line wrap in l_pkcl01.R to
stay within the 100-char limit. No man/ changes: both tags generate
identical \value sections (docs regenerated under the project's
RoxygenNote 7.3.3 standard remain byte-identical).
…1363)

The 100-char line wrap in the roxygen source changes the \value text in
the generated Rd. Regenerated; the Roxygen CI check (7.3.3) expects it.
@wangzhengdna-lang

Copy link
Copy Markdown
Author

Follow-up commit 662d19f fixes the Man Pages / Roxygen CI failure.

Root cause: the line wrap I made in R/l_pkcl01.R (to stay within the 100-character lint limit) changed the generated \value{} text in man/l_pkcl01.Rd — any roxygen source change, even a pure re-wrap, alters the Rd output. The Roxygen check (7.3.3) regenerated man/ and found the file out of sync with the committed version.

Fix: regenerated man/l_pkcl01.Rd under the project's RoxygenNote 7.3.3 standard; the diff matches the CI expectation exactly. No other changes.

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.

Docs: standardize @return → @returns in roxygen across R/

1 participant