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