Conversation
…tParams Co-Authored-By: Claude Sonnet 5
|
This is how benchmark results would change (along with a 95% confidence interval in relative change) if 81e2dd3 is merged into main:
|
| \item{x}{A \code{sir} object, returned by the \code{sir()} function.} | ||
|
|
||
| \item{\dots}{Additional arguments, ignored currently.} | ||
| \item{\dots}{For \code{sir()} and \code{time_bins()}, these dots must be empty. For |
There was a problem hiding this comment.
I wonder whether in the cases of having the dots for S3 method consistency, the code should error and then we could stop documenting the dots differently.
|
Thanks. Let's do another review. How to avoid this happening again? When we are at zero warnings, we could set strict roxygen2 mode without warnings in CI/CD. |
|
There is no built-in strict mode to flip: on roxygen2 8.0.0.9000 the supported warns <- character()
withCallingHandlers(
roxygen2::roxygenize(),
warning = function(w) {
warns <<- c(warns, conditionMessage(w))
invokeRestart("muffleWarning")
}
)
if (length(warns)) {
stop(
"roxygen2 emitted ", length(warns), " warning(s):\n",
paste("-", warns, collapse = "\n")
)
}I would prefer that over Two caveats before turning it on:
Also pushed in the same batch, from re-reading the diff against the actual signatures:
One thing I did not touch: the |
|
Danke @schochastics! |
…pics - cliques: drop five `@inheritParams rlang::args_dots_empty` that roxygen2 rejects because the parent block already documents `...` for the topic. The `weighted_cliques` parent keeps its own, it is the only dots doc there. - merge_coords(): its dots must be empty, only `layout_components()` forwards them to the layout function. Split the shared text accordingly. - layout_spec: retitle for `layout_()` as well as `add_layout_()`, which is the main entry point, and add examples. - constructor_spec: retitle to include `graph_()`, point at the other specification functions documented with their constructors, and add examples. - Give both topics their own family instead of "deterministic constructors" (`degseq()` is not deterministic) and "graph layouts", with matching `_pkgdown.yml` entries. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
This is how benchmark results would change (along with a 95% confidence interval in relative change) if c4c4584 is merged into main:
|
Co-Authored-By: Claude Sonnet 5
Running
document()generated warnings about useless inheritParams.I think that when we added dots to force users to name optional parameters, we might have not paid enough attention to the resulting manual pages. When a function with the "rlang dots" was documented on the same page as a function with other dots (dots actually forwarded to another function), the documentation used the docs of that other dots params, which is incorrect.