Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-11 Thread Rainer Krug
> On 8 Sep 2018, at 22:47, Spencer Graves > wrote: > > > > On 2018-09-08 14:02, Joshua Ulrich wrote: >> Hi Rainer, >> >> On Wed, Sep 5, 2018 at 2:28 AM, Rainer Krug wrote: >>> Hi >>> >>> I have a package at GitHub (https://github.com/rkrug/ROriginStamp) which I >>> am >>> pre[paring for

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-10 Thread Rainer M Krug
Hi Josh, > On 8 Sep 2018, at 21:02, Joshua Ulrich wrote: > > Hi Rainer, > > On Wed, Sep 5, 2018 at 2:28 AM, Rainer Krug wrote: >> Hi >> >> I have a package at GitHub (https://github.com/rkrug/ROriginStamp) which I am >> pre[paring for CRAN. >> >> It creates a trusted timestamp using the API

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-08 Thread Spencer Graves
On 2018-09-08 14:02, Joshua Ulrich wrote: Hi Rainer, On Wed, Sep 5, 2018 at 2:28 AM, Rainer Krug wrote: Hi I have a package at GitHub (https://github.com/rkrug/ROriginStamp) which I am pre[paring for CRAN. It creates a trusted timestamp using the API fro OriginStamp (https://originstamp.o

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-08 Thread Gábor Csárdi
On Fri, Sep 7, 2018 at 2:53 PM Iñaki Ucar wrote: [...] > For the record, this is what the testthat paper in the R Journal says: > > "[...] I recommend storing your tests in inst/tests/ (so users also > have access to them), then including one file in tests/ that runs all > of the package tests. Th

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-08 Thread Joshua Ulrich
Hi Rainer, On Wed, Sep 5, 2018 at 2:28 AM, Rainer Krug wrote: > Hi > > I have a package at GitHub (https://github.com/rkrug/ROriginStamp) which I am > pre[paring for CRAN. > > It creates a trusted timestamp using the API fro OriginStamp > (https://originstamp.org/home) which requires an API key.

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-08 Thread Duncan Murdoch
On 08/09/2018 2:06 PM, Dirk Eddelbuettel wrote: On 7 September 2018 at 13:08, Gábor Csárdi wrote: | On Fri, Sep 7, 2018 at 12:29 PM Dirk Eddelbuettel wrote: | > | > | > On 7 September 2018 at 09:27, Gábor Csárdi wrote: | > | When are users running tests for packages at all? The tests are by def

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-08 Thread Dirk Eddelbuettel
On 7 September 2018 at 13:08, Gábor Csárdi wrote: | On Fri, Sep 7, 2018 at 12:29 PM Dirk Eddelbuettel wrote: | > | > | > On 7 September 2018 at 09:27, Gábor Csárdi wrote: | > | When are users running tests for packages at all? The tests are by default | > | no even installed with the package. Th

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-07 Thread Dirk Eddelbuettel
On 7 September 2018 at 10:38, Hadley Wickham wrote: | On Fri, Sep 7, 2018 at 9:13 AM Iñaki Ucar wrote: | > El vie., 7 sept. 2018 a las 16:03, Ralf Stubner | > () escribió: | > > On 07.09.2018 15:52, Iñaki Ucar wrote: | > > Tests in 'inst/test' got deprecated later on: | > > | > > https://github

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-07 Thread Spencer Graves
On 2018-09-07 12:10, Duncan Murdoch wrote: ... I would guess because it can’t. If there would be a standardised way of identifying that the test is run on CRAN, I would use this immediately. Then your package would fail when I ran the tests, because I don't have an API key, and I am no

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-07 Thread Duncan Murdoch
On 07/09/2018 3:09 AM, Rainer Krug wrote: On 7 Sep 2018, at 02:16, Duncan Murdoch > wrote: On 06/09/2018 10:32 AM, Hadley Wickham wrote: On Wed, Sep 5, 2018 at 3:03 PM Duncan Murdoch mailto:murdoch.dun...@gmail.com>> wrote: On 05/09/2018 2:20 PM, Henrik Ben

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-07 Thread Hadley Wickham
On Fri, Sep 7, 2018 at 9:13 AM Iñaki Ucar wrote: > > El vie., 7 sept. 2018 a las 16:03, Ralf Stubner > () escribió: > > > > On 07.09.2018 15:52, Iñaki Ucar wrote: > > > For the record, this is what the testthat paper in the R Journal says: > > > > > > "[...] I recommend storing your tests in inst/

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-07 Thread Iñaki Ucar
El vie., 7 sept. 2018 a las 16:03, Ralf Stubner () escribió: > > On 07.09.2018 15:52, Iñaki Ucar wrote: > > For the record, this is what the testthat paper in the R Journal says: > > > > "[...] I recommend storing your tests in inst/tests/ (so users also > > have access to them), then including one

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-07 Thread Ralf Stubner
On 07.09.2018 15:52, Iñaki Ucar wrote: > For the record, this is what the testthat paper in the R Journal says: > > "[...] I recommend storing your tests in inst/tests/ (so users also > have access to them), then including one file in tests/ that runs all > of the package tests. The test_package(p

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-07 Thread Iñaki Ucar
El vie., 7 sept. 2018 a las 15:28, Dirk Eddelbuettel () escribió: > > > On 7 September 2018 at 13:08, Gábor Csárdi wrote: > | On Fri, Sep 7, 2018 at 12:29 PM Dirk Eddelbuettel wrote: > | > > | > > | > On 7 September 2018 at 09:27, Gábor Csárdi wrote: > | > | When are users running tests for packag

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-07 Thread Dirk Eddelbuettel
On 7 September 2018 at 13:08, Gábor Csárdi wrote: | On Fri, Sep 7, 2018 at 12:29 PM Dirk Eddelbuettel wrote: | > | > | > On 7 September 2018 at 09:27, Gábor Csárdi wrote: | > | When are users running tests for packages at all? The tests are by default | > | no even installed with the package. Th

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-07 Thread Duncan Murdoch
On 07/09/2018 4:27 AM, Gábor Csárdi wrote: On Fri, Sep 7, 2018 at 9:01 AM Duncan Murdoch wrote: [...] I think it's useful to think of 3 groups who might run tests: - authors - CRAN - other users of a package. What Hadley was arguing for is that CRAN should identify itself to a packa

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-07 Thread Gábor Csárdi
On Fri, Sep 7, 2018 at 12:29 PM Dirk Eddelbuettel wrote: > > > On 7 September 2018 at 09:27, Gábor Csárdi wrote: > | When are users running tests for packages at all? The tests are by default > | no even installed with the package. The only time I usually do this is when > > Which some people cons

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-07 Thread Dirk Eddelbuettel
On 7 September 2018 at 09:27, Gábor Csárdi wrote: | When are users running tests for packages at all? The tests are by default | no even installed with the package. The only time I usually do this is when Which some people consider to be the wrong decision by testthat. Base R has a set of funct

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-07 Thread Spencer Graves
On 2018-09-07 01:18, David Hugh-Jones wrote: On Fri, 7 Sep 2018 at 01:16, Duncan Murdoch wrote: When packages delete tests just for CRAN, the quality of the repository suffers. Users should be able to check an install by running the tests that passed on CRAN and seeing them pass on their

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-07 Thread David Hugh-Jones
On Fri, 7 Sep 2018 at 09:01, Duncan Murdoch wrote: > > I think it's useful to think of 3 groups who might run tests: > > - authors > - CRAN > - other users of a package. > > What Hadley was arguing for is that CRAN should identify itself to a > package, so that by default a package could ru

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-07 Thread Gábor Csárdi
On Fri, Sep 7, 2018 at 9:01 AM Duncan Murdoch wrote: [...] > > I think it's useful to think of 3 groups who might run tests: > > - authors > - CRAN > - other users of a package. > > What Hadley was arguing for is that CRAN should identify itself to a > package, so that by default a package c

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-07 Thread Duncan Murdoch
On 07/09/2018 2:18 AM, David Hugh-Jones wrote: On Fri, 7 Sep 2018 at 01:16, Duncan Murdoch > wrote: When packages delete tests just for CRAN, the quality of the repository suffers.  Users should be able to check an install by running the tests th

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-07 Thread Rainer Krug
> On 7 Sep 2018, at 02:16, Duncan Murdoch wrote: > > On 06/09/2018 10:32 AM, Hadley Wickham wrote: >> On Wed, Sep 5, 2018 at 3:03 PM Duncan Murdoch >> wrote: >>> >>> On 05/09/2018 2:20 PM, Henrik Bengtsson wrote: I take a complementary approach; I condition on, my home-made, R_TEST

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-06 Thread David Hugh-Jones
On Fri, 7 Sep 2018 at 01:16, Duncan Murdoch wrote: > > > When packages delete tests just for CRAN, the quality of the repository > suffers. Users should be able to check an install by running the tests > that passed on CRAN and seeing them pass on their system as well. In my limited experience

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-06 Thread Duncan Murdoch
On 06/09/2018 10:32 AM, Hadley Wickham wrote: On Wed, Sep 5, 2018 at 3:03 PM Duncan Murdoch wrote: On 05/09/2018 2:20 PM, Henrik Bengtsson wrote: I take a complementary approach; I condition on, my home-made, R_TEST_ALL variable. Effectively, I do: if (as.logical(Sys.getenv("R_TEST_ALL", "F

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-06 Thread Hadley Wickham
On Wed, Sep 5, 2018 at 3:03 PM Duncan Murdoch wrote: > > On 05/09/2018 2:20 PM, Henrik Bengtsson wrote: > > I take a complementary approach; I condition on, my home-made, > > R_TEST_ALL variable. Effectively, I do: > > > > if (as.logical(Sys.getenv("R_TEST_ALL", "FALSE"))) { > > ... > > } > >

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-06 Thread Rainer M Krug
Correct - I should have thought that there is a Hadley-solution to this problem. Thanks, Rainer > On 6 Sep 2018, at 09:25, Thierry Onkelinx wrote: > > Dear Rainer, > > It looks like you are using testthat. testthat has a skip_on_cran() function. > This will always skip the subsequent tests

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-06 Thread Thierry Onkelinx
Dear Rainer, It looks like you are using testthat. testthat has a skip_on_cran() function. This will always skip the subsequent tests in the script unless the environment variable NOT_CRAN is set. Best regards, Thierry ir. Thierry Onkelinx Statisticus / Statistician Vlaamse Overheid / Governm

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-05 Thread Rainer M Krug
> On 5 Sep 2018, at 20:20, Henrik Bengtsson > wrote: > > I take a complementary approach; I condition on, my home-made, > R_TEST_ALL variable. Effectively, I do: > > if (as.logical(Sys.getenv("R_TEST_ALL", "FALSE"))) { > ... > } > > and set R_TEST_ALL=TRU

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-05 Thread Duncan Murdoch
On 05/09/2018 2:20 PM, Henrik Bengtsson wrote: I take a complementary approach; I condition on, my home-made, R_TEST_ALL variable. Effectively, I do: if (as.logical(Sys.getenv("R_TEST_ALL", "FALSE"))) { ... } and set R_TEST_ALL=TRUE when I want to run that part of the test. You can also i

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-05 Thread Henrik Bengtsson
I take a complementary approach; I condition on, my home-made, R_TEST_ALL variable. Effectively, I do: if (as.logical(Sys.getenv("R_TEST_ALL", "FALSE"))) { ... } and set R_TEST_ALL=TRUE when I want to run that part of the test. You can also imagine refined versions of this, e.g. R_TEST_SETS=

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-05 Thread Spencer Graves
On 2018-09-05 12:52, Gábor Csárdi wrote: On Wed, Sep 5, 2018 at 6:34 PM Spencer Graves wrote: The fda package disables some tests on CRAN using: if(!fda::CRAN()){ test you don't want run on CRAN } Seemingly this just checks for a couple of (5 by default) environment variables that m

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-05 Thread Gábor Csárdi
On Wed, Sep 5, 2018 at 6:34 PM Spencer Graves wrote: > > The fda package disables some tests on CRAN using: > > > if(!fda::CRAN()){ > test you don't want run on CRAN > } Seemingly this just checks for a couple of (5 by default) environment variables that match "^_R_": https://github.com/cran

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-05 Thread Spencer Graves
The fda package disables some tests on CRAN using: if(!fda::CRAN()){     test you don't want run on CRAN }   I've used this in other contexts with tests that are too long to run on CRAN but that I want to run otherwise during "R CMD check".   Spencer Graves On 2018-09-05 12:13, P

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-05 Thread Peter Meissner
Hey, Maybe webmockr (or something alike) can help: https://cran.r-project.org/web/packages/webmockr/index.html Best, Peter Rainer M Krug schrieb am Mi., 5. Sep. 2018, 15:38: > OK - thanks. I will than disable the checks for CRAN. > > Thanks, > > Rainer > > > > On 5 Sep 2018, at 15:37, Uwe Ligg

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-05 Thread Rainer M Krug
OK - thanks. I will than disable the checks for CRAN. Thanks, Rainer > On 5 Sep 2018, at 15:37, Uwe Ligges wrote: > > You should not run on CRAN. Note that the checks are done almost daily oin > several platforms, hence the API key is used for about 10 check runs a day. > > Best, > Uwe Ligg

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-05 Thread Uwe Ligges
You should not run on CRAN. Note that the checks are done almost daily oin several platforms, hence the API key is used for about 10 check runs a day. Best, Uwe Ligges On 05.09.2018 09:28, Rainer Krug wrote: Hi I have a package at GitHub (https://github.com/rkrug/ROriginStamp) which I am

[R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-05 Thread Rainer Krug
Hi I have a package at GitHub (https://github.com/rkrug/ROriginStamp) which I am pre[paring for CRAN. It creates a trusted timestamp using the API fro OriginStamp (https://originstamp.org/home) which requires an API key. Now this API should not be made public, as to much traffic through one AP