[R-pkg-devel] API client package failing due to API authentication
Thank you. I did forget to re-document. I appreciate the help!
On Thu, Oct 26, 2023 at 12:30?PM Ivan Krylov <krylov.r00t at gmail.com> wrote:
? Thu, 26 Oct 2023 11:14:15 -0400 Cole Johanson <coldenjohanson at 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