R-hub v2, i.e. version 2 or later of the rhub package is a completely new check system. In this acticle we highlight the differences between the old and the new system.
There are two ways to use R-hub v2. The recommended way is to store your
R package in a GitHub repository and use the rhub_*()
functions to
start checks on GitHub Actions, using your own GitHub account.
Alternatively, if you don't want to store your R package at GitHub, you
can use the rc_*()
functions to run checks in a shared GitHub
organization at https://github.com/r-hub2, using the R Consortium runners.
See more about the R Consortium runners below.
origin
git remote is set
to the GitHub repository.gitcreds::gitcreds_set()
to add the token to the git
credential store.Call rhub_setup()
from the local git clone to set up R-hub v2 for your
package. This adds a GitHub Actions workflow to your local repository.
Push this change to GitHub, into your default git branch and then you
are ready to call start checks with rhub_check()
.
branch
argument of rhub_check()
.GitHub Actions is free for public repositories. For private repositories you also get some minutes for free, depending on the GitHub subscription you have. See About billing for GitHub Actions for details.
You can run checks on any branch that you push to GitHub, but you'll need
to add the R-hub workflow file (.github/workflows/rhub.yaml
within
your repo) must be present in both the default branch (usually main
)
and also in the branch you want to run the check on.
If you don't want to put your package on GitHub, you can still use the rhub package to run package checks on any supported platform using a shared pool of runners in the https://github.com/r-hub2 GitHub organization.
The process is similar to the first version of R-hub:
rc_new_token()
(You do not need to do this, if you already submitted packages to a
previous version of R-hub from the same machine, using the same email
address. Call rc_list_local_tokens()
to check if you already have
tokens.)rc_submit()
rhub_setup()
and rhub_check()
functions instead.rc_submit()
.To avoid these limitations (except for the neeed for a GitHub account),
put your package in a GitHub repository, and use the rhub_setup()
and
rhub_check()
functions instead of rc_submit()
and the R Consortium
runners.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.