Skip to content

Rationalize a vignette that should execute no code #301

@einsibjarni

Description

@einsibjarni

I'm the maintainer of the FreeBSD port of gargle.

I'm updating the package to 1.6.0 but when I run the tests I get this error:

* checking running R code from vignettes ...
  'auth-from-web.Rmd' using 'UTF-8'... OK
  'gargle-auth-in-client-package.Rmd' using 'UTF-8'... OK
  'get-api-credentials.Rmd' using 'UTF-8'... OK
  'how-gargle-gets-tokens.Rmd' using 'UTF-8'... OK
  'non-interactive-auth.Rmd' using 'UTF-8'... failed
  'oauth-client-not-app.Rmd' using 'UTF-8'... OK
  'request-helper-functions.Rmd' using 'UTF-8'... OK
  'troubleshooting.Rmd' using 'UTF-8'... OK
 WARNING
Errors in running code in vignettes:
when running code in 'non-interactive-auth.Rmd'
  ...

> options(gargle_oauth_email = TRUE)

> options(gargle_oauth_email = "*@example.com")

> library(googledrive)

  When sourcing 'non-interactive-auth.R':
Error: there is no package called 'googledrive'
Execution halted

* checking re-building of vignette outputs ... SKIPPED

If I add a dependency for R-cran-googledrive I get a different error:

* checking running R code from vignettes ...
  'auth-from-web.Rmd' using 'UTF-8'... OK
  'gargle-auth-in-client-package.Rmd' using 'UTF-8'... OK
  'get-api-credentials.Rmd' using 'UTF-8'... OK
  'how-gargle-gets-tokens.Rmd' using 'UTF-8'... OK
  'non-interactive-auth.Rmd' using 'UTF-8'... failed
  'oauth-client-not-app.Rmd' using 'UTF-8'... OK
  'request-helper-functions.Rmd' using 'UTF-8'... OK
  'troubleshooting.Rmd' using 'UTF-8'... OK
 ERROR
Errors in running code in vignettes:
when running code in 'non-interactive-auth.Rmd'
  ...
> drive_auth(email = "jenny@example.com")

  When sourcing 'non-interactive-auth.R':
Error: Can't get Google credentials.
i Are you running googledrive in a non-interactive session? Consider:
* Call `drive_deauth()` to prevent the attempt to get credentials.
* Call `drive_auth()` directly with all necessary specifics.
i See gargle's "Non-interactive auth" vignette for more details:
i <https://gargle.r-lib.org/articles/non-interactive-auth.html>
Execution halted

* checking re-building of vignette outputs ... SKIPPED
* DONE

So it seems we're missing googledrive from Suggests: and even
if that is added, the tests are not running correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions