process_yaml: Process a yaml file

View source: R/process_yaml.R

process_yamlR Documentation

Process a yaml file

Description

Process a yaml file. The file defines the pre-download function, the download function and the post download function.

Usage

process_yaml(ymlfile, verbose = TRUE)

Arguments

ymlfile

A file in a YAML format defining the pre-download/ download and post download functions together with their arguments.

verbose

If TRUE, include status messages (if any)

Value

A list of files processed (downloaded and post processed)

Examples

## Not run: 
ymlfile <- system.file("exdata", "sampleapp.yml", package = "binman")
trdata <- system.file("testdata", "test_dlres.Rdata", package = "binman")
load(trdata)
testthat::with_mock(
  `httr::GET` = function(...) {
    test_llres
  },
  `base::dir.create` = function(...) {
    TRUE
  },
  `utils::unzip` = function(zipfile, ...) {
    zipfile
  },
  procyml <- process_yaml(ymlfile)
)
procyml

## End(Not run)


binman documentation built on Sept. 1, 2022, 9:06 a.m.