Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[R-package] R CMD CHECK note 'partial argument match' #3629

Closed
jameslamb opened this issue Dec 5, 2020 · 1 comment · Fixed by #3611 or #3630
Closed

[R-package] R CMD CHECK note 'partial argument match' #3629

jameslamb opened this issue Dec 5, 2020 · 1 comment · Fixed by #3611 or #3630

Comments

@jameslamb
Copy link
Collaborator

Moving this discussion from #3611 (comment).

R CMD CHECK on the R package currently produces the following note:

checking R code for possible problems ... NOTE
partial argument match of 'data' to 'dataset'
lgb.cv : : warning in getinfo(data = data, name =
"init_score"): partial argument match of 'data' to 'dataset'
lgb.cv : : warning in getinfo(data = data, name = "weight"):

What this NOTE means and how to fix it

R supports partial argument matching. If the name of a keyword argument is close to an actual keyword argument, R will allow it.

f <- function(data = 5){return(data + 1)}

f(dat = 11)
# [1] 12

These getinfo() keyword arguments were introduced in the work to close #3390 . The immediate fix for them is to just change those uses to dataset =

Why wasn't this caught by CI?

When testing the R package today, R CMD CHECK produces few NOTEs that we know we can safely ignore because they aren't relevant to CRAN.

  • "installed package size..."
  • "maintainer is..."

The mechanism we use for this is to allow a maximum number of NOTEs in CI

When the R package was successfully released to CRAN in version 3.1.0, the "maintainer is..." NOTE was no longer thrown. Because we didn't notice this and didn't change the ALLOWED_CHECK_NOTES threshold in CI, this "partial argument match" was note caught by CI on #3617

How to close this issue

Open a PR with the following changes

jameslamb added a commit that referenced this issue Dec 7, 2020
 #3629) (#3630)

* [ci] [R-package] fix issue with partial argument name matches

* fix partial name matches

* simpler NOTE check

* change conditions

* simplify
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
1 participant