Message-ID: <20231026193029.7c685302@arachnoid>
Date: 2023-10-26T16:30:29Z
From: Ivan Krylov
Subject: [R-pkg-devel] API client package failing due to API authentication
In-Reply-To: <CABm0ymkJvxQPL7eqOjbhvJJHrPYzQc8dJcMmvQJUsRD0GOqLqg@mail.gmail.com>
? 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