knitr::opts_chunk$set( warning = FALSE, message = FALSE, collapse = TRUE, comment = "#>" )
R client for the CRAN checks API at https://cranchecks.info
authentication is only needed for the CRAN checks API for the functions that start with cchn
See https://docs.ropensci.org/cchecks for full documentation on cchecks
remotes::install_github("ropensci/cchecks")
library("cchecks")
cch_heartbeat()
cch_pkgs()
or cch_pkgs("packagename")
cch_pkgs_history()
cch_history()
cch_pkgs_search()
There's an important shortcoming of historical data. The links in the historical
data in the checks
field are not date specific. If you go to a link in historical
data, for example for April 2nd, 2020, links in that set of data link to whatever
the current check data is for that package. The check_details
field is
date specific though; the text is scraped from the package checks page each day
and stored, so you can count on that to be date specific. There are sometimes
links to further checks, often of compiled packages on various types of checks
that CRAN runs; we do not have those check results - we could get them but
have not take the time to sort that out.
cch_maintainers()
cch_maintainers("maelle.salmon_at_yahoo.se")
Functions for working with notifications are all prefixed with cchn
.
cchn
functions are designed to be used from within an R package directory. The functions
look for the package name and maintainer email address. Functions copy heavily from
https://github.com/r-hub/rhub
The functions
cchn_register()
: registrationcchn_pkg_rule_list()
/cchn_rule_list()
: list your own rulescchn_pkg_rule_get()
/cchn_rule_get()
: get a rule by idcchn_pkg_rule_add()
/cchn_rule_add()
: create a rulecchn_pkg_rule_delete()
/cchn_rule_delete()
: delete a rule by id (get id from cchn_pkg_rule_list
/cchn_rule_list
)Functions prefixed with cchn_pkg_
operate within a package
directory. That is, your current working directory is an R
package, and is the package for which you want to handle CRAN checks
notifications. These functions make sure that you are inside of
an R package, and use the email address and package name based
on the directory you're in.
Functions prefixed with just cchn_
do not operate within a package.
These functions do not guess package name at all, but require the user
to supply a package name (for those functions that require a package name);
and instead of guessing an email address from your package, we guess email
from the cached cchecks email file (see ?cchn_register
).
The first thing to do is to register an email address. In an R session in a working directory for
one of your packages that is on CRAN, run cchn_register()
. This function:
cchn_rule*
functions use this cached tokencchn
function callsIf you run cchn_register()
in the same package directory (with the same email address),
you'll be issued a new token, which will be updated in your cached token file.
It's entirely possible to have more than one email address you use across different R packages.
If you run cchn_register()
in a different package directory (with a different email address
from a previous run of cchn_register()
), you'll be issued a different token associated
with that new email address.
See ?cchn_rules
for details on how the rules work and many examples of adding rules.
Note that you can only manage your own rules. You can not list, get, or delete rules of other users.
cchecks
in R doing citation(package = 'cchecks')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.