On 03/27/2017 12:57 PM, Rainer Johannes wrote:
Do you have code fetching data from web resources? I also sometimes get timeout errors on ensembldb and I guess it's because in some unit tests I'm fetching data from the ensembl ftp server.
Testing web resources is a pretty interesting topic. It doesn't really make sense to spend a lot of time downloading a large amount of data, but rather to focus the test on the existence of the endpoint, and the returned data type. It seems like these tests can be fast and light-weight. One approach (for static resources) might ask the web server for a last-modified or entity tag (ETag) value, and compare that to a manually maintained last-known-good exemplar.
Unit tests for parsing the data into R and processing the data once in R are really separate from the web resource, and should probably be isolated from tests of the web resource itself.
The approach on this page http://bioconductor.org/developers/how-to/web-query/especially use of timeout(), might be a reasonable way to implement this; also BiocFileCache is now available and provides appropriate functionality (although looking I see that it doesn't currently support time-outs -- but it's better to fix this in the one location rather than in many different locations).
Martin
joOn 27 Mar 2017, at 18:37, Martin Morgan <[email protected]> wrote: On 03/27/2017 12:22 PM, Aimin Yan wrote:I am submitting a R package to bioconductor. but I got time out errors when I performed R CMD check. Is there a possible way that I can set up time to allow more time for R CMD check? Or I have to use examples that they do not cost large time.Submitted packages need to conform to package guidelines for space and time http://bioconductor.org/developers/package-guidelines/#correctness so you'll need to develop realistic examples requiring modest resources. Often long-running examples result from inefficient code, so it is worth-while to profile your code to discover where the most time is spent, and seek efficient implementations for that section of code either through better use of vectorization or more sophisticated algorithms. MartinThank you for your help Aimin [[alternative HTML version deleted]] _______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/bioc-develThis email message may contain legally privileged and/or...{{dropped:2}} _______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel
This email message may contain legally privileged and/or...{{dropped:2}}
_______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel
