[R-pkg-devel] CRAN Debian File Handling Differences?
--- Begin Message --- Dear R Package Development Community, I'm working on some CRAN Debian test failures (https://win-builder.r-project.org/incoming_pretest/ncdfgeom_1.0.0_20190423_031452/). The tests all pass on rhub Debian, CRAN windows, local OSX, and Travis Ubuntu. The tests that are failing on CRAN Debian are ones where I check that changes got made to an existing file that is modified in place by my package code. Are there nuances of the CRAN environment that prevent a `tempfile()` file being created then modified at run time? What is a suggested best practice for such a test? I may just disable this set of tests on CRAN for the time being since it passes on so many environments, but want to do my due diligence and decrease fragility as much as possible. Thanks for any guidance you can offer. Regards, - Dave --- End Message --- __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] CRAN Debian File Handling Differences?
On Tue, 23 Apr 2019 at 15:57, David Blodgett via R-package-devel wrote: > > I'm working on some CRAN Debian test failures > (https://win-builder.r-project.org/incoming_pretest/ncdfgeom_1.0.0_20190423_031452/). > The tests all pass on rhub Debian, CRAN windows, local OSX, and Travis > Ubuntu. The tests that are failing on CRAN Debian are ones where I check that > changes got made to an existing file that is modified in place by my package > code. > > Are there nuances of the CRAN environment that prevent a `tempfile()` file > being created then modified at run time? What is a suggested best practice > for such a test? According to the current master branch, the test that fails is not using tempfile(), but "nc_file<-'data/test_output.nc'". Just change that line with a call to tempfile and the test should pass. -- Iñaki Úcar __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] [EXTERNAL] Re: CRAN Debian File Handling Differences?
--- Begin Message --- OK. Thank you. I'm always nervous about closing and re-opening a tempfile() but I suppose it is safe. Should I interpret your response as saying that creating and mutating files in "tests/testthat/data" is not possible on CRAN? Thank you, - Dave > On Apr 23, 2019, at 10:16 AM, Iñaki Ucar wrote: > > On Tue, 23 Apr 2019 at 15:57, David Blodgett via R-package-devel > wrote: >> >> I'm working on some CRAN Debian test failures >> (https://win-builder.r-project.org/incoming_pretest/ncdfgeom_1.0.0_20190423_031452/). >> The tests all pass on rhub Debian, CRAN windows, local OSX, and Travis >> Ubuntu. The tests that are failing on CRAN Debian are ones where I check >> that changes got made to an existing file that is modified in place by my >> package code. >> >> Are there nuances of the CRAN environment that prevent a `tempfile()` file >> being created then modified at run time? What is a suggested best practice >> for such a test? > > According to the current master branch, the test that fails is not > using tempfile(), but "nc_file<-'data/test_output.nc'". Just change > that line with a call to tempfile and the test should pass. > > -- > Iñaki Úcar --- End Message --- __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] [EXTERNAL] Re: CRAN Debian File Handling Differences?
On Tue, 23 Apr 2019 at 17:24, David Blodgett wrote: > > OK. Thank you. I'm always nervous about closing and re-opening a tempfile() > but I suppose it is safe. > > Should I interpret your response as saying that creating and mutating files > in "tests/testthat/data" is not possible on CRAN? >From CRAN Repository Policy: - Packages should not write in the user’s home filespace (including clipboards), nor anywhere else on the file system apart from the R session’s temporary directory (or during installation in the location pointed to by TMPDIR: and such usage should be cleaned up). -- Iñaki Úcar __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] [EXTERNAL] Re: CRAN Debian File Handling Differences?
--- Begin Message --- I see. Thank you for the clarification. I did not realize this applied to testing as well as package functionality. > On Apr 23, 2019, at 10:28 AM, Iñaki Ucar wrote: > > On Tue, 23 Apr 2019 at 17:24, David Blodgett wrote: >> >> OK. Thank you. I'm always nervous about closing and re-opening a tempfile() >> but I suppose it is safe. >> >> Should I interpret your response as saying that creating and mutating files >> in "tests/testthat/data" is not possible on CRAN? > > From CRAN Repository Policy: > > - Packages should not write in the user’s home filespace (including > clipboards), nor anywhere else on the file system apart from the R > session’s temporary directory (or during installation in the location > pointed to by TMPDIR: and such usage should be cleaned up). > > -- > Iñaki Úcar --- End Message --- __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
[R-pkg-devel] Linux Errors on RHub
--- Begin Message --- Hi All: I am checking a package I am hoping to submit to CRAN on RHub. The Windows and Fedora runs worked but the Ubuntu test ended because of the following: > #> Warning messages: > 3203#> 1: In i.p(...) : installation of package ‘rgdal’ had non-zero exit > status > 3204#> 2: In i.p(...) : installation of package ‘sf’ had non-zero exit status > 3205#> 3: In i.p(...) : I have a few details to work out on Mac and Windows tests (capitalization, a note to CRAN that a spelling is correct, reduce times of examples), but given that rgdal and sf are packages on CRAN if I can clean up the other items is it appropriate to go ahead and submit? Thanks, -Roy ** "The contents of this message do not reflect any position of the U.S. Government or NOAA." ** Roy Mendelssohn Supervisory Operations Research Analyst NOAA/NMFS Environmental Research Division Southwest Fisheries Science Center ***Note new street address*** 110 McAllister Way Santa Cruz, CA 95060 Phone: (831)-420-3666 Fax: (831) 420-3980 e-mail: roy.mendelss...@noaa.gov www: http://www.pfeg.noaa.gov/ "Old age and treachery will overcome youth and skill." "From those who have been given much, much will be expected" "the arc of the moral universe is long, but it bends toward justice" -MLK Jr. --- End Message --- __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Linux Errors on RHub
Roy, I don't have an answer for you, but I have a similar issue. Does your code happen to have a C++ component that takes a long time to compile? On Tue, Apr 23, 2019 at 5:11 PM Roy Mendelssohn - NOAA Federal via R-package-devel wrote: > > > > -- Forwarded message -- > From: Roy Mendelssohn - NOAA Federal > To: Roy Mendelssohn - NOAA Federal via R-package-devel < > r-package-devel@r-project.org> > Cc: > Bcc: > Date: Tue, 23 Apr 2019 17:11:14 -0700 > Subject: Linux Errors on RHub > Hi All: > > I am checking a package I am hoping to submit to CRAN on RHub. The > Windows and Fedora runs worked but the Ubuntu test ended because of the > following: > > > #> Warning messages: > > 3203#> 1: In i.p(...) : installation of package ‘rgdal’ had non-zero > exit status > > 3204#> 2: In i.p(...) : installation of package ‘sf’ had non-zero exit > status > > 3205#> 3: In i.p(...) : > > I have a few details to work out on Mac and Windows tests (capitalization, > a note to CRAN that a spelling is correct, reduce times of examples), but > given that rgdal and sf are packages on CRAN if I can clean up the other > items is it appropriate to go ahead and submit? > > Thanks, > > -Roy > > > ** > "The contents of this message do not reflect any position of the U.S. > Government or NOAA." > ** > Roy Mendelssohn > Supervisory Operations Research Analyst > NOAA/NMFS > Environmental Research Division > Southwest Fisheries Science Center > ***Note new street address*** > 110 McAllister Way > Santa Cruz, CA 95060 > Phone: (831)-420-3666 > Fax: (831) 420-3980 > e-mail: roy.mendelss...@noaa.gov www: http://www.pfeg.noaa.gov/ > > "Old age and treachery will overcome youth and skill." > "From those who have been given much, much will be expected" > "the arc of the moral universe is long, but it bends toward justice" -MLK > Jr. > > > > > -- Forwarded message -- > From: Roy Mendelssohn - NOAA Federal via R-package-devel < > r-package-devel@r-project.org> > To: Roy Mendelssohn - NOAA Federal via R-package-devel < > r-package-devel@r-project.org> > Cc: > Bcc: > Date: Tue, 23 Apr 2019 17:11:14 -0700 > Subject: [R-pkg-devel] Linux Errors on RHub > __ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel > [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Linux Errors on RHub
The examples are dual purpose. They work like unit tests, and they show humans how the code works. If you have a separate unit testing section you can mock out the parts that take a long time (e.g. "get data from..."). Then just put the slow bits in your .Rd files into \dontrun blocks. On Tue, Apr 23, 2019 at 5:54 PM Roy Mendelssohn - NOAA Federal < roy.mendelss...@noaa.gov> wrote: > No C++ in my package, but I think sf or rgdal may have c++. I have > graphics examples overlaying grids on maps using ggplot2. trying to get > those under 5 sec and still have a meaningful example is nigh impossible. > I mean I can make up an example that will be under 5 sec, but it will > neither be illuminating nor testing of anything. I have even included the > test data in the package so that it is faster, (this package maps data from > a package that downloads data from a web service) but I am still not > there. Also the times I get at home are about half of what CRAN or RHub > get. > > I have a similar problem with a package that downloads data from a web > service. Even the most minimal example takes more than 5 seconds. I fully > understand CRAN's position. When you have 1000s of package to test on > different OS, if everything takes too long it would be a disaster. At the > same time, basically the last three days I have been trying to figure out > how to get the times down. > > -Roy > > On Apr 23, 2019, at 5:33 PM, Steven Scott > wrote: > > Roy, I don't have an answer for you, but I have a similar issue. > Does your code happen to have a C++ component that takes a long time to > compile? > > On Tue, Apr 23, 2019 at 5:11 PM Roy Mendelssohn - NOAA Federal via > R-package-devel wrote: > > > > -- Forwarded message -- > From: Roy Mendelssohn - NOAA Federal > To: Roy Mendelssohn - NOAA Federal via R-package-devel < > r-package-devel@r-project.org> > Cc: > Bcc: > Date: Tue, 23 Apr 2019 17:11:14 -0700 > Subject: Linux Errors on RHub > Hi All: > > I am checking a package I am hoping to submit to CRAN on RHub. The > Windows and Fedora runs worked but the Ubuntu test ended because of the > following: > > #> Warning messages: > 3203#> 1: In i.p(...) : installation of package ‘rgdal’ had non-zero exit > status > 3204#> 2: In i.p(...) : installation of package ‘sf’ had non-zero exit > status > 3205#> 3: In i.p(...) : > > > I have a few details to work out on Mac and Windows tests (capitalization, > a note to CRAN that a spelling is correct, reduce times of examples), but > given that rgdal and sf are packages on CRAN if I can clean up the other > items is it appropriate to go ahead and submit? > > Thanks, > > -Roy > > > ** > "The contents of this message do not reflect any position of the U.S. > Government or NOAA." > ** > Roy Mendelssohn > Supervisory Operations Research Analyst > NOAA/NMFS > Environmental Research Division > Southwest Fisheries Science Center > ***Note new street address*** > 110 McAllister Way > Santa Cruz, CA 95060 > Phone: (831)-420-3666 > Fax: (831) 420-3980 > e-mail: roy.mendelss...@noaa.gov www: http://www.pfeg.noaa.gov/ > > "Old age and treachery will overcome youth and skill." > "From those who have been given much, much will be expected" > "the arc of the moral universe is long, but it bends toward justice" -MLK > Jr. > > > > > -- Forwarded message -- > From: Roy Mendelssohn - NOAA Federal via R-package-devel < > r-package-devel@r-project.org> > To: Roy Mendelssohn - NOAA Federal via R-package-devel < > r-package-devel@r-project.org> > Cc: > Bcc: > Date: Tue, 23 Apr 2019 17:11:14 -0700 > Subject: [R-pkg-devel] Linux Errors on RHub > __ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel > > > ** > "The contents of this message do not reflect any position of the U.S. > Government or NOAA." > ** > Roy Mendelssohn > Supervisory Operations Research Analyst > NOAA/NMFS > Environmental Research Division > Southwest Fisheries Science Center > ***Note new street address*** > 110 McAllister Way > Santa Cruz, CA 95060 > Phone: (831)-420-3666 > Fax: (831) 420-3980 > e-mail: roy.mendelss...@noaa.gov www: http://www.pfeg.noaa.gov/ > > "Old age and treachery will overcome youth and skill." > "From those who have been given much, much will be expected" > "the arc of the moral universe is long, but it bends toward justice" -MLK > Jr. > > [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Linux Errors on RHub
--- Begin Message --- Have already done that. Just to run a couple reasonable examples is taking 12 seconds. On my laptop from home it is more like 8 seconds, which if you put in the CRAN note with steps taken they will usually allow. Again, so I don't seem like I am criticizing CRAN, I fully understand their requirement. However, ggplot2 is just slow drawing maps and overlaying raster or polygons on that map. Th package does both base maps and ggplot2 maps. The former render much faster than the latter. Also it is faster if I just save the graphic to an object and not display it, is that kosher for examples? Thanks, -Roy > On Apr 23, 2019, at 5:59 PM, Steven Scott > wrote: > > The examples are dual purpose. They work like unit tests, and they show > humans how the code works. If you have a separate unit testing section you > can mock out the parts that take a long time (e.g. "get data from..."). Then > just put the slow bits in your .Rd files into \dontrun blocks. > > On Tue, Apr 23, 2019 at 5:54 PM Roy Mendelssohn - NOAA Federal > wrote: > No C++ in my package, but I think sf or rgdal may have c++. I have graphics > examples overlaying grids on maps using ggplot2. trying to get those under 5 > sec and still have a meaningful example is nigh impossible. I mean I can > make up an example that will be under 5 sec, but it will neither be > illuminating nor testing of anything. I have even included the test data in > the package so that it is faster, (this package maps data from a package that > downloads data from a web service) but I am still not there. Also the times > I get at home are about half of what CRAN or RHub get. > > I have a similar problem with a package that downloads data from a web > service. Even the most minimal example takes more than 5 seconds. I fully > understand CRAN's position. When you have 1000s of package to test on > different OS, if everything takes too long it would be a disaster. At the > same time, basically the last three days I have been trying to figure out > how to get the times down. > > -Roy > >> On Apr 23, 2019, at 5:33 PM, Steven Scott >> wrote: >> >> Roy, I don't have an answer for you, but I have a similar issue. >> Does your code happen to have a C++ component that takes a long time to >> compile? >> >> On Tue, Apr 23, 2019 at 5:11 PM Roy Mendelssohn - NOAA Federal via >> R-package-devel wrote: >> >> >> >> -- Forwarded message -- >> From: Roy Mendelssohn - NOAA Federal >> To: Roy Mendelssohn - NOAA Federal via R-package-devel >> >> Cc: >> Bcc: >> Date: Tue, 23 Apr 2019 17:11:14 -0700 >> Subject: Linux Errors on RHub >> Hi All: >> >> I am checking a package I am hoping to submit to CRAN on RHub. The Windows >> and Fedora runs worked but the Ubuntu test ended because of the following: >> >>> #> Warning messages: >>> 3203#> 1: In i.p(...) : installation of package ‘rgdal’ had non-zero exit >>> status >>> 3204#> 2: In i.p(...) : installation of package ‘sf’ had non-zero exit >>> status >>> 3205#> 3: In i.p(...) : >> >> I have a few details to work out on Mac and Windows tests (capitalization, a >> note to CRAN that a spelling is correct, reduce times of examples), but >> given that rgdal and sf are packages on CRAN if I can clean up the other >> items is it appropriate to go ahead and submit? >> >> Thanks, >> >> -Roy >> >> >> ** >> "The contents of this message do not reflect any position of the U.S. >> Government or NOAA." >> ** >> Roy Mendelssohn >> Supervisory Operations Research Analyst >> NOAA/NMFS >> Environmental Research Division >> Southwest Fisheries Science Center >> ***Note new street address*** >> 110 McAllister Way >> Santa Cruz, CA 95060 >> Phone: (831)-420-3666 >> Fax: (831) 420-3980 >> e-mail: roy.mendelss...@noaa.gov www: http://www.pfeg.noaa.gov/ >> >> "Old age and treachery will overcome youth and skill." >> "From those who have been given much, much will be expected" >> "the arc of the moral universe is long, but it bends toward justice" -MLK Jr. >> >> >> >> >> -- Forwarded message -- >> From: Roy Mendelssohn - NOAA Federal via R-package-devel >> >> To: Roy Mendelssohn - NOAA Federal via R-package-devel >> >> Cc: >> Bcc: >> Date: Tue, 23 Apr 2019 17:11:14 -0700 >> Subject: [R-pkg-devel] Linux Errors on RHub >> __ >> R-package-devel@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-package-devel > > ** > "The contents of this message do not reflect any position of the U.S. > Government or NOAA." > ** > Roy Mendelssohn > Supervisory Operations Research Analyst > NOAA/NMFS > Environmental Research Division > Southwest Fisheries Science Center > ***Note new street address*** > 110 McAllister Way > Santa Cruz, CA 95060 > Phone: (831)-420-3666 > Fax: (831) 420-3980 > e-mail: