Skip to content

Commit

Permalink
Address point 1 of #32
Browse files Browse the repository at this point in the history
- remove "name" property of yaml
- update tests
- upate code
- update yaml_config.rmd
- update vignette links
  • Loading branch information
gfinak committed Jul 9, 2018
1 parent d6370fd commit 73fa029
Show file tree
Hide file tree
Showing 10 changed files with 218 additions and 342 deletions.
10 changes: 6 additions & 4 deletions R/yamlR.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ yml_add_files <- function(config, filenames) {
for (i in filenames) {
if (is.null(config[["configuration"]][["files"]][[i]])) {
config[["configuration"]][["files"]][[i]] <- list()
config[["configuration"]][["files"]][[i]]$name <- i
# config[["configuration"]][["files"]][[i]]$name <- i
config[["configuration"]][["files"]][[i]]$enabled <- TRUE
}
}
Expand Down Expand Up @@ -124,8 +124,10 @@ yml_list_files <- function(config) {
# assume config is a package root path
config <- yml_find(config)
}
cat(unlist(purrr::map(config[["configuration"]][["files"]], "name")))
invisible(unlist(purrr::map(config[["configuration"]][["files"]], "name")))
# cat(unlist(purrr::map(config[["configuration"]][["files"]], "name")))
cat(names(config[["configuration"]][["files"]]))
# invisible(unlist(purrr::map(config[["configuration"]][["files"]], "name")))
invisible(names(config[["configuration"]][["files"]]))
}

#' @rdname yaml
Expand Down Expand Up @@ -221,7 +223,7 @@ construct_yml_config <- function(code = NULL, data = NULL, render_root = NULL) {
files <- vector(length = length(code), mode = "list")
names(files) <- code
for (i in code) {
files[[i]]$name <- i
# files[[i]]$name <- i
files[[i]]$enabled <- TRUE
}
# create render root at a temporary directory.
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ DataPackageR::datapackage_skeleton(
#> Saving functions and data ...
#> Making help files ...
#> Done.
#> Further steps are described in '/var/folders/jh/x0h3v3pd4dd497g3gtzsm8500000gn/T//RtmpNPoc2o/mtcars20/Read-and-delete-me'.
#> Further steps are described in '/var/folders/jh/x0h3v3pd4dd497g3gtzsm8500000gn/T//RtmprT0WSs/mtcars20/Read-and-delete-me'.
#> Adding DataVersion string to DESCRIPTION
#> Creating data and data-raw directories
#> configuring yaml file
Expand All @@ -214,12 +214,12 @@ DataPackageR:::package_build(file.path(tempdir(),"mtcars20"))
#> processing file: subsetCars.Rmd
#> output file: subsetCars.knit.md
#>
#> Output created: /private/var/folders/jh/x0h3v3pd4dd497g3gtzsm8500000gn/T/RtmpNPoc2o/mtcars20/inst/extdata/Logfiles/subsetCars.html
#> Output created: /private/var/folders/jh/x0h3v3pd4dd497g3gtzsm8500000gn/T/RtmprT0WSs/mtcars20/inst/extdata/Logfiles/subsetCars.html
#> First time using roxygen2. Upgrading automatically...
#> Updating roxygen version in /private/var/folders/jh/x0h3v3pd4dd497g3gtzsm8500000gn/T/RtmpNPoc2o/mtcars20/DESCRIPTION
#> Updating roxygen version in /private/var/folders/jh/x0h3v3pd4dd497g3gtzsm8500000gn/T/RtmprT0WSs/mtcars20/DESCRIPTION
#> '/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file \
#> --no-environ --no-save --no-restore --quiet CMD build \
#> '/private/var/folders/jh/x0h3v3pd4dd497g3gtzsm8500000gn/T/RtmpNPoc2o/mtcars20' \
#> '/private/var/folders/jh/x0h3v3pd4dd497g3gtzsm8500000gn/T/RtmprT0WSs/mtcars20' \
#> --no-resave-data --no-manual --no-build-vignettes
#>

Expand Down
Loading

0 comments on commit 73fa029

Please sign in to comment.