On Fri, Sep 4, 2020 at 9:20 AM Joshua Ulrich <josh.m.ulr...@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. > Here's an example that I use: > https://github.com/joshuaulrich/quantmod/blob/master/tests/test_getSymbols.R#L4 > > Best, > Josh > > On Fri, Sep 4, 2020 at 3:25 AM Rainer M Krug <rai...@krugs.de> wrote: > > > > 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.k...@uzh.ch > > rai...@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.k...@uzh.ch > > rai...@krugs.de > > Skype: RMkrug > > > > PGP: 0x0F52F982 > > > > ______________________________________________ > > R-package-devel@r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-package-devel > > > > -- > Joshua Ulrich | about.me/joshuaulrich > FOSS Trading | www.fosstrading.com -- Joshua Ulrich | about.me/joshuaulrich FOSS Trading | www.fosstrading.com ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel