- Notifications
You must be signed in to change notification settings - Fork55
r-hub/rhub
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
R-hub v2
R-hub v2 uses GitHub Actions to runR CMD check
and similar package checks.The rhub package helps you set up R-hub v2 for your R package, and startrunning checks.
Install rhub from CRAN:
pak::pkg_install("rhub")
- A Github account.
- Your R package must be in a GitHub repository.
- You need a GitHubPersonal AccessToken.You can use thegitcreds package to addthe token to the git credential store.
See theR Consortium runners section forusing rhub if your package is not on GitHub.
rhub uses GitHub Actions, which is free for public repositories. Forprivate repositories you also get some minutes for free, depending onthe GitHub subscription you have. SeeAbout billing for GitHubActionsfor details.
- Switch to the directory of your package, and call
rhub::rhub_setup()
to add the R-hub workflow file to your package.
rhub::rhub_setup()
Run
git commit
andgit push
to push the workflow file to GitHub.Run
rhub::rhub_doctor()
to check if everything is set upcorrectly:
rhub::rhub_doctor()
Userhub::rhub_platforms()
to get a list of supported platforms andchecks:
rhub::rhub_platforms()
Runrhub::rhub_check()
to start R-hub v2 checks on GitHub Actions:
rhub::rhub_check()
If you don’t want to put your package on GitHub, you can still use therhub package to run package checks on any supported platform using ashared pool of runners in thehttps://github.com/r-hub2 GitHuborganization.
The process is similar to the first version of R-hub:
Set your working directory to the R package you want to check.
Obtain a token from R-hub, to verify your email address:
rc_new_token()
(You do not need to do this, if you already submitted packages to aprevious version of R-hub from the same machine, using the same emailaddress. Call
rc_list_local_tokens()
to check if you already havetokens.)Submit a build with
rc_submit()
Select the platforms you want to use, and follow the instructions andthe link provided to see your check results.
- You package will be public for the world, and will be stored in thehttps://github.com/r-hub2 organization. Your check output andresults will be public for anyone with a GitHub account. If you wantto keep your package private, you can put it in a private GitHubrepository, and use the
rhub_setup()
andrhub_check()
functionsinstead. - The R Consortium runners are shared among all users, so you might needto wait for your builds to start.
- You have to wait at least five minutes between submissions with
rc_submit()
. - Currently you need to create a GitHub account to see the check logs ofyour package. You don’t need a GitHub account to submit the checks.
To avoid these limitations (except for the need for a GitHub account),put your package in a GitHub repository, and use therhub_setup()
andrhub_check()
functions instead ofrc_submit()
and the R Consortiumrunners.
Please note that the rhub package is released with aContributor Codeof Conduct. Bycontributing to this project, you agree to abide by its terms.
MIT © R Consortium
About
R-hub API client