Title: | Summarize CRAN Check Results in the Terminal |
---|---|
Description: | The CRAN check results and where your package stands in the CRAN submission queue in your R terminal. |
Authors: | Francois Michonneau [aut, cre], Ben Bolker [ctb] |
Maintainer: | Francois Michonneau <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.6.0 |
Built: | 2024-10-30 05:01:14 UTC |
Source: | https://github.com/fmichonneau/foghorn |
Deprecated functions provided for back compatibility.
check_cran_results(...)
check_cran_results(...)
... |
see documentation for |
Given the names of packages published on CRAN, return the output of checks that return notes, warnings or errors.
cran_details(pkg, src = c("website", "crandb"), ...) ## S3 method for class 'cran_details' summary(object, show_log = TRUE, print_ok = TRUE, ...) summary_cran_details( pkg, src = c("website", "crandb"), show_log = TRUE, print_ok = TRUE, ... )
cran_details(pkg, src = c("website", "crandb"), ...) ## S3 method for class 'cran_details' summary(object, show_log = TRUE, print_ok = TRUE, ...) summary_cran_details( pkg, src = c("website", "crandb"), show_log = TRUE, print_ok = TRUE, ... )
pkg |
character vector of the names for the packages on CRAN |
src |
if |
... |
additional arguments to control where the data from the check results are coming from and how they are downloaded from the CRAN servers (see Details section). |
object |
an object created by |
show_log |
Should the messages of the “Check Details” be printed? (logical) |
print_ok |
if |
Where does the data come from?
The data comes from the CRAN servers. They generate RDS files that contains information regarding the results of the checks for all the packages, and all the flavors. This data is then used to generate the web pages.
foghorn
provides access to either of these data sources. If
you choose src = "website"
the data is scrapped from the
CRAN website. If you only need to check a few packages, this is a
good option. If you choose src = "crandb"
the RDS files
(about 20Mb) are downloaded first from the CRAN servers.
The option max_requests
can be used to limit how many pages will be
scrapped from the CRAN website. The default is set to 50, use Inf
to
ignore this check. Consider using src = "crandb"
if you need to get data
from many packages or maintainers. Note that this an approximation of the
number of requests that will be performed and there will be situations where
more requests than this limit will be performed to retrieve the results.
The deadline
column contains the date set by CRAN to fix issues with the
CRAN checks before the package gets archived. If the existence of a deadline
has been checked but no date has been set by the CRAN Maintainers, the
deadline
column for the package will be set to ""
. If there is a
deadline, the content will be a date stored as character
.
The value of the argument show
can be set using the local option
foghorn_columns
.
When choosing src = "crandb"
you can also specify the
following options:
dest
: a folder where to store the RDS files (tempdir()
by default).
protocol
: either https
or http
.
overwrite
: when FALSE
(default), if the file exists in
dest
then it will not be downloaded again. When
TRUE
the file gets downloaded every time it's
needed.
a tibble
listing the names of the packages that have non- OK
check results, the nature of the result (WARN
, ERROR
,
FAIL
, NOTE
, or other issues).
Note that the tools
package contains unexported
functions that can be used to extract summary information from
the check results. Specifically
tools:::sumarize_CRAN_check_status
is similar to
show_cran_results
.
Check where your package stands in the CRAN incoming queue.
cran_incoming( pkg = NULL, folders = cran_incoming_folders(), sort_by_date = TRUE ) cran_incoming_folders(include_archive = FALSE)
cran_incoming( pkg = NULL, folders = cran_incoming_folders(), sort_by_date = TRUE ) cran_incoming_folders(include_archive = FALSE)
pkg |
Optionally provide a vector of package names to limit the results to these packages. |
folders |
Which folders of the CRAN queue do you want to inspect? Default: all the non-human folders. |
sort_by_date |
when |
include_archive |
when |
When submitting a package to CRAN, it undergoes a series of checks
before it is published and publicly available. cran_incoming()
allows you to check the packages that are currently in the queue,
and the folder where they are located. This information could help
you track your package submission. Only the following folders are
considered (approximately in order of the CRAN queue sequence):
newbies
, inspect
, pretest
, recheck
, pending
, waiting
,
publish
. The folder archive
is not inspected by default. The
folders named after the initials of the CRAN volunteers are not
inspected.
cran_incoming()
returns tibble
with the following
columns:
package name
package version
folder where the package was found
date/time package was entered in the folder
the size of the package tarball
cran_incoming_folders()
returns a character vector of the
names of the folders used as part of the CRAN submission
process, archive
being included optionally.
Note that if the package version is not provided, it will appear as NA
in the tibble
.
The information provided here is only to give you an indication of where your package stands in the submission process. It can be useful to confirm that your package has been correctly uploaded to CRAN. Please consult the CRAN Repository Policy if you have any questions.
The meaning of the package folders is as follows (see Hornik, Ligges and Zeileis https://journal.r-project.org/archive/2018-1/cran.pdf and Uwe Ligges mailing list comment https://stat.ethz.ch/pipermail/r-package-devel/2019q1/003631.html):
for first time submission; package will be manually inspected.
package is awaiting manual inspection; always happens for first time submissions and for packages with problems that are likely to be false positives
a human has triggered a new auto-check of the package
package has passed checks and is waiting for reverse dependency checking
a CRAN team member has to do a closer inspection and needs more time
CRAN's decision is waiting for a response from the package maintainer, e.g. when issues are present that CRAN cannot check for in the incoming checks
package is awaiting publication
package rejected: it does not pass the checks cleanly and the problems are unlikely to be false positives
Hornik, Ligges and Zeileis. "Changes on CRAN: 2017-12-01 to 2018-06-30", R Journal 10(1), July 2018. https://journal.r-project.org/archive/2018-1/cran.pdf
Maëlle Salmon, Locke Data, Stephanie Locke, Mitchell O'Hara-Wild, Hugo Gruson. "CRAN incoming dashboard", https://lockedata.github.io/cransays/articles/dashboard.html
cran_winbuilder
## Not run: ## all the packages in the CRAN incoming queue cran_incoming() ## to include all the folders including `archive` cran_incoming(folders = cran_incoming_folders(include_archive = TRUE) ## to only include a folder, e.g., `inspect` cran_incoming(folders = "inspect") ## if the package `foo` is in the queue, it will appear below cran_incoming(pkg = "foo") ## End(Not run)
## Not run: ## all the packages in the CRAN incoming queue cran_incoming() ## to include all the folders including `archive` cran_incoming(folders = cran_incoming_folders(include_archive = TRUE) ## to only include a folder, e.g., `inspect` cran_incoming(folders = "inspect") ## if the package `foo` is in the queue, it will appear below cran_incoming(pkg = "foo") ## End(Not run)
Make a table that summarizes the results of the CRAN checks for a set of packages specified by a maintainer or by names.
cran_results( email = NULL, pkg = NULL, show = getOption("foghorn_columns", c("error", "fail", "warn", "note", "ok", "deadline")), src = c("website", "crandb"), max_requests = 50, ... )
cran_results( email = NULL, pkg = NULL, show = getOption("foghorn_columns", c("error", "fail", "warn", "note", "ok", "deadline")), src = c("website", "crandb"), max_requests = 50, ... )
email |
email address for package maintainers (character vector) |
pkg |
package names (character vector) |
show |
columns of the data frame to show (all are shown by default). See 'Details' for more information. |
src |
if |
max_requests |
maximum number of requests allowed to be performed,
ignored when using |
... |
additional arguments to control where the data from the check results are coming from and how they are downloaded from the CRAN servers (see Details section). |
Given the email address of a package maintainer, and/or a vector of package names, returns a tibble that allows you to detect potential issues with your packages on CRAN.
Where does the data come from?
The data comes from the CRAN servers. They generate RDS files that contains information regarding the results of the checks for all the packages, and all the flavors. This data is then used to generate the web pages.
foghorn
provides access to either of these data sources. If
you choose src = "website"
the data is scrapped from the
CRAN website. If you only need to check a few packages, this is a
good option. If you choose src = "crandb"
the RDS files
(about 20Mb) are downloaded first from the CRAN servers.
The option max_requests
can be used to limit how many pages will be
scrapped from the CRAN website. The default is set to 50, use Inf
to
ignore this check. Consider using src = "crandb"
if you need to get data
from many packages or maintainers. Note that this an approximation of the
number of requests that will be performed and there will be situations where
more requests than this limit will be performed to retrieve the results.
The deadline
column contains the date set by CRAN to fix issues with the
CRAN checks before the package gets archived. If the existence of a deadline
has been checked but no date has been set by the CRAN Maintainers, the
deadline
column for the package will be set to ""
. If there is a
deadline, the content will be a date stored as character
.
The value of the argument show
can be set using the local option
foghorn_columns
.
When choosing src = "crandb"
you can also specify the
following options:
dest
: a folder where to store the RDS files (tempdir()
by default).
protocol
: either https
or http
.
overwrite
: when FALSE
(default), if the file exists in
dest
then it will not be downloaded again. When
TRUE
the file gets downloaded every time it's
needed.
a data frame that tabulates the number of CRAN flavors that return
errors, warnings, notes, or OK for the packages. See 'Details' section for
more information about the Deadline
column.
Note that the tools
package contains unexported
functions that can be used to extract summary information from
the check results. Specifically
tools:::sumarize_CRAN_check_status
is similar to
show_cran_results
.
## Not run: cran_results(pkg="MASS") ## End(Not run)
## Not run: cran_results(pkg="MASS") ## End(Not run)
The CRAN flavors, the systems on which CRAN tests all packages regularly,
are listed https://cran.r-project.org/web/checks/check_flavors.html. To
get the correct results, foghorn needs to know how many flavors CRAN uses.
This function reads the number of flavors that CRAN currently uses, and
caches it (per session, in the tempdir()
folder). Arguments control
caching, fall back, and default values.
n_cran_flavors( use_cache = getOption("foghorn.use_cache", TRUE), force_default = getOption("foghorn.force_default", FALSE), n_flavors = getOption("foghorn.n_flavors", 12L) )
n_cran_flavors( use_cache = getOption("foghorn.use_cache", TRUE), force_default = getOption("foghorn.force_default", FALSE), n_flavors = getOption("foghorn.n_flavors", 12L) )
use_cache |
Should the value for the number of flavors be read to/
written from the cache? (default: |
force_default |
Should the default value be used? (default: |
n_flavors |
What is the default number of flavors? (default: |
The default values for the arguments are read from options. Given that
n_cran_flavors
function is relied on internally to provide accurate
information to the user, using options allows you to control how the
function behaves directly. In general, the default values should not be
changed. They are provided in case you have issues connecting to the web
page listing the number of flavors, or you do not want to use caching.
The options can be set:
by session, using, for instance,options("foghorn.use_cache" = FALSE)
.
permanently, by adding options("foghorn.use_cache" = FALSE)
in your
.Rprofile
.
for a specific call, using the withr
package:
withr::with_options(foghorn.use_cache = FALSE, ...)
.
The number of CRAN check flavors (as an integer).
Given the email address of a package maintainer, and/or a vector of package names, it displays at the console a summary of the check results run on the CRAN flavors. This function is designed to be included in your .Rprofile to be run (periodically) at start up.
summary_cran_results( email = NULL, pkg = NULL, compact = FALSE, print_ok = TRUE, ... ) ## S3 method for class 'cran_results' summary(object, compact = FALSE, print_ok = TRUE, ...) show_cran_results(...)
summary_cran_results( email = NULL, pkg = NULL, compact = FALSE, print_ok = TRUE, ... ) ## S3 method for class 'cran_results' summary(object, compact = FALSE, print_ok = TRUE, ...) show_cran_results(...)
email |
email address for package maintainers (character vector) |
pkg |
package names (character vector) |
compact |
if |
print_ok |
if |
... |
additional arguments to control where the data from the check results are coming from and how they are downloaded from the CRAN servers (see Details section). |
object |
an object created by |
Prints the packages that return errors, warnings, and notes on the CRAN flavors. The number in parenthesis after the name of the packages indicates the number of CRAN flavors that produce these results.
## Not run: summary_cran_results(email = c("[email protected]", "[email protected]")) summary_cran_results(email = "[email protected]", pkg = c("pkg1", "pkg2")) ## End(Not run)
## Not run: summary_cran_results(email = c("[email protected]", "[email protected]")) summary_cran_results(email = "[email protected]", pkg = c("pkg1", "pkg2")) ## End(Not run)
Visit the page in your web browser for a given package or a maintainer's email address
visit_cran_check(pkg = NULL, email = NULL)
visit_cran_check(pkg = NULL, email = NULL)
pkg |
name of the package to check the results for |
email |
email address of the package maintainer |
The URL from the CRAN check results page invisibly
Check whether your package is in the win-builder queue.
winbuilder_queue( pkg = NULL, folders = c("R-release", "R-devel", "R-oldrelease") )
winbuilder_queue( pkg = NULL, folders = c("R-release", "R-devel", "R-oldrelease") )
pkg |
Optionally provide a vector of package names to limits the results to these packages. |
folders |
Which folders of the win-builder queue do you want to inspect? Default: the 3 architectures win-builder provides. |
To check whether your package has successfully been submitted to
win-builder, or to check whether there is unusual delay in processing
packages submitted to win-builder, winbuilder_queue
allows you to inspect
the packages that are in the queue to be processed by the win-builder
service.
A tibble
with the following columns:
package name
package version
the folder indicating the R version that will be used to perform the checks
the date and time at which the package tarball was uploaded on win-builder
the size of the package tarball
Maëlle Salmon, 2020. "Everything you should know about WinBuilder" https://blog.r-hub.io/2020/04/01/win-builder/
Uwe Ligges. Building and checking R source packages for Windows. https://win-builder.r-project.org/
## Not run: ## Get all the packages in the win-builder queue winbuilder_queue() ## Check if the 'dplyr' package is in the win-builder queue winbuilder_queue(pkg = "dplyr") ## Check which packages are in the R-devel queue winbuilder_queue(folders = "R-devel") ## End(Not run)
## Not run: ## Get all the packages in the win-builder queue winbuilder_queue() ## Check if the 'dplyr' package is in the win-builder queue winbuilder_queue(pkg = "dplyr") ## Check which packages are in the R-devel queue winbuilder_queue(folders = "R-devel") ## End(Not run)