[R-pkg-devel] API client package failing due to API authentication

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Thu Oct 26 18:30:29 CEST 2023


В Thu, 26 Oct 2023 11:14:15 -0400
Cole Johanson <coldenjohanson using gmail.com> пишет:

> I have wrapped the examples with the roxygen2 tag *\dontrun*, but it
> is still attempting to run the examples.

Judging by the latest commit at
<https://github.com/cole-johanson/smartsheetr/commit/5e4f8fb23b1f9d91c5941d9f116f7f076d785d8f>,
you forgot to run roxygen2::roxygenise() to regenerate the man/*.Rd
files (which is what R cares about). Your use of the Rd tag \dontrun{}
is otherwise fine and should prevent the code from being run.

I am not sure whether it's acceptable to \dontrun{} every possible test
and example, but if the code useless without a valid API key, so be it.
Maybe you could write your examples in
if(nzchar(getenv('SMARTSHEET_API_TOKEN'))) withAutoprint({ ... })
instead to make it possible to run

SMARTSHEET_API_TOKEN=YOURTOKEN R CMD check shartsheetr*.tar.gz

...and have all the tests run, the way your CI is currently set up.

-- 
Best regards,
Ivan




More information about the R-package-devel mailing list