Re: [R-pkg-devel] CRAN rules re. web scraping?
On Thu, 23 Jan 2020 at 02:49, Spencer Graves wrote: > > Hello, All: > > > GOOD NEWS AND BAD NEWS: > > >* First the good news: I heard from Brian Ripley; see below. > His web site says, "He retired in August 2014 on grounds of ill health." > (http://www.stats.ox.ac.uk/~ripley/) I was pleased to see that he seems > to be well enough to send me the email below. > > >* BAD NEWS: My Ecfun package is violating current CRAN rules > regarding "not writing anywhere in the file space". (See below.) > > > QUESTION: > > >How do you suggest I respond to this? > > >It's hard for me to fix, because I cannot replicate the error and > I don't understand the rules Prof. Ripley is trying to enforce. The > "CRAN Package Check Results for" this package show an error on 1 > platform (r-devel-linux-x86_64-fedora-gcc), NOTEs on 3 platforms > (Fedora-clang and Debian), and "OK" on 9 others. I can program selected > tests not to run on CRAN, e.g., with (!fda::CRAN()). > > >However, I suspect I should be able to do better than that. > > >Suggestions? The message from Prof. Ripley is crystal-clear, and exposes two issues (Internet access, writing files) that have been discussed many times in this list. A quick scan of the CRAN policy [1] yields: - Packages which use Internet resources should fail gracefully with an informative message if the resource is not available (and not give a check warning nor error). - 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. [1] https://cran.r-project.org/web/packages/policies.html Iñaki >Thanks, >Spencer Graves > > > p.s. The development version of this package is available at > "https://github.com/sbgraves237/Ecfun";. > > > https://cloud.r-project.org/web/checks/check_results_Ecfun.html > > > Forwarded Message > Subject:CRAN package Ecfun > Date: Tue, 21 Jan 2020 21:26:02 + > From: Prof Brian Ripley > Reply-To: CRAN > To: Spencer Graves > CC: CRAN > > > > This has been intermittently failing its checks for a week: different > check runs failed (in the 24h prior to) the 14th, 15th, 17th and today. > The current failure is > > Check: examples > Result: ERROR > Running examples in ‘Ecfun-Ex.R’ failed > The error most likely occurred in: > > > ### Name: read.testURLs > > ### Title: Read a file produced by testURLs > > ### Aliases: read.testURLs > > ### Keywords: IO > > > > ### ** Examples > > > > # Test only 2 web sites, not the default 4, > > # and test only twice, not the default 10 times: > > tst <- testURLs(c( > + PVI="http://en.wikipedia.org/wiki/Cook_Partisan_Voting_Index";, > + house="http://house.gov/representatives";), > + n=2, maxFail=2) > 1 > 1579634784, PVI, TRUE 0.828 > 1579634785, house, FALSE 0.051 > 1579634785, house, FALSE 0.048 > 2 > 1579634785, PVI, TRUE 0.043 > 1579634785, house, FALSE 0.11 > 1579634785, house, FALSE 0.035 > > > > # The above should have created a file 'testURLresults.csv' > > # in the working directory. Read it. > > > > dat <- read.testURLs() > Error in read.table(file = file, header = header, sep = sep, quote = > quote, : > more columns than column names > Calls: read.testURLs -> read.csv -> read.table > > That does not conform to the policy on Internet access, not least as no > attempt is made to check if the file was created, let alone that it has > the expected layout. Nor does it conform to the policy on not writing > anywhere in the file space (and that shows on its CRAN results page too). > > Please correct ASAP and before Feb 4 to safely retain the package on CRAN. > > -- > Brian D. Ripley, rip...@stats.ox.ac.uk > Emeritus Professor of Applied Statistics, University of Oxford > > > [[alternative HTML version deleted]] > > __ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel -- Iñaki Úcar __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] CRAN rules re. web scraping?
Hi Spencer: I think that message means what it says, and I read it as pretty straightforward and business like. The issue is not web scraping. There are two errors here: 1. You can not write to the user's space without first explicitly asking permission of the user. The suggested policy is to write to a temp directory, R has tempdir() and related commands for how to do this. 2. When accessing something over the internet, failure of the access must be checked for and the program exiting gracefully. The second error appears to be that at times on the builds the .csv file is not downloaded, but there is no check, just an error is thrown. There are a number of ways to catch such errors, such as "try...catch" which will solve this problem HTH, -Roy > On Jan 22, 2020, at 5:48 PM, Spencer Graves > wrote: > > Hello, All: > > > GOOD NEWS AND BAD NEWS: > > > * First the good news: I heard from Brian Ripley; see below. > His web site says, "He retired in August 2014 on grounds of ill health." > (http://www.stats.ox.ac.uk/~ripley/) I was pleased to see that he seems > to be well enough to send me the email below. > > > * BAD NEWS: My Ecfun package is violating current CRAN rules > regarding "not writing anywhere in the file space". (See below.) > > > QUESTION: > > > How do you suggest I respond to this? > > > It's hard for me to fix, because I cannot replicate the error and > I don't understand the rules Prof. Ripley is trying to enforce. The > "CRAN Package Check Results for" this package show an error on 1 > platform (r-devel-linux-x86_64-fedora-gcc), NOTEs on 3 platforms > (Fedora-clang and Debian), and "OK" on 9 others. I can program selected > tests not to run on CRAN, e.g., with (!fda::CRAN()). > > > However, I suspect I should be able to do better than that. > > > Suggestions? > > > Thanks, > Spencer Graves > > > p.s. The development version of this package is available at > "https://github.com/sbgraves237/Ecfun";. > > > https://cloud.r-project.org/web/checks/check_results_Ecfun.html > > > Forwarded Message > Subject: CRAN package Ecfun > Date: Tue, 21 Jan 2020 21:26:02 + > From: Prof Brian Ripley > Reply-To: CRAN > To: Spencer Graves > CC: CRAN > > > > This has been intermittently failing its checks for a week: different > check runs failed (in the 24h prior to) the 14th, 15th, 17th and today. > The current failure is > > Check: examples > Result: ERROR > Running examples in ‘Ecfun-Ex.R’ failed > The error most likely occurred in: > >> ### Name: read.testURLs >> ### Title: Read a file produced by testURLs >> ### Aliases: read.testURLs >> ### Keywords: IO >> >> ### ** Examples >> >> # Test only 2 web sites, not the default 4, >> # and test only twice, not the default 10 times: >> tst <- testURLs(c( > + PVI="http://en.wikipedia.org/wiki/Cook_Partisan_Voting_Index";, > + house="http://house.gov/representatives";), > + n=2, maxFail=2) > 1 > 1579634784, PVI, TRUE 0.828 > 1579634785, house, FALSE 0.051 > 1579634785, house, FALSE 0.048 > 2 > 1579634785, PVI, TRUE 0.043 > 1579634785, house, FALSE 0.11 > 1579634785, house, FALSE 0.035 >> >> # The above should have created a file 'testURLresults.csv' >> # in the working directory. Read it. >> >> dat <- read.testURLs() > Error in read.table(file = file, header = header, sep = sep, quote = > quote, : > more columns than column names > Calls: read.testURLs -> read.csv -> read.table > > That does not conform to the policy on Internet access, not least as no > attempt is made to check if the file was created, let alone that it has > the expected layout. Nor does it conform to the policy on not writing > anywhere in the file space (and that shows on its CRAN results page too). > > Please correct ASAP and before Feb 4 to safely retain the package on CRAN. > > -- > Brian D. Ripley, rip...@stats.ox.ac.uk > Emeritus Professor of Applied Statistics, University of Oxford > > > [[alternative HTML version deleted]] > > __ > 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: https://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. __ R-package-devel@r-pro
[R-pkg-devel] CRAN rules re. web scraping?
Hello, All: GOOD NEWS AND BAD NEWS: * First the good news: I heard from Brian Ripley; see below. His web site says, "He retired in August 2014 on grounds of ill health." (http://www.stats.ox.ac.uk/~ripley/) I was pleased to see that he seems to be well enough to send me the email below. * BAD NEWS: My Ecfun package is violating current CRAN rules regarding "not writing anywhere in the file space". (See below.) QUESTION: How do you suggest I respond to this? It's hard for me to fix, because I cannot replicate the error and I don't understand the rules Prof. Ripley is trying to enforce. The "CRAN Package Check Results for" this package show an error on 1 platform (r-devel-linux-x86_64-fedora-gcc), NOTEs on 3 platforms (Fedora-clang and Debian), and "OK" on 9 others. I can program selected tests not to run on CRAN, e.g., with (!fda::CRAN()). However, I suspect I should be able to do better than that. Suggestions? Thanks, Spencer Graves p.s. The development version of this package is available at "https://github.com/sbgraves237/Ecfun";. https://cloud.r-project.org/web/checks/check_results_Ecfun.html Forwarded Message Subject:CRAN package Ecfun Date: Tue, 21 Jan 2020 21:26:02 + From: Prof Brian Ripley Reply-To: CRAN To: Spencer Graves CC: CRAN This has been intermittently failing its checks for a week: different check runs failed (in the 24h prior to) the 14th, 15th, 17th and today. The current failure is Check: examples Result: ERROR Running examples in ‘Ecfun-Ex.R’ failed The error most likely occurred in: > ### Name: read.testURLs > ### Title: Read a file produced by testURLs > ### Aliases: read.testURLs > ### Keywords: IO > > ### ** Examples > > # Test only 2 web sites, not the default 4, > # and test only twice, not the default 10 times: > tst <- testURLs(c( + PVI="http://en.wikipedia.org/wiki/Cook_Partisan_Voting_Index";, + house="http://house.gov/representatives";), + n=2, maxFail=2) 1 1579634784, PVI, TRUE 0.828 1579634785, house, FALSE 0.051 1579634785, house, FALSE 0.048 2 1579634785, PVI, TRUE 0.043 1579634785, house, FALSE 0.11 1579634785, house, FALSE 0.035 > > # The above should have created a file 'testURLresults.csv' > # in the working directory. Read it. > > dat <- read.testURLs() Error in read.table(file = file, header = header, sep = sep, quote = quote, : more columns than column names Calls: read.testURLs -> read.csv -> read.table That does not conform to the policy on Internet access, not least as no attempt is made to check if the file was created, let alone that it has the expected layout. Nor does it conform to the policy on not writing anywhere in the file space (and that shows on its CRAN results page too). Please correct ASAP and before Feb 4 to safely retain the package on CRAN. -- Brian D. Ripley, rip...@stats.ox.ac.uk Emeritus Professor of Applied Statistics, University of Oxford [[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] Adding .exes to R package?
PS I don't know if you would be allowed to include a utility function to be run manually by users after setup that would download binaries from a trusted source and put them in an appropriate/findable place on the user's system. On Wed, Jan 22, 2020 at 4:06 PM Ben Bolker wrote: > > From https://cran.r-project.org/web/packages/policies.html: > > Source packages may not contain any form of binary executable code. > > > > On Wed, Jan 22, 2020 at 3:54 PM Jonathan Greenberg wrote: > > > > Folks: > > > > What is the policy on adding Windows executables to an R package? My > > gdalUtils package could REALLY use this ability (right now it requires > > users to manually install GDAL which can cause headaches for folks). > > Related: what about linux/mac executables? > > > > Are there reasonable tutorials on how to do this? > > > > --j > > > > [[alternative HTML version deleted]] > > > > __ > > R-package-devel@r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-package-devel __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Adding .exes to R package?
>From https://cran.r-project.org/web/packages/policies.html: Source packages may not contain any form of binary executable code. On Wed, Jan 22, 2020 at 3:54 PM Jonathan Greenberg wrote: > > Folks: > > What is the policy on adding Windows executables to an R package? My > gdalUtils package could REALLY use this ability (right now it requires users > to manually install GDAL which can cause headaches for folks). Related: what > about linux/mac executables? > > Are there reasonable tutorials on how to do this? > > --j > > [[alternative HTML version deleted]] > > __ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
[R-pkg-devel] Adding .exes to R package?
Folks: What is the policy on adding Windows executables to an R package? My gdalUtils package could REALLY use this ability (right now it requires users to manually install GDAL which can cause headaches for folks). Related: what about linux/mac executables? Are there reasonable tutorials on how to do this? --j [[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] Alternatives to R-devel on a Mac for package checking?
Just to close one loop here: On 15 January 2020 at 16:53, Dirk Eddelbuettel wrote: | Rocker should be building weekly r-devel and drd (similar, was meant to be a | littler "lighter", effectively the same) images. | | As Merlise noticed, somehow the cronjob push to the Docker Hub build service | started to fail -- this sadly happens once in a while so I manually triggered | a rebuild. They should be good now for 'R 4.0.0 to be'. Remember to invoke it | as 'RD' (for R-Devel) in the image, there is also an r-release as just 'R'. And the actual cron(tab)-based invocation has been refreshed with updated URLs so until docker changes their endpoints the Rocker images r-devel (R-devel build accessible via 'RD' entry) drd (same, a little lighter, once meant to be daily but isn't) drp (ditto for R-patched) should now again be rebuilt each weekend. Best regards, Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Need help to resolve NOTEs in auto check
(a) Spelling issues: False positive are checked manually by CRAN, so just tell them on submission. For software items, Uwe at some point recommended "Single quotes around software names such as 'pkg', functions should be written with parentheses as in foo()." (b) The procedure for submitting is to run 'R CMD build' on the (unpackaged) source directory, then submit the resulting .tar.gz file. If you don't do that, the build time stamp will be absent. Similarly 'R CMD check' should be run on the output from 'R CMD build'. Like this (oups, that dir is out of sync on this computer): Peters-iMac:ISWR-2nd-ed pd$ R CMD build ISwR * checking for file ‘ISwR/DESCRIPTION’ ... OK * preparing ‘ISwR’: * checking DESCRIPTION meta-information ... OK * checking for LF line-endings in source and make files and shell scripts * checking for empty or unneeded directories * looking to see if a ‘data/datalist’ file should be added * re-saving .R files as .rda NB: *.R converted to .rda: other files may need to be removed * re-saving tabular files * creating default NAMESPACE file * building ‘ISwR_2.0-5.tar.gz’ Peters-iMac:ISWR-2nd-ed pd$ R CMD check --as-cran ISwR_2.0-5.tar.gz * using log directory ‘/Users/pd/BIOSTAT/books/ISWR-2nd-ed/ISwR.Rcheck’ * using R version 3.6.0 (2019-04-26) * using platform: x86_64-apple-darwin15.6.0 (64-bit) * using session charset: UTF-8 * using option ‘--as-cran’ * checking for file ‘ISwR/DESCRIPTION’ ... OK * this is package ‘ISwR’ version ‘2.0-5’ * checking CRAN incoming feasibility ... WARNING Maintainer: ‘Peter Dalgaard ’ Insufficient package version (submitted: 2.0.5, existing: 2.0.8) Days since last update: 2 The Date field is over a month old. * checking package namespace information ... OK *.. (c) Examples _will_ be run as part of the check procedure. If that produces stray files in the check directory, you will tget the message that you see. In interactive usage, example(...) will similarly create files in the current directory, which is verboten, so write to a temporary directory instead. (See help(tempfile) for specifics). > On 22 Jan 2020, at 11:29 , Ian Walker wrote: > > Hello, > > I'm trying to repackage an R function so I can update the licence. I'm stuck > with the automatic checks. The problem appears to be the following three > NOTEs in the checking output: > > * checking CRAN incoming feasibility ... NOTE > Maintainer: ‘Ian Walker < > i.wal...@bath.ac.uk >> ’ > > Possibly mis-spelled words in DESCRIPTION: > DEMs (7:503) > STL (7:47) > stereolithography (7:52) > stl (7:24) > > The build time stamp is missing. > > It's not clear what is wrong here - is it the spellings (which are fine) or > the time stamp? If the latter, how do I resolve this? > > * checking DESCRIPTION meta-information ... NOTE > Checking should be performed on sources prepared by ‘R CMD build’. > > I can't make any sense of this issue! > > * checking for non-standard things in the check directory ... NOTE > Found the following files/directories: > ‘lovelyfunction.stl’ ‘volcano.stl’ > > These two .stl files are simply mentioned in the documentation's example code > - they're files that would be created if somebody ran the example code; > they're not in the R package I've created. > > Thanks for any help, > > Ian > -- > Dr Ian Walker FHEA | Department of Psychology, University of Bath > i.wal...@bath.ac.uk (academic) | m...@drianwalker.com (other matters) > > Website: drianwalker.com | Twitter: twitter.com/ianwalker > > My books: > Research Methods and Statistics - a new, clear introduction > http://tinyurl.com/res-stats > Research with People - the essential research textbook: http://amzn.to/sRbYxy > [[alternative HTML version deleted]] > > __ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Office: A 4.23 Email: pd@cbs.dk Priv: pda...@gmail.com __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Need help to resolve NOTEs in auto check
Hello Ian, On Wed, 22 Jan 2020 10:29:51 + Ian Walker wrote: > * checking CRAN incoming feasibility ... NOTE > Maintainer: ‘Ian Walker < > i.wal...@bath.ac.uk > >’ This NOTE is there for CRAN staff to have another look at the Maintainer: field in case this is someone's first submission or there is a change in package ownership. > Possibly mis-spelled words in DESCRIPTION: > DEMs (7:503) > STL (7:47) > stereolithography (7:52) > stl (7:24) These should be explained in the "Optional comment" field in the CRAN submission form. > The build time stamp is missing. > NOTE > Checking should be performed on sources prepared by ‘R CMD build’. How exactly do you build and check your package? It is recommended to run the command "R CMD build ." in the source directory of the package, then "R CMD check mypackage_version.tar.gz" (substituting the name of the newly generated file for mypackage_version.tar.gz). > These two .stl files are simply mentioned in the documentation's > example code - they're files that would be created if somebody ran > the example code; they're not in the R package I've created. It might be a better idea to use file.temp() for these file paths. CRAN policy says that packages should not write files anywhere besides R's session temporary directory unless user explicitly passes the the path. -- Best regards, Ivan __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
[R-pkg-devel] Need help to resolve NOTEs in auto check
Hello, I'm trying to repackage an R function so I can update the licence. I'm stuck with the automatic checks. The problem appears to be the following three NOTEs in the checking output: * checking CRAN incoming feasibility ... NOTE Maintainer: ‘Ian Walker < i.wal...@bath.ac.uk >’ Possibly mis-spelled words in DESCRIPTION: DEMs (7:503) STL (7:47) stereolithography (7:52) stl (7:24) The build time stamp is missing. It's not clear what is wrong here - is it the spellings (which are fine) or the time stamp? If the latter, how do I resolve this? * checking DESCRIPTION meta-information ... NOTE Checking should be performed on sources prepared by ‘R CMD build’. I can't make any sense of this issue! * checking for non-standard things in the check directory ... NOTE Found the following files/directories: ‘lovelyfunction.stl’ ‘volcano.stl’ These two .stl files are simply mentioned in the documentation's example code - they're files that would be created if somebody ran the example code; they're not in the R package I've created. Thanks for any help, Ian -- Dr Ian Walker FHEA | Department of Psychology, University of Bath i.wal...@bath.ac.uk (academic) | m...@drianwalker.com (other matters) Website: drianwalker.com | Twitter: twitter.com/ianwalker My books: Research Methods and Statistics - a new, clear introduction http://tinyurl.com/res-stats Research with People - the essential research textbook: http://amzn.to/sRbYxy [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel