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
See https://docs.ropensci.org/cchecks for full documentation on
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.
Functions for working with notifications are all prefixed with
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
cchn_rule_list(): list your own rules
cchn_rule_get(): get a rule by id
cchn_rule_add(): create a rule
cchn_rule_delete(): delete a rule by id (get id from
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
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 token
If 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.
?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.