Skip to content

Commit

Permalink
Improve tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Adafede committed Jul 3, 2024
1 parent 8849e80 commit 9af7d88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
18 changes: 2 additions & 16 deletions R/parse_yaml_paths.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,6 @@
#' @export
#'
#' @examples NULL
parse_yaml_paths <- function(file = system.file("extdata",
"paths.yaml",
package = "timaR"
)) {
## Read the YAML file containing the paths
suppressWarnings(
paths <- yaml::read_yaml(
file = file
)
)

## Set the working directory to the base directory specified in the YAML file
setwd(paths$base_dir)

## Return the list of paths
return(paths)
parse_yaml_paths <- function(file = system.file("extdata", "paths.yaml", package = "timaR")) {
return(suppressWarnings(yaml::read_yaml(file = file)))
}
2 changes: 0 additions & 2 deletions tests/testthat/test-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ test_that(desc = "Test functions", code = {
## Prepare parameters
paths <- parse_yaml_paths()
params <- get_params(step = "prepare_params")
## Prepare config for a single step only
prepare_params(step = "weight_annotations")
## For all steps
params$organisms$taxon <- ""
prepare_params(params_small = params)
Expand Down

0 comments on commit 9af7d88

Please sign in to comment.