Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A few suggestions & ideas #52

Closed
lcolladotor opened this issue Nov 3, 2016 · 8 comments
Closed

A few suggestions & ideas #52

lcolladotor opened this issue Nov 3, 2016 · 8 comments

Comments

@lcolladotor
Copy link
Contributor

Hi,

I just started checking rhub and it looks very cool! I just have a few comments.

I find https://builder.r-hub.io/ a bit unintuitive. You have to upload a tar ball created by R CMD build, right? That might not be so obvious to a new developer.

Second, the man pages of check() and similar functions say that path can be the tarball built with R CMD check. Isn't that R CMD build? I see that rhub:::build_package() runs build.

Third, lets say I'm interested in running checks on a bunch of OS. With any of the check* functions used on a directory containing an R package, you end up running rhub:::build_package(). It might be nice to export this function or make it more evident that you can run:

library('rhub')
pkgtar <- build_package('my_pkg_dir')
check_on_linux(pkgtar)
check_on_windows(pkgtar)
## Or any other checks

Finally, I'm wondering if rhub can be tied into Travis in the following way. With Travis you can set up matrix environments, so you can imagine setting a 'platform' environment for several platforms you are interested in checking. Then you configure Travis to install rhub and run:

library('rhub')
check('.', platform = Sys.getenv('platform'))

That way you use Travis to run R CMD build but then use rhub for testing on environments beyond linux. To save time, the user would have to setup Travis in such a way that R CMD check is disabled.

Best,
Leo

@lcolladotor
Copy link
Contributor Author

lcolladotor commented Nov 3, 2016

Regarding the Travis idea, I should mention that the rhub TOS mention that the number of tests might be limited in the future.

Edit: Anyhow, using Travis for R CMD build would be nice in case you have a package that takes a few minutes to build (like several of mine :P).

lcolladotor added a commit to LieberInstitute/jaffelab that referenced this issue Nov 3, 2016
@lcolladotor
Copy link
Contributor Author

Hi again,

My Travis + rhub test worked as shown at https://builder.r-hub.io/status/jaffelab_0.99.0.tar.gz-9aa0b96898ae45408696555217a5ce71. The actual R CMD check on windows-x86_64-devel failed due to #38 but that's ok.

Best,
Leo

@gaborcsardi
Copy link
Collaborator

Thanks for the comments!

I find https://builder.r-hub.io/ a bit unintuitive. You have to upload a tar ball created by R CMD build, right? That might not be so obvious to a new developer.

Agreed, that page needs improvements.

Second, the man pages of check() and similar functions say that path can be the tarball built with R CMD check. Isn't that R CMD build? I see that rhub:::build_package() runs build.

Yes, typo, should be build. Do you want to submit a PR?

Third, lets say I'm interested in running checks on a bunch of OS. With any of the check* functions used on a directory containing an R package, you end up running rhub:::build_package(). It might be nice to export this function or make it more evident that you can run:

You can just submit a vector of platforms to check():

check(..., platform = c("platform1", "platform2"))

You'll get multiple URLs and multiple emails, which is not ideal, this will be improved in the future, by providing "meta"-jobs, similar to matrix jobs on Travis.

Finally, I'm wondering if rhub can be tied into Travis in the following way. With Travis you can set up matrix environments, so you can imagine setting a 'platform' environment for several platforms you are interested in checking.

Interesting approach, very creative! rhub will have it's own CI soon, so ideally you would not need to call it from Travis. Also, you can just submit a vector of platforms to check(), as above. So you can just build() once, and then run the check on multiple platforms.

@lcolladotor
Copy link
Contributor Author

Hi,

Thanks for the clarifications! From the docs I didn't realize that platform could handle a vector of platforms.

I just wrote the PR that fixes the build typo, links to build() on the docs and mentions that platform can be a vector argument.

Travis + rhub

In relation to Travis + rhub, with a .travis.yml config file that includes these lines:

r_github_packages:
  - r-hub/rhub

after_success:
  - Rscript -e "library(rhub); validate_email('email', 'token'); check(Sys.getenv('PKG_TARBALL'), c('windows-x86_64-devel', 'debian-gcc-devel'))"

basically you (the pkg developer) choose a main platform (Ubuntu with a R-version of your choice by default with Travis) to work with. Only if the check is successful in that main platform, you then invoke rhub to test on other platforms. The advantage I see is that you get less emails/build reports for each commit you make and in a sense you don't waste resources (rhub's Azure credits) for commits you aren't sure if they are supposed to be error-free.

With osx as the main Travis platform

With the following on .travis.yml I tried setting OSX as the main platform since it's the one missing in rhub::platforms().

os: osx

However it failed because Travis was missing some packages for rhub to work as shown at https://travis-ci.org/LieberInstitute/jaffelab/builds/173073156#L1717. I probably just need to specify these packages in .travis.yml. But well, the point is that it might be possible to replicate the Bioconductor nightly builds in Windows, OSX and linux with R-devel. Right now, I test a lot on linux (thanks to Travis) but have to wait for the Windows and OSX reports if something goes wrong in those platforms.

Anyhow, I'm definitely excited to see what the rhub CI will look like =) Thanks again for all your work!

Best,
Leo

PS I'm assuming that there's no problem with making the rhub token public.

@lcolladotor
Copy link
Contributor Author

Hi,

Regarding using osx as the main Travis platform, it took me a while, but I finally got it to work. I basically had to write my Travis config file in such a way that all dependencies got installed (see https://github.com/LieberInstitute/jaffelab/blob/54f0621816f423a7bc33f374b1a9a09ded8cad55/.travis.yml#L10-L25 for a simple package).

Best,
Leo

@gaborcsardi
Copy link
Collaborator

I think I can close this now, right?

@lcolladotor
Copy link
Contributor Author

Yup, that's right =) Updating https://builder.r-hub.io/ might have to be it's own issue and in any case I bet that it's low priority.

Best,
Leo

@gaborcsardi
Copy link
Collaborator

Not low priority at all...., thanks for reminding me.

lcolladotor added a commit to lcolladotor/biocthis that referenced this issue May 9, 2020
Created both an introductory and a developer's notes vignette, updated README
and docs with examples, added a second biocViews term, fixed some small
bugs/typos.

Related links (as many as I could remember):

* https://rstd.io/tidytools19
* https://twitter.com/CVWickham
* https://twitter.com/hadleywickham
* https://www.rstudio.com/products/rstudio/download
* https://comunidadbioinfo.github.io/post/building-tidy-tools-cdsb-runconf-2019/#.XrbLMxNKiu4
* http://bioconductor.org/
* https://lcolladotor.github.io/pkgs/
* https://stat.ethz.ch/pipermail/bioc-devel/2020-March/016365.html
* https://www.bioconductor.org/help/docker/
* https://stat.ethz.ch/pipermail/bioc-devel/2020-April/016532.html
* https://github.com/features/actions
* https://stat.ethz.ch/pipermail/bioc-devel/2020-April/016650.html
* r-lib/actions#84
* r-lib/usethis#1108
* r-lib/styler#636
* Bioconductor/BiocCheck#57
* Bioconductor/bioconductor.org#54
* http://bioconductor.org/developers/how-to/coding-style/
* https://style.tidyverse.org/
* https://twitter.com/lorenzwalthert
* https://twitter.com/mt_morgan
* https://docs.travis-ci.com/user/languages/r/
* r-lib/pkgdown#1206
* r-lib/pkgdown#1230
* https://twitter.com/jimhester_
* https://www.jimhester.com/talk/2020-rsc-github-actions/
* https://github.com/Bioconductor/BBS
* https://github.com/Bioconductor/packagebuilder
* https://www.appveyor.com/
* r-hub/rhub#52
* r-hub/rhub#38
* https://www.tidyverse.org/blog/2020/04/usethis-1-6-0/
* https://github.com/r-lib/actions/tree/master/examples
* https://yihui.org/en/2018/03/second-pull-request/
* https://github.com/r-lib/actions/blob/master/examples/check-standard.yaml
* https://help.github.com/en/actions
* https://ropenscilabs.github.io/actions_sandbox/
* https://twitter.com/seandavis12
* https://github.com/seandavi/BiocActions/blob/master/.github/workflows/main.yml
* https://twitter.com/CSoneson
* https://github.com/csoneson/dreval/blob/master/.github/workflows/R-CMD-check.yaml
* https://bioc-community.herokuapp.com/
* https://github.com/leekgroup/derfinderPlot/blob/master/.github/workflows/check-bioc.yml
* https://github.com/LieberInstitute/recount3/blob/master/.github/workflows/check-bioc.yml
* https://github.com/hpages
* r-lib/actions#68
* r-lib/actions#85
* https://twitter.com/opencpu
* https://community.rstudio.com/u/const-ae
* https://community.rstudio.com/t/compiler-support-fo-c-14-features-on-windows/57284/4
* r-lib/xml2#296
* r-lib/xml2#302
* https://github.com/r-lib/usethis/blob/master/.github/workflows/R-CMD-check.yaml
* https://github.com/r-lib/usethis/commits/master/.github/workflows/R-CMD-check.yaml
* https://stat.ethz.ch/pipermail/bioc-devel/2020-April/016703.html
* https://stat.ethz.ch/pipermail/bioc-devel/2020-April/thread.html
* r-lib/remotes#296
* r-lib/actions#86
* r-lib/covr#427
* https://github.com/r-lib/actions/blob/master/examples/pr-commands.yaml
* https://www.digitalocean.com/community/tutorials/how-to-install-git-on-ubuntu-18-04
* r-lib/actions#50
* actions/checkout#238
* https://github.com/rocker-org/rocker-versioned2/blob/master/dockerfiles/Dockerfile_rstudio_4.0.0-ubuntu18.04
* https://twitter.com/niteshturaga
* https://twitter.com/cboettig
* rocker-org/rocker-versioned#208
* https://github.community/t5/GitHub-Actions/bd-p/actions
* https://www.r-consortium.org/blog/2020/03/18/cdsb-diversity-and-outreach-hotspot-in-mexico
* https://github.com/maxheld83
* r-lib/actions#87
* https://github.com/yutannihilation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants