export functions
This commit is contained in:
parent
0946ae89ee
commit
d8326e4521
4 changed files with 11 additions and 3 deletions
|
|
@ -47,7 +47,7 @@ steps:
|
|||
### PROD
|
||||
resources:
|
||||
requests:
|
||||
memory: 13Gi
|
||||
memory: 10Gi
|
||||
cpu: 1000m
|
||||
limits:
|
||||
memory: 13Gi
|
||||
|
|
|
|||
|
|
@ -4,9 +4,14 @@ export(add_to_package_index)
|
|||
export(build_binary_package)
|
||||
export(build_single_tag)
|
||||
export(dbcon)
|
||||
export(get_cranberries_feed)
|
||||
export(get_new_cran_packages)
|
||||
export(get_removed_cran_packages)
|
||||
export(get_updated_cran_packages)
|
||||
export(install_package_system_dependencies)
|
||||
export(list_metadata_tables)
|
||||
export(process_cran_updates)
|
||||
export(process_cranberries_rss)
|
||||
export(query_metadata_table)
|
||||
export(set_bin_path)
|
||||
export(set_codename)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
#' @importFrom lubridate today
|
||||
#' @examples
|
||||
#' get_updated_cran_packages(lubridate::interval(today() - 7, today()))
|
||||
#'
|
||||
#' @export
|
||||
get_updated_cran_packages <- function(date = lubridate::today()) {
|
||||
feed <- get_cranberries_feed()
|
||||
|
||||
|
|
@ -19,6 +19,7 @@ get_updated_cran_packages <- function(date = lubridate::today()) {
|
|||
#' @importFrom magrittr %>%
|
||||
#' @importFrom purrr map list_rbind
|
||||
#' @importFrom lubridate today
|
||||
#' @export
|
||||
#' @examples
|
||||
#' # last week
|
||||
#' get_new_cran_packages(lubridate::interval(today() - 7, today()))
|
||||
|
|
@ -37,6 +38,7 @@ get_new_cran_packages <- function(date = lubridate::today()) {
|
|||
#' @importFrom magrittr %>%
|
||||
#' @importFrom purrr map list_rbind
|
||||
#' @importFrom lubridate today
|
||||
#' @export
|
||||
#' @examples
|
||||
#' get_removed_cran_packages()
|
||||
#' get_removed_cran_packages(lubridate::interval(today() - 7, today()))
|
||||
|
|
@ -53,6 +55,7 @@ get_removed_cran_packages <- function(date = lubridate::today()) {
|
|||
|
||||
#' Get Cranberries fieed
|
||||
#' @importFrom xml2 read_xml xml_find_all
|
||||
#' @export
|
||||
#' @param type Which type of packages to query. Allowed are `"updated"`, `"new"` and `"removed"`
|
||||
get_cranberries_feed <- function(type = "updated") {
|
||||
feed <- sprintf("https://dirk.eddelbuettel.com/cranberries/cran/%s/index.rss", type)
|
||||
|
|
@ -68,6 +71,7 @@ get_cranberries_feed <- function(type = "updated") {
|
|||
|
||||
#' @importFrom lubridate dmy_hms as_date interval %within%
|
||||
#' @importFrom xml2 xml_text xml_find_first
|
||||
#' @export
|
||||
process_cranberries_rss <- function(feed, date = lubridate::today()) {
|
||||
title <- xml_text(xml_find_first(feed, "title"))
|
||||
pub_date_text <- xml_text(xml_find_first(feed, "pubDate"))
|
||||
|
|
|
|||
|
|
@ -11,5 +11,4 @@ Get updated CRAN packages
|
|||
}
|
||||
\examples{
|
||||
get_updated_cran_packages(lubridate::interval(today() - 7, today()))
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue