On 4 Sep 2020, at 16:22, Joshua Ulrich <josh.m.ulrich at gmail.com> wrote:
On Fri, Sep 4, 2020 at 9:20 AM Joshua Ulrich <josh.m.ulrich at gmail.com <mailto:josh.m.ulrich at gmail.com>> wrote:
Hi Rainer,
You could set an environment variable with the API key, and only run
the tests if the variable is set.
Sorry, I missed that you're already doing this. I confirm that it
works for CRAN. I also set my API key as a private/secure variable on
TravisCI, so the tests will run there.
IIRC, testthat does something similar. You could look at that pattern,
since it works on CRAN for many packages.
I know this has been asked a few times - but I can?t find anything which might help me.
I have a package (https://github.com/rkrug/ROriginStamp) which wraps around API calls to OriginStamp (https://originstamp.com) to obtain trusted time stamps.
The package works, but the tests are the problem on remote machines.
My question is:
1) I have disabled all tests and all examples if there is no environmental variable set with the API Key - is this OK for CRAN?
2) If not, how can I make this CRAN compliant?
Thanks,
Rainer
--
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)
Orcid ID: 0000-0002-7490-0066
Department of Evolutionary Biology and Environmental Studies
University of Z?rich
Office Y34-J-74
Winterthurerstrasse 190
8075 Z?rich
Switzerland
Office: +41 (0)44 635 47 64
Cell: +41 (0)78 630 66 57
email: Rainer.Krug at uzh.ch
Rainer at krugs.de
Skype: RMkrug
PGP: 0x0F52F982
--
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)
Orcid ID: 0000-0002-7490-0066
Department of Evolutionary Biology and Environmental Studies
University of Z?rich
Office Y34-J-74
Winterthurerstrasse 190
8075 Z?rich
Switzerland
Office: +41 (0)44 635 47 64
Cell: +41 (0)78 630 66 57
email: Rainer.Krug at uzh.ch
Rainer at krugs.de
Skype: RMkrug
PGP: 0x0F52F982