[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] [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?
--- 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