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

Default scaffoldWidget shouldn't throw devtools::check() errors/warnings #430

Open
ColinFay opened this issue Apr 22, 2022 · 0 comments
Open

Comments

@ColinFay
Copy link

Hey,

When build a default htmlwidget, the base elements throw devtools::check() errors.

Here is a reprex :

cd /tmp/
R -e "usethis::create_package('rrr');setwd('rrr');htmlwidgets::scaffoldWidget('rrr');devtools::document();devtools::check()"
[...] # output truncated 
E  checking package dependencies (4.6s)
   Namespace dependency missing from DESCRIPTION Imports/Depends entries: ‘htmlwidgets’
   
   See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’
   manual.
   
   See
     ‘/private/var/folders/5z/rm2h62lj45d332kfpj28c8zm0000gn/T/RtmpjXzmji/rrr.Rcheck/00check.log’
   for details.
   
   
── R CMD check results ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── rrr 0.0.0.9000 ────
Duration: 5.5s

❯ checking package dependencies ... ERROR
  Namespace dependency missing from DESCRIPTION Imports/Depends entries: ‘htmlwidgets’
  
  See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’
  manual.

1 error ✖ | 0 warnings ✔ | 0 notes ✔
Erreur : R CMD check found ERRORs

I have to manually add {htmlwidgets} as a dep when it could be done automatically.

And still it throws documentation errors :

cd rrr
R -e "devtools::document();devtools::check()"
[...] # truncated
ℹ Updating rrr documentation
ℹ Loading rrr
Avis : [/private/tmp/rrr/R/rrr.R:1] @title Use of HTML blocks is not currently supported
Avis : [/private/tmp/rrr/R/rrr.R:3] @description Use of HTML blocks is not currently supported
Writing NAMESPACE
Writing NAMESPACE
ℹ Updating rrr documentation
ℹ Loading rrr
Avis : [/private/tmp/rrr/R/rrr.R:1] @title Use of HTML blocks is not currently supported
Avis : [/private/tmp/rrr/R/rrr.R:3] @description Use of HTML blocks is not currently supported
Writing NAMESPACE
Writing NAMESPACE
[...] # Truncated
── R CMD check results ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── rrr 0.0.0.9000 ────
Duration: 33.3s

❯ checking DESCRIPTION meta-information ... WARNING
  Invalid license file pointers: LICENSE

❯ checking Rd \usage sections ... WARNING
  Undocumented arguments in documentation object 'rrr'
    ‘message’ ‘width’ ‘height’ ‘elementId’
  
  Functions with \usage entries need to have the appropriate \alias
  entries, and all their arguments documented.
  The \usage entries must correspond to syntactically valid R code.
  See chapter ‘Writing R documentation files’ in the ‘Writing R
  Extensions’ manual.

0 errors ✔ | 2 warnings ✖ | 0 notes ✔

As far as I can tell, the license error is perfectly normal (you can't enforce the license) but HTML entry in doc + the non documentation of default parameter (which are htmlwidget specific so I'm not sure how to document them) could be prevented.

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

No branches or pull requests

1 participant