From c9fdce1451e470cfe130944f4a59bfe8407226b3 Mon Sep 17 00:00:00 2001 From: aho Date: Thu, 31 Aug 2023 14:16:57 +0200 Subject: [PATCH 1/7] version bump to 2.3.0 --- .Rbuildignore | 2 -- DESCRIPTION | 2 +- NEWS.md | 6 ++++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.Rbuildignore b/.Rbuildignore index d988cd4..aa7059a 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -15,7 +15,5 @@ # Suggested by http://r-pkgs.had.co.nz/package.html ^.*\.Rproj$ # Automatically added by RStudio, ^\.Rproj\.user$ # used for temporary files. -^README\.Rmd$ # An Rmarkdown file used to generate README.md ^cran-comments\.md$ # Comments for CRAN submission #^NEWS\.md$ # A news file written in Markdown -^\.gitlab-ci\.yml$ diff --git a/DESCRIPTION b/DESCRIPTION index 173baca..60fa08c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: startR Title: Automatically Retrieve Multidimensional Distributed Data Sets -Version: 2.2.3 +Version: 2.3.0 Authors@R: c( person("Nicolau", "Manubens", , "nicolau.manubens@bsc.es", role = c("aut")), person("An-Chi", "Ho", , "an.ho@bsc.es", role = c("aut", "cre")), diff --git a/NEWS.md b/NEWS.md index 888fb72..1b3062e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,9 @@ +# startR v2.3.0 (Release date: 2023-08-31) +- Load variable metadata when retreive = F +- Change Compute() "threads_load" to 1 to be consistent with documentation +- Add Autosubmit as workflow manager +- SelectorChecker() to recognize class integer Task actions + # startR v2.2.3 (Release date: 2023-06-06) - Bugfix in Start(): when using parameter `longitude = 'all'` with transform, there was a missing point for some cases. -- GitLab From a95a8745d38051f32ad7bb9ee2078fd7a10d72d8 Mon Sep 17 00:00:00 2001 From: aho Date: Thu, 31 Aug 2023 14:53:15 +0200 Subject: [PATCH 2/7] Add param document; fix typo --- R/Compute.R | 8 +++++++- R/Utils.R | 2 +- man/Compute.Rd | 10 +++++++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/R/Compute.R b/R/Compute.R index 321a0a1..d288a4d 100644 --- a/R/Compute.R +++ b/R/Compute.R @@ -37,7 +37,13 @@ #'@param ecflow_server A named vector indicating the host and port of the #' EC-Flow server. The vector form should be #' \code{c(host = 'hostname', port = port_number)}. Only needed when the -#' execution is run#' remotely. The default value is NULL. +#' execution is run remotely. The default value is NULL. +#'@param autosubmit_suite_dir A character string indicating the path to a folder +#' that can be found locally and on Autosubmit machine where to store temporary +#' files generated for Autosubmit to establish workflow. +#'@param autosubmit_server A character string of autosubmit machine name ( +#' 'bscesautosubmit01'or 'bscesautosubmit02'.) If it is NULL, a random one will +#' be assigned. The default value is NULL. #'@param silent A logical value deciding whether to print the computation #' progress (FALSE) on the R session or not (TRUE). It only works when the #' execution runs locally or the parameter 'wait' is TRUE. The default value diff --git a/R/Utils.R b/R/Utils.R index 940e2d3..e440dde 100644 --- a/R/Utils.R +++ b/R/Utils.R @@ -919,7 +919,7 @@ write_autosubmit_bash <- function(chunks, cluster, autosubmit_suite_dir) { dest_dir <- file.path(autosubmit_suite_dir, paste0("/STARTR_CHUNKING_", cluster$expid)) if (!file.exists(dest_dir)) { - dir.create(dest_fir, recursive = TRUE) + dir.create(dest_dir, recursive = TRUE) } writeLines(bash_script_lines, paste0(dest_dir, '/startR_autosubmit_', n_chunk, '.sh')) } diff --git a/man/Compute.Rd b/man/Compute.Rd index 270846a..610af3d 100644 --- a/man/Compute.Rd +++ b/man/Compute.Rd @@ -54,7 +54,15 @@ remotely. The default value is NULL.} \item{ecflow_server}{A named vector indicating the host and port of the EC-Flow server. The vector form should be \code{c(host = 'hostname', port = port_number)}. Only needed when the -execution is run#' remotely. The default value is NULL.} +execution is run remotely. The default value is NULL.} + +\item{autosubmit_suite_dir}{A character string indicating the path to a folder +that can be found locally and on Autosubmit machine where to store temporary +files generated for Autosubmit to establish workflow.} + +\item{autosubmit_server}{A character string of autosubmit machine name ( +'bscesautosubmit01'or 'bscesautosubmit02'.) If it is NULL, a random one will +be assigned. The default value is NULL.} \item{silent}{A logical value deciding whether to print the computation progress (FALSE) on the R session or not (TRUE). It only works when the -- GitLab From 9b521bb0684f66f3e834668b36a56b879bb0b96d Mon Sep 17 00:00:00 2001 From: aho Date: Thu, 31 Aug 2023 15:09:19 +0200 Subject: [PATCH 3/7] remove context() in unit tests --- tests/testthat/test-AddStep-DimNames.R | 1 - tests/testthat/test-Compute-CDORemap.R | 2 -- tests/testthat/test-Compute-NumChunks.R | 1 - tests/testthat/test-Compute-chunk_depend_dim.R | 2 -- tests/testthat/test-Compute-chunk_split_dim.R | 2 -- tests/testthat/test-Compute-extra_params.R | 1 - tests/testthat/test-Compute-inconsistent_target_dim.R | 1 - tests/testthat/test-Compute-irregular_regrid.R | 2 -- tests/testthat/test-Compute-timedim.R | 2 -- tests/testthat/test-Compute-transform_all.R | 1 - tests/testthat/test-Compute-transform_indices.R | 1 - tests/testthat/test-Compute-transform_values.R | 1 - tests/testthat/test-Compute-two_data.R | 2 -- tests/testthat/test-Compute-use_attribute.R | 2 -- tests/testthat/test-Start-DCPP-across-depends.R | 1 - tests/testthat/test-Start-calendar.R | 1 - tests/testthat/test-Start-depends_values.R | 3 --- tests/testthat/test-Start-first_file_missing.R | 2 -- tests/testthat/test-Start-global-lon-across_meridian.R | 2 -- tests/testthat/test-Start-implicit_dependency_by_selector.R | 1 - tests/testthat/test-Start-implicit_inner_dim.R | 1 - tests/testthat/test-Start-indices_list_vector.R | 2 -- tests/testthat/test-Start-largest_dims_length.R | 1 - tests/testthat/test-Start-line_order-consistency.R | 2 -- tests/testthat/test-Start-metadata_dims.R | 2 -- tests/testthat/test-Start-metadata_filedim_dependency.R | 1 - tests/testthat/test-Start-metadata_reshaping.R | 1 - tests/testthat/test-Start-multiple-sdates.R | 2 -- tests/testthat/test-Start-path_glob_permissive.R | 2 -- tests/testthat/test-Start-reorder-lat.R | 2 -- tests/testthat/test-Start-reorder-latCoarse.R | 2 -- tests/testthat/test-Start-reorder-lon-180to180.R | 1 - tests/testthat/test-Start-reorder-lon-transform_-180to180.R | 1 - tests/testthat/test-Start-reorder-lon-transform_0to360.R | 1 - tests/testthat/test-Start-reorder-lon-transform_0to360Coarse.R | 1 - tests/testthat/test-Start-reorder-lon0to360.R | 1 - tests/testthat/test-Start-reorder-lon0to360Coarse.R | 1 - tests/testthat/test-Start-reorder-metadata.R | 1 - tests/testthat/test-Start-reorder-retrieve.R | 3 --- tests/testthat/test-Start-reorder_all.R | 3 --- tests/testthat/test-Start-reorder_indices.R | 2 -- tests/testthat/test-Start-reshape.R | 1 - tests/testthat/test-Start-return_vars_name.R | 1 - tests/testthat/test-Start-split-merge.R | 1 - tests/testthat/test-Start-time_unit.R | 1 - tests/testthat/test-Start-transform-all.R | 2 -- tests/testthat/test-Start-transform-border.R | 1 - tests/testthat/test-Start-transform-lat-Sort-all.R | 2 -- tests/testthat/test-Start-transform-lat-Sort-indices.R | 2 -- tests/testthat/test-Start-transform-lat-Sort-values.R | 2 -- tests/testthat/test-Start-transform-lon-across_meridian.R | 2 -- tests/testthat/test-Start-transform-metadata.R | 1 - tests/testthat/test-Start-transform-three-selectors.R | 2 -- tests/testthat/test-Start-two_dats.R | 1 - tests/testthat/test-Start-values_list_vector.R | 1 - 55 files changed, 84 deletions(-) diff --git a/tests/testthat/test-AddStep-DimNames.R b/tests/testthat/test-AddStep-DimNames.R index 647ca2f..5e1fe9c 100644 --- a/tests/testthat/test-AddStep-DimNames.R +++ b/tests/testthat/test-AddStep-DimNames.R @@ -1,6 +1,5 @@ #if (identical(Sys.getenv("NOT_CRAN"), "")) Sys.setenv(NOT_CRAN='true') -context("Error with bad dimensions tests.") test_that("Single File - Local execution", { suppressWarnings( data <- Start(dataset = '/esarchive/scratch/aho/startR_unittest_files/esarchive/recon/jma/jra55/monthly_mean/$var$_f6h/$var$_$sdate$$month$.nc', diff --git a/tests/testthat/test-Compute-CDORemap.R b/tests/testthat/test-Compute-CDORemap.R index b1479e2..fb31d00 100644 --- a/tests/testthat/test-Compute-CDORemap.R +++ b/tests/testthat/test-Compute-CDORemap.R @@ -1,5 +1,3 @@ -context("Compute use CDORemap") - test_that("ex2_3", { repos <- '/esarchive/exp/ecmwf/system5_m1/monthly_mean/$var$_f6h/$var$_$sdate$.nc' diff --git a/tests/testthat/test-Compute-NumChunks.R b/tests/testthat/test-Compute-NumChunks.R index 5d9a775..d85c8bf 100644 --- a/tests/testthat/test-Compute-NumChunks.R +++ b/tests/testthat/test-Compute-NumChunks.R @@ -1,6 +1,5 @@ #if (identical(Sys.getenv("NOT_CRAN"), "")) Sys.setenv(NOT_CRAN='true') -context("Number of chunks tests.") test_that("Single File - Local execution", { path <- '/esarchive/recon/jma/jra55/monthly_mean/$var$_f6h/$var$_$sdate$$month$.nc' diff --git a/tests/testthat/test-Compute-chunk_depend_dim.R b/tests/testthat/test-Compute-chunk_depend_dim.R index 9c78764..101bfb5 100644 --- a/tests/testthat/test-Compute-chunk_depend_dim.R +++ b/tests/testthat/test-Compute-chunk_depend_dim.R @@ -6,8 +6,6 @@ # b. depended dim is list of values # Note that 2.b. doesn't work. -context("Chunk over dimensions that have dependency relationship") - path <- paste0('/esarchive/exp/CMIP6/dcppA-hindcast/HadGEM3-GC31-MM/DCPP/MOHC/', 'HadGEM3-GC31-MM/dcppA-hindcast/', 'r1i1p1f2/Omon/tos/gn/v20200417/', diff --git a/tests/testthat/test-Compute-chunk_split_dim.R b/tests/testthat/test-Compute-chunk_split_dim.R index a40f745..0c1da4a 100644 --- a/tests/testthat/test-Compute-chunk_split_dim.R +++ b/tests/testthat/test-Compute-chunk_split_dim.R @@ -1,8 +1,6 @@ # This unit test is to check chunking over the split dim. It involves # how to arrange the chunks in a correct order even when chunking is happening. -context("Chunk over split dim") - test_that("1. The files are not repeated", { repos_exp <- paste0('/esarchive/exp/ecearth/a1tr/cmorfiles/CMIP/EC-Earth-Consortium/', diff --git a/tests/testthat/test-Compute-extra_params.R b/tests/testthat/test-Compute-extra_params.R index 02eab30..f055e96 100644 --- a/tests/testthat/test-Compute-extra_params.R +++ b/tests/testthat/test-Compute-extra_params.R @@ -1,4 +1,3 @@ -context("Compute, extra function arguments") test_that("ex2_6", { diff --git a/tests/testthat/test-Compute-inconsistent_target_dim.R b/tests/testthat/test-Compute-inconsistent_target_dim.R index 7ebc6f5..58f96a9 100644 --- a/tests/testthat/test-Compute-inconsistent_target_dim.R +++ b/tests/testthat/test-Compute-inconsistent_target_dim.R @@ -1,4 +1,3 @@ -context("Compute()/ByChunks(): dimension consistence check") # If dataset are more than 1 (e.g., exp and obs), ByChunks() checks if # they have consistent dimensions in favor of Apply() computation. However, # only margin dimensions need to be identical. Target dimensions can have diff --git a/tests/testthat/test-Compute-irregular_regrid.R b/tests/testthat/test-Compute-irregular_regrid.R index c76793d..7de1471 100644 --- a/tests/testthat/test-Compute-irregular_regrid.R +++ b/tests/testthat/test-Compute-irregular_regrid.R @@ -1,7 +1,5 @@ library(s2dv) -context("Irregular regriding in the workflow") - test_that("1. ex2_13", { path <- paste0('/esarchive/exp/CMIP6/dcppA-hindcast/CMCC-CM2-SR5/', diff --git a/tests/testthat/test-Compute-timedim.R b/tests/testthat/test-Compute-timedim.R index d63ae6c..fbc5af0 100644 --- a/tests/testthat/test-Compute-timedim.R +++ b/tests/testthat/test-Compute-timedim.R @@ -1,5 +1,3 @@ -context("Compute on time dimension") - test_that("ex2_1", { repos <- '/esarchive/exp/ecmwf/system5_m1/monthly_mean/$var$_f6h/$var$_$sdate$.nc' diff --git a/tests/testthat/test-Compute-transform_all.R b/tests/testthat/test-Compute-transform_all.R index a7a67dd..05d5de6 100644 --- a/tests/testthat/test-Compute-transform_all.R +++ b/tests/testthat/test-Compute-transform_all.R @@ -1,4 +1,3 @@ -context("Transform with 'all'") test_that("1. Chunk along non-lat/lon dim", { #skip_on_cran() diff --git a/tests/testthat/test-Compute-transform_indices.R b/tests/testthat/test-Compute-transform_indices.R index 37decfc..c2d3e35 100644 --- a/tests/testthat/test-Compute-transform_indices.R +++ b/tests/testthat/test-Compute-transform_indices.R @@ -1,4 +1,3 @@ -context("Transform with indices") # Using indinces() to assign lat and lon, and transform the data. # Also test transform + chunk along lat/lon. diff --git a/tests/testthat/test-Compute-transform_values.R b/tests/testthat/test-Compute-transform_values.R index 191d651..25a803f 100644 --- a/tests/testthat/test-Compute-transform_values.R +++ b/tests/testthat/test-Compute-transform_values.R @@ -1,4 +1,3 @@ -context("Compute: Transform and chunk values()") # Using values() to assign lat and lon, and transform the data. # Also test transform + chunk along lat/lon. diff --git a/tests/testthat/test-Compute-two_data.R b/tests/testthat/test-Compute-two_data.R index 735735f..dfa579a 100644 --- a/tests/testthat/test-Compute-two_data.R +++ b/tests/testthat/test-Compute-two_data.R @@ -1,5 +1,3 @@ -context("Compute with two datasets") - test_that("ex2_7", { # exp data diff --git a/tests/testthat/test-Compute-use_attribute.R b/tests/testthat/test-Compute-use_attribute.R index 7ec3dc2..6f218e6 100644 --- a/tests/testthat/test-Compute-use_attribute.R +++ b/tests/testthat/test-Compute-use_attribute.R @@ -1,5 +1,3 @@ -context("Compute use attributes") - test_that("ex2_2", { repos <- '/esarchive/exp/ecmwf/system5_m1/monthly_mean/$var$_f6h/$var$_$sdate$.nc' diff --git a/tests/testthat/test-Start-DCPP-across-depends.R b/tests/testthat/test-Start-DCPP-across-depends.R index c561abd..bfe44b1 100644 --- a/tests/testthat/test-Start-DCPP-across-depends.R +++ b/tests/testthat/test-Start-DCPP-across-depends.R @@ -1,4 +1,3 @@ -context("DCPP successfull retrieved for depends and across parameters.") test_that("Chunks of DCPP files- Local execution", { path <- '/esarchive/exp/CMIP6/dcppA-hindcast/HadGEM3-GC31-MM/DCPP/MOHC/HadGEM3-GC31-MM/dcppA-hindcast/r1i1p1f2/Omon/tos/gn/v20200417/$var$_Omon_HadGEM3-GC31-MM_dcppA-hindcast_s$sdate$-r1i1p1f2_gn_$chunk$.nc' path <- paste0('/esarchive/scratch/aho/startR_unittest_files/', path) diff --git a/tests/testthat/test-Start-calendar.R b/tests/testthat/test-Start-calendar.R index 0ee4c5e..7dfbc2c 100644 --- a/tests/testthat/test-Start-calendar.R +++ b/tests/testthat/test-Start-calendar.R @@ -1,4 +1,3 @@ -context("Start() different calendar") test_that("1. 360_day, daily, unit = 'days since 1850-01-01'", { path_hadgem3 <- paste0('/esarchive/exp/CMIP6/dcppA-hindcast//HadGEM3-GC31-MM/', diff --git a/tests/testthat/test-Start-depends_values.R b/tests/testthat/test-Start-depends_values.R index e4e4adc..9cccc2d 100644 --- a/tests/testthat/test-Start-depends_values.R +++ b/tests/testthat/test-Start-depends_values.R @@ -2,9 +2,6 @@ # and depending dimensions. The depending dimension should be a list with # names that are the values of depended dimensions. -context("Start() using values() to define dependency relations") - - path <- '/esarchive/exp/CMIP6/dcppA-hindcast/HadGEM3-GC31-MM/DCPP/MOHC/HadGEM3-GC31-MM/dcppA-hindcast/r1i1p1f2/Omon/tos/gn/v20200417/$var$_Omon_HadGEM3-GC31-MM_dcppA-hindcast_s$sdate$-r1i1p1f2_gn_$chunk$.nc' path <- paste0('/esarchive/scratch/aho/startR_unittest_files/', path) diff --git a/tests/testthat/test-Start-first_file_missing.R b/tests/testthat/test-Start-first_file_missing.R index 9c232e6..fecbd7c 100644 --- a/tests/testthat/test-Start-first_file_missing.R +++ b/tests/testthat/test-Start-first_file_missing.R @@ -1,5 +1,3 @@ -context("Start() retrieves files that the first file is missing") - # When some of the files are missing, Start() still can retrieve the data and # put NA in those missing positions. However, when the first file is missing, # Start() returned error before because of failing to find metadata. The bug is diff --git a/tests/testthat/test-Start-global-lon-across_meridian.R b/tests/testthat/test-Start-global-lon-across_meridian.R index 0360629..921c331 100644 --- a/tests/testthat/test-Start-global-lon-across_meridian.R +++ b/tests/testthat/test-Start-global-lon-across_meridian.R @@ -1,7 +1,5 @@ #if (identical(Sys.getenv("NOT_CRAN"), "")) Sys.setenv(NOT_CRAN='true') -context("Start() across_meridia global lon length check") - test_that("first test", { repos <- "/esarchive/exp/ecmwf/system5_m1/monthly_mean/tas_f6h/$var$_$sdate$.nc" diff --git a/tests/testthat/test-Start-implicit_dependency_by_selector.R b/tests/testthat/test-Start-implicit_dependency_by_selector.R index 4e89190..d493a87 100644 --- a/tests/testthat/test-Start-implicit_dependency_by_selector.R +++ b/tests/testthat/test-Start-implicit_dependency_by_selector.R @@ -6,7 +6,6 @@ # If assign a selector with an array that has file dim as dimension, Start() read # the values depending on the the file dim. #--------------------------------------------------- -context("Start() implicit dependency by selector dimension") #NOTE: The files don't exist anymore. #test_that("1. region with different index between files", { diff --git a/tests/testthat/test-Start-implicit_inner_dim.R b/tests/testthat/test-Start-implicit_inner_dim.R index fcae53e..7e0264c 100644 --- a/tests/testthat/test-Start-implicit_inner_dim.R +++ b/tests/testthat/test-Start-implicit_inner_dim.R @@ -1,4 +1,3 @@ -context("Start() implicit inner dimension") # The unit test is for the implicit inner dimension. If the inner dimension length is 1, # startR allows it not to be specified in the call. Users can still define it in # 'return_vars'. diff --git a/tests/testthat/test-Start-indices_list_vector.R b/tests/testthat/test-Start-indices_list_vector.R index b225a0a..2effede 100644 --- a/tests/testthat/test-Start-indices_list_vector.R +++ b/tests/testthat/test-Start-indices_list_vector.R @@ -4,8 +4,6 @@ # 3. transform, indices reversed # 4. no transform, indices reversed -context("List of indices and vector of indices") - repos <- "/esarchive/exp/ecmwf/system5_m1/monthly_mean/$var$_f6h/$var$_$sdate$.nc" repos <- paste0('/esarchive/scratch/aho/startR_unittest_files/', repos) diff --git a/tests/testthat/test-Start-largest_dims_length.R b/tests/testthat/test-Start-largest_dims_length.R index 6a796a2..211c132 100644 --- a/tests/testthat/test-Start-largest_dims_length.R +++ b/tests/testthat/test-Start-largest_dims_length.R @@ -1,4 +1,3 @@ -context("Start() largest_dims_length check") # When certain inner dim of files is not consistent, the parameter 'largest_dims_length' can # be used to ensure the returned array has the largest length of inner dimensions. diff --git a/tests/testthat/test-Start-line_order-consistency.R b/tests/testthat/test-Start-line_order-consistency.R index 8bf4564..11be109 100644 --- a/tests/testthat/test-Start-line_order-consistency.R +++ b/tests/testthat/test-Start-line_order-consistency.R @@ -1,7 +1,5 @@ #if (identical(Sys.getenv("NOT_CRAN"), "")) Sys.setenv(NOT_CRAN='true') -context("Start() line order consistency check") - variable <- "tas" obs.path <- "/esarchive/recon/ecmwf/era5/monthly_mean/tas_f1h/tas_$file_date$.nc" obs.path <- paste0('/esarchive/scratch/aho/startR_unittest_files/', obs.path) diff --git a/tests/testthat/test-Start-metadata_dims.R b/tests/testthat/test-Start-metadata_dims.R index 569a28e..2a2e735 100644 --- a/tests/testthat/test-Start-metadata_dims.R +++ b/tests/testthat/test-Start-metadata_dims.R @@ -1,5 +1,3 @@ -context("Start() metadata_dims check") - test_that("1. One data set, one var", { repos <- "/esarchive/exp/ecmwf/system5_m1/monthly_mean/$var$_f6h/$var$_$sdate$.nc" repos <- paste0('/esarchive/scratch/aho/startR_unittest_files/', repos) diff --git a/tests/testthat/test-Start-metadata_filedim_dependency.R b/tests/testthat/test-Start-metadata_filedim_dependency.R index 13cac47..da3fe86 100644 --- a/tests/testthat/test-Start-metadata_filedim_dependency.R +++ b/tests/testthat/test-Start-metadata_filedim_dependency.R @@ -1,4 +1,3 @@ -context("Start() metadata filedim dependency") # When inner dimension selector is an array with filedim dimension name (e.g., time = [sdate = 2, time = 4], # or *_across is used, the inner dim has dependency on file dim. In this case, return_vars must # specify this relationship, i.e., return_vars = list(time = 'sdate'). diff --git a/tests/testthat/test-Start-metadata_reshaping.R b/tests/testthat/test-Start-metadata_reshaping.R index 92e831b..b143268 100644 --- a/tests/testthat/test-Start-metadata_reshaping.R +++ b/tests/testthat/test-Start-metadata_reshaping.R @@ -1,4 +1,3 @@ -context("Start() metadata reshaping") # When data is reshaping (e.g., time_across = 'sdate'), the corresponding attribute should be reshaped too. test_that("1. time across fyear, fyear depends on sdate", { diff --git a/tests/testthat/test-Start-multiple-sdates.R b/tests/testthat/test-Start-multiple-sdates.R index 6467a84..e16f2bf 100644 --- a/tests/testthat/test-Start-multiple-sdates.R +++ b/tests/testthat/test-Start-multiple-sdates.R @@ -1,7 +1,5 @@ #if (identical(Sys.getenv("NOT_CRAN"), "")) Sys.setenv(NOT_CRAN='true') -context("Start() multiple sdate with split + merge dim") - # When certain values in one observation file are required more than once, # and 'merge_across_dims' + 'split_multiselected_dims' are used, the values may be misplaced. # It might happen when reading experimental data with many start dates, diff --git a/tests/testthat/test-Start-path_glob_permissive.R b/tests/testthat/test-Start-path_glob_permissive.R index e32d0b3..75f28d4 100644 --- a/tests/testthat/test-Start-path_glob_permissive.R +++ b/tests/testthat/test-Start-path_glob_permissive.R @@ -1,5 +1,3 @@ -context("Start() path_glob_permissive check") - test_that("1. expid/member/version", { years <- paste0(c(1960:1961), '01-', c(1960:1961), '12') diff --git a/tests/testthat/test-Start-reorder-lat.R b/tests/testthat/test-Start-reorder-lat.R index 0ac7701..c87792e 100644 --- a/tests/testthat/test-Start-reorder-lat.R +++ b/tests/testthat/test-Start-reorder-lat.R @@ -1,7 +1,5 @@ #if (identical(Sys.getenv("NOT_CRAN"), "")) Sys.setenv(NOT_CRAN='true') -context("Start() lat Reorder test") - #1 selector type 1-values(list) 2-values(vector) 3-indices 4-'all' 5-mix #2 selector range 1-[10, 20] 2-[20, 10] 3-[-10, -20] 4-[-20, -10] #3 resolution 1-1 2-<1 3->1 diff --git a/tests/testthat/test-Start-reorder-latCoarse.R b/tests/testthat/test-Start-reorder-latCoarse.R index af9c2db..34a766f 100644 --- a/tests/testthat/test-Start-reorder-latCoarse.R +++ b/tests/testthat/test-Start-reorder-latCoarse.R @@ -1,7 +1,5 @@ #if (identical(Sys.getenv("NOT_CRAN"), "")) Sys.setenv(NOT_CRAN='true') -context("Start() lat Reorder test") - #1 selector type 1-values(list) 2-values(vector) 3-indices 4-'all' 5-mix #2 selector range 1-[10, 20] 2-[20, 10] 3-[-10, -20] 4-[-20, -10] #3 resolution 1-1 2-<1 3->1 4-> mixed diff --git a/tests/testthat/test-Start-reorder-lon-180to180.R b/tests/testthat/test-Start-reorder-lon-180to180.R index e0a066c..0f71f0a 100644 --- a/tests/testthat/test-Start-reorder-lon-180to180.R +++ b/tests/testthat/test-Start-reorder-lon-180to180.R @@ -1,6 +1,5 @@ #if (identical(Sys.getenv("NOT_CRAN"), "")) Sys.setenv(NOT_CRAN='true') -context("Start() lon Reorder non-transform -180to180 test") #1 selector type 1-values(list) 2-values(vector) 3-indices 4-'all' 5-mix #2 selector range 1-[10, 20] 2-[20, 10] 3-[-10, -20] 4-[-20, -10] 5-[-10, 10] 6-[10, -10] 7-[300, 350] 8-[170, 190] #3 resolution 1-1 2-<1 3->1 diff --git a/tests/testthat/test-Start-reorder-lon-transform_-180to180.R b/tests/testthat/test-Start-reorder-lon-transform_-180to180.R index 46da00e..5e7701a 100644 --- a/tests/testthat/test-Start-reorder-lon-transform_-180to180.R +++ b/tests/testthat/test-Start-reorder-lon-transform_-180to180.R @@ -1,6 +1,5 @@ #if (identical(Sys.getenv("NOT_CRAN"), "")) Sys.setenv(NOT_CRAN='true') -context("Start() lon Reorder transform -180to180 test") #1 selector type 1-values(list) 2-values(vector) 3-indices 4-'all' 5-mix #2 selector range 1-[10, 20] 2-[20, 10] 3-[-10, -20] 4-[-20, -10] 5-[-10, 10] 6-[10, -10] 7-[300, 350] 8-[170, 190] #3 resolution 1-1 2-<1 3->1 diff --git a/tests/testthat/test-Start-reorder-lon-transform_0to360.R b/tests/testthat/test-Start-reorder-lon-transform_0to360.R index e05c731..86ad5e7 100644 --- a/tests/testthat/test-Start-reorder-lon-transform_0to360.R +++ b/tests/testthat/test-Start-reorder-lon-transform_0to360.R @@ -1,6 +1,5 @@ #if (identical(Sys.getenv("NOT_CRAN"), "")) Sys.setenv(NOT_CRAN='true') -context("Start() lon Reorder transform 0to360 test") #1 selector type 1-values(list) 2-values(vector) 3-indices 4-'all' 5-mix #2 selector range 1-[10, 20] 2-[20, 10] 3-[-10, -20] 4-[-20, -10] 5-[-10, 10] 6-[10, -10] 7-[300, 350] 8-[350, 370] #3 resolution 1-1 2-<1 3->1 diff --git a/tests/testthat/test-Start-reorder-lon-transform_0to360Coarse.R b/tests/testthat/test-Start-reorder-lon-transform_0to360Coarse.R index d4629af..c18d34a 100644 --- a/tests/testthat/test-Start-reorder-lon-transform_0to360Coarse.R +++ b/tests/testthat/test-Start-reorder-lon-transform_0to360Coarse.R @@ -1,6 +1,5 @@ #if (identical(Sys.getenv("NOT_CRAN"), "")) Sys.setenv(NOT_CRAN='true') -context("Start() lon Reorder transform 0to360 test") #1 selector type 1-values(list) 2-values(vector) 3-indices 4-'all' 5-mix #2 selector range 1-[10, 20] 2-[20, 10] 3-[-10, -20] 4-[-20, -10] 5-[-10, 10] 6-[10, -10] 7-[300, 350] 8-[350, 370] #3 resolution 1-1 2-<1 3->1 4 -> mixed diff --git a/tests/testthat/test-Start-reorder-lon0to360.R b/tests/testthat/test-Start-reorder-lon0to360.R index 84b0527..1e946d9 100644 --- a/tests/testthat/test-Start-reorder-lon0to360.R +++ b/tests/testthat/test-Start-reorder-lon0to360.R @@ -1,6 +1,5 @@ #if (identical(Sys.getenv("NOT_CRAN"), "")) Sys.setenv(NOT_CRAN='true') -context("Start() lon Reorder non-transform 0to360 test") #1 selector type 1-values(list) 2-values(vector) 3-indices 4-'all' 5-mix #2 selector range 1-[10, 20] 2-[20, 10] 3-[-10, -20] 4-[-20, -10] 5-[-10, 10] 6-[10, -10] 7-[300, 350] 8-[350, 370] #3 resolution 1-1 2-<1 3->1 diff --git a/tests/testthat/test-Start-reorder-lon0to360Coarse.R b/tests/testthat/test-Start-reorder-lon0to360Coarse.R index 16ad2e0..71361d9 100644 --- a/tests/testthat/test-Start-reorder-lon0to360Coarse.R +++ b/tests/testthat/test-Start-reorder-lon0to360Coarse.R @@ -1,6 +1,5 @@ #if (identical(Sys.getenv("NOT_CRAN"), "")) Sys.setenv(NOT_CRAN='true') -context("Start() lon Reorder non-transform 0to360 test") #1 selector type 1-values(list) 2-values(vector) 3-indices 4-'all' 5-mix #2 selector range 1-[10, 20] 2-[20, 10] 3-[-10, -20] 4-[-20, -10] 5-[-10, 10] 6-[10, -10] 7-[300, 350] 8-[350, 370] #3 resolution 1-1 2-<1 3->1 4-> mixed diff --git a/tests/testthat/test-Start-reorder-metadata.R b/tests/testthat/test-Start-reorder-metadata.R index 4b6f909..ea727e5 100644 --- a/tests/testthat/test-Start-reorder-metadata.R +++ b/tests/testthat/test-Start-reorder-metadata.R @@ -1,4 +1,3 @@ -context("Start() reorder metadata check") # Ensure returns_vars = NULL or 'dat' have the same metadata test_that("1. Sort() and CircularSort(0, 360)", { diff --git a/tests/testthat/test-Start-reorder-retrieve.R b/tests/testthat/test-Start-reorder-retrieve.R index 28d8c79..25efcfc 100644 --- a/tests/testthat/test-Start-reorder-retrieve.R +++ b/tests/testthat/test-Start-reorder-retrieve.R @@ -1,8 +1,5 @@ #if (identical(Sys.getenv("NOT_CRAN"), "")) Sys.setenv(NOT_CRAN='true') -context("Start() lon Reorder non-transform retrieve test") - - ############################################## test_that("original range 0to360", { ## Origin longitude in file: [0:359.722222222222] diff --git a/tests/testthat/test-Start-reorder_all.R b/tests/testthat/test-Start-reorder_all.R index fce2dc4..87a4416 100644 --- a/tests/testthat/test-Start-reorder_all.R +++ b/tests/testthat/test-Start-reorder_all.R @@ -1,8 +1,5 @@ # No transform, test reorder function Sort() and CircularSort() with selector 'all'. - -context("No transform, reorder test: 'all'") - #--------------------------------------------------------------- # cdo is used to verify the data values library(easyNCDF) diff --git a/tests/testthat/test-Start-reorder_indices.R b/tests/testthat/test-Start-reorder_indices.R index 4027b78..59d00d4 100644 --- a/tests/testthat/test-Start-reorder_indices.R +++ b/tests/testthat/test-Start-reorder_indices.R @@ -1,7 +1,5 @@ # No transform, test reorder function Sort() and CircularSort() with selector indices(). -context("No transform, reorder test: indices()") - #--------------------------------------------------------------- # cdo is used to verify the data values library(easyNCDF) diff --git a/tests/testthat/test-Start-reshape.R b/tests/testthat/test-Start-reshape.R index fc7acb6..480a3bc 100644 --- a/tests/testthat/test-Start-reshape.R +++ b/tests/testthat/test-Start-reshape.R @@ -1,4 +1,3 @@ -context("Start() reshape parameters check") # This one is more comprehensive than test-Start-split-merge.R path_exp <- '/esarchive/exp/ecmwf/system5c3s/daily_mean/$var$_f6h/$var$_$sdate$.nc' diff --git a/tests/testthat/test-Start-return_vars_name.R b/tests/testthat/test-Start-return_vars_name.R index e97023d..e3ff876 100644 --- a/tests/testthat/test-Start-return_vars_name.R +++ b/tests/testthat/test-Start-return_vars_name.R @@ -1,4 +1,3 @@ -context("Start() return_vars name") # The name of return_vars should be one of the inner dimension names. The synonims can # be used but will be changed back to the inner dim names. diff --git a/tests/testthat/test-Start-split-merge.R b/tests/testthat/test-Start-split-merge.R index d95fa62..699c01c 100644 --- a/tests/testthat/test-Start-split-merge.R +++ b/tests/testthat/test-Start-split-merge.R @@ -1,4 +1,3 @@ -context("Start() split + merge dim and value check") var_name <- 'tas' path.exp <- '/esarchive/exp/ecmwf/s2s-monthly_ensforhc/daily_mean/$var$_f6h/$sdate$/$var$_$syear$.nc' diff --git a/tests/testthat/test-Start-time_unit.R b/tests/testthat/test-Start-time_unit.R index a05a42a..0c499d3 100644 --- a/tests/testthat/test-Start-time_unit.R +++ b/tests/testthat/test-Start-time_unit.R @@ -1,4 +1,3 @@ -context("To detect the variable with time format and adjust the units") test_that("1. The data has units like time", { diff --git a/tests/testthat/test-Start-transform-all.R b/tests/testthat/test-Start-transform-all.R index 7fbac55..a8290a6 100644 --- a/tests/testthat/test-Start-transform-all.R +++ b/tests/testthat/test-Start-transform-all.R @@ -3,8 +3,6 @@ # The test contains three calls with different target grids: # two with 'r128x64' (from different original grid) and one with 'r100x50'. -context("Transform test target grid: lon and lat = 'all'") - #--------------------------------------------------------------- # cdo is used to verify the data values # Test 1: original grid 'r360x180' diff --git a/tests/testthat/test-Start-transform-border.R b/tests/testthat/test-Start-transform-border.R index 90b48b6..9b3cc6a 100644 --- a/tests/testthat/test-Start-transform-border.R +++ b/tests/testthat/test-Start-transform-border.R @@ -1,4 +1,3 @@ -context("Transform: check with cdo") ############################################## # This unit test checks different border situations: normal regional that doesn't touch the borders, diff --git a/tests/testthat/test-Start-transform-lat-Sort-all.R b/tests/testthat/test-Start-transform-lat-Sort-all.R index 3852da9..d7d895e 100644 --- a/tests/testthat/test-Start-transform-lat-Sort-all.R +++ b/tests/testthat/test-Start-transform-lat-Sort-all.R @@ -4,8 +4,6 @@ # The test contains three calls: lat_reorder = Sort(), no lat_reorder, and lat_reorder = Sort(decreasing = T). # Note that the original latitude is descending [90:-90]. cdo result is ascending [-90:90]. -context("Transform and lat_reorder test: 'all'") - #--------------------------------------------------------------- # cdo is used to verify the data values library(easyNCDF) diff --git a/tests/testthat/test-Start-transform-lat-Sort-indices.R b/tests/testthat/test-Start-transform-lat-Sort-indices.R index f729545..16daa79 100644 --- a/tests/testthat/test-Start-transform-lat-Sort-indices.R +++ b/tests/testthat/test-Start-transform-lat-Sort-indices.R @@ -9,8 +9,6 @@ #!!!!!!!!!!!!!!!!!!!!!PROBLEM in test 2, indices(640:1)!!!!!!!!!!!!!!!!!!!! #TODO: Add regional test -context("Transform and lat_reorder test: indices") - #--------------------------------------------------------------- # cdo is used to verify the data values library(easyNCDF) diff --git a/tests/testthat/test-Start-transform-lat-Sort-values.R b/tests/testthat/test-Start-transform-lat-Sort-values.R index 0333101..b70b637 100644 --- a/tests/testthat/test-Start-transform-lat-Sort-values.R +++ b/tests/testthat/test-Start-transform-lat-Sort-values.R @@ -7,8 +7,6 @@ # Each of them contains three calls: lat_reorder = Sort(), no lat_reorder, and lat_reorder = Sort(decreasing = T). # Note that the original latitude is descending [90:-90]. cdo result is ascending [-90:90]. -context("Transform and lat_reorder test: values") - #--------------------------------------------------------------- # cdo is used to verify the data values library(easyNCDF) diff --git a/tests/testthat/test-Start-transform-lon-across_meridian.R b/tests/testthat/test-Start-transform-lon-across_meridian.R index d3c3dfa..d07388e 100644 --- a/tests/testthat/test-Start-transform-lon-across_meridian.R +++ b/tests/testthat/test-Start-transform-lon-across_meridian.R @@ -1,7 +1,5 @@ #if (identical(Sys.getenv("NOT_CRAN"), "")) Sys.setenv(NOT_CRAN='true') -context("Start() transform across_meridian lon order check") - test_that("first test", { repos <- "/esarchive/exp/ecmwf/system5_m1/monthly_mean/tas_f6h/$var$_$sdate$.nc" diff --git a/tests/testthat/test-Start-transform-metadata.R b/tests/testthat/test-Start-transform-metadata.R index 62d31da..227f09d 100644 --- a/tests/testthat/test-Start-transform-metadata.R +++ b/tests/testthat/test-Start-transform-metadata.R @@ -1,4 +1,3 @@ -context("Start() transform metadata check") # Ensure returns_vars = NULL or 'dat' have the same metadata test_that("1. Sort() and CircularSort(0, 360)", { diff --git a/tests/testthat/test-Start-transform-three-selectors.R b/tests/testthat/test-Start-transform-three-selectors.R index 500168e..95e7c2b 100644 --- a/tests/testthat/test-Start-transform-three-selectors.R +++ b/tests/testthat/test-Start-transform-three-selectors.R @@ -8,8 +8,6 @@ # Note that the original latitude is descending [90:-90]. -context("Transform: three selector forms") - #--------------------------------------------------------------- # cdo is used to verify the data values library(easyNCDF) diff --git a/tests/testthat/test-Start-two_dats.R b/tests/testthat/test-Start-two_dats.R index e2fef3b..46b57d8 100644 --- a/tests/testthat/test-Start-two_dats.R +++ b/tests/testthat/test-Start-two_dats.R @@ -1,5 +1,4 @@ # ex1_8 -context("Start() two dats and two vars in one call") test_that("1. ex1_8, case 1", { diff --git a/tests/testthat/test-Start-values_list_vector.R b/tests/testthat/test-Start-values_list_vector.R index a84530f..1a6288b 100644 --- a/tests/testthat/test-Start-values_list_vector.R +++ b/tests/testthat/test-Start-values_list_vector.R @@ -4,7 +4,6 @@ # 3. transform, indices reversed # 4. no transform, indices reversed -context("List of values and vector of values") #----------------------------------------------------------------- # To get lat and lon vectors -- GitLab From c31d72871893a37ad94853a8be54f5ecca882b13 Mon Sep 17 00:00:00 2001 From: aho Date: Thu, 31 Aug 2023 15:34:52 +0200 Subject: [PATCH 4/7] Change doc to be the same as ByChunk_autosubmit() --- R/ByChunks_autosubmit.R | 2 +- R/Compute.R | 12 +++++++----- man/Compute.Rd | 12 +++++++----- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/R/ByChunks_autosubmit.R b/R/ByChunks_autosubmit.R index 08414f9..65ab36e 100644 --- a/R/ByChunks_autosubmit.R +++ b/R/ByChunks_autosubmit.R @@ -27,7 +27,7 @@ #' where to store temporary files generated for the automatic management of the #' workflow manager. This path should be available in local workstation as well #' as autosubmit machine. The default value is NULL, and a temporary folder -#' will be created. +#' under the current working folder will be created. #'@param autosubmit_server A character vector indicating the login node of the #' autosubmit machine. It can be "bscesautosubmit01" or "bscesautosubmit02". #' The default value is NULL, and the node will be randomly chosen. diff --git a/R/Compute.R b/R/Compute.R index d288a4d..6a476ef 100644 --- a/R/Compute.R +++ b/R/Compute.R @@ -39,11 +39,13 @@ #' \code{c(host = 'hostname', port = port_number)}. Only needed when the #' execution is run remotely. The default value is NULL. #'@param autosubmit_suite_dir A character string indicating the path to a folder -#' that can be found locally and on Autosubmit machine where to store temporary -#' files generated for Autosubmit to establish workflow. -#'@param autosubmit_server A character string of autosubmit machine name ( -#' 'bscesautosubmit01'or 'bscesautosubmit02'.) If it is NULL, a random one will -#' be assigned. The default value is NULL. +#' where to store temporary files generated for the automatic management of the +#' workflow manager. This path should be available in local workstation as well +#' as autosubmit machine. The default value is NULL, and a temporary folder +#' under the current working folder will be created. +#'@param autosubmit_server A character vector indicating the login node of the +#' autosubmit machine. It can be "bscesautosubmit01" or "bscesautosubmit02". +#' The default value is NULL, and the node will be randomly chosen. #'@param silent A logical value deciding whether to print the computation #' progress (FALSE) on the R session or not (TRUE). It only works when the #' execution runs locally or the parameter 'wait' is TRUE. The default value diff --git a/man/Compute.Rd b/man/Compute.Rd index 610af3d..9aa2a76 100644 --- a/man/Compute.Rd +++ b/man/Compute.Rd @@ -57,12 +57,14 @@ EC-Flow server. The vector form should be execution is run remotely. The default value is NULL.} \item{autosubmit_suite_dir}{A character string indicating the path to a folder -that can be found locally and on Autosubmit machine where to store temporary -files generated for Autosubmit to establish workflow.} +where to store temporary files generated for the automatic management of the +workflow manager. This path should be available in local workstation as well +as autosubmit machine. The default value is NULL, and a temporary folder +under the current working folder will be created.} -\item{autosubmit_server}{A character string of autosubmit machine name ( -'bscesautosubmit01'or 'bscesautosubmit02'.) If it is NULL, a random one will -be assigned. The default value is NULL.} +\item{autosubmit_server}{A character vector indicating the login node of the +autosubmit machine. It can be "bscesautosubmit01" or "bscesautosubmit02". +The default value is NULL, and the node will be randomly chosen.} \item{silent}{A logical value deciding whether to print the computation progress (FALSE) on the R session or not (TRUE). It only works when the -- GitLab From 005c802f33541b51e9c1b5acc45259090c8ec60b Mon Sep 17 00:00:00 2001 From: aho Date: Thu, 31 Aug 2023 15:49:22 +0200 Subject: [PATCH 5/7] Change check.attributes to ignore_attr --- tests/testthat/test-Compute-NumChunks.R | 2 +- tests/testthat/test-Start-metadata_filedim_dependency.R | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/testthat/test-Compute-NumChunks.R b/tests/testthat/test-Compute-NumChunks.R index d85c8bf..ffce880 100644 --- a/tests/testthat/test-Compute-NumChunks.R +++ b/tests/testthat/test-Compute-NumChunks.R @@ -47,7 +47,7 @@ res2 <- Compute(workflow = wf, expect_equal( res1, res2, -check.attributes = FALSE +ignore_attr = TRUE ) }) diff --git a/tests/testthat/test-Start-metadata_filedim_dependency.R b/tests/testthat/test-Start-metadata_filedim_dependency.R index da3fe86..227383b 100644 --- a/tests/testthat/test-Start-metadata_filedim_dependency.R +++ b/tests/testthat/test-Start-metadata_filedim_dependency.R @@ -83,7 +83,7 @@ expect_equal( expect_equal( test6, test4, - check.attributes = FALSE + ignore_attr = TRUE ) #---------------------------------------- @@ -119,7 +119,7 @@ expect_equal( expect_equal( test6, test6a, - check.attributes = FALSE + ignore_attr = TRUE ) #---------------------------------------- @@ -157,7 +157,7 @@ expect_equal( expect_equal( test14a, test6a, - check.attributes = FALSE + ignore_attr = TRUE ) #------------------------------------------------- @@ -193,7 +193,7 @@ expect_equal( expect_equal( test15a, test6a, - check.attributes = FALSE + ignore_attr = TRUE ) }) -- GitLab From 28bab87e4a64392f912212c696214c94a5a96e6f Mon Sep 17 00:00:00 2001 From: aho Date: Thu, 31 Aug 2023 16:13:12 +0200 Subject: [PATCH 6/7] Remove wrong words --- NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 1b3062e..9219f96 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,7 +2,7 @@ - Load variable metadata when retreive = F - Change Compute() "threads_load" to 1 to be consistent with documentation - Add Autosubmit as workflow manager -- SelectorChecker() to recognize class integer Task actions +- SelectorChecker() to recognize class integer # startR v2.2.3 (Release date: 2023-06-06) - Bugfix in Start(): when using parameter `longitude = 'all'` with transform, there was a missing point for some cases. -- GitLab From a2cf1a245a7944d6ad5d9a8a9557041963a113d6 Mon Sep 17 00:00:00 2001 From: aho Date: Mon, 4 Sep 2023 16:01:38 +0200 Subject: [PATCH 7/7] Change threads_compute and threads_load documentation to 'core', not 'process' or 'thread'. --- R/Compute.R | 4 ++-- R/Start.R | 2 +- inst/doc/practical_guide.md | 4 ++-- man/Compute.Rd | 4 ++-- man/Start.Rd | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/R/Compute.R b/R/Compute.R index 6a476ef..5a58abd 100644 --- a/R/Compute.R +++ b/R/Compute.R @@ -20,9 +20,9 @@ #' value is 'auto', which lists all the non-target dimensions and each one has #' one chunk. #'@param threads_load An integer indicating the number of parallel execution -#' processes to use for the data retrieval stage. The default value is 1. +#' cores to use for the data retrieval stage. The default value is 1. #'@param threads_compute An integer indicating the number of parallel execution -#' processes to use for the computation. The default value is 1. +#' cores to use for the computation. The default value is 1. #'@param cluster A list of components that define the configuration of the #' machine to be run on. The comoponents vary from the different machines. #' Check \href{https://earth.bsc.es/gitlab/es/startR/-/blob/master/inst/doc/practical_guide.md}{Practical guide on GitLab} for more diff --git a/R/Start.R b/R/Start.R index b72a02b..b0ad40d 100644 --- a/R/Start.R +++ b/R/Start.R @@ -704,7 +704,7 @@ #'@param num_procs An integer of number of processes to be created for the #' parallel execution of the retrieval/transformation/arrangement of the #' multiple involved files in a call to Start(). If set to NULL, -#' takes the number of available cores (as detected by future::detectCores). +#' takes the number of available cores (as detected by future::availableCores). #' The default value is 1 (no parallel execution). #'@param ObjectBigmemory a character string to be included as part of the #' bigmemory object name. This parameter is thought to be used internally by the diff --git a/inst/doc/practical_guide.md b/inst/doc/practical_guide.md index 7038ad7..b22c629 100644 --- a/inst/doc/practical_guide.md +++ b/inst/doc/practical_guide.md @@ -378,8 +378,8 @@ The common Compute() parameters of local and remote execution are: - `wf`: The workflow defined by the previous steps. - `chunks`: The dimensions to be chunked and how many chunks you want for each dimension. startR will automatically chunk the data for you. See more details in session [#5-1](#5-1-how-to-choose-the-number-of-chunks-jobs-and-cores). -- `threads_load`: The number of parallel execution processes to be created for data retrieval stage. It is used as Start() parameter "num_procs" if it is not specified when Start() is defined. -- `threads_compute`: The number of parallel execution processes to be created for data computing. It is used as multiApply::Apply parameter "ncores". +- `threads_load`: The number of parallel execution cores to be created for data retrieval stage. It is used as Start() parameter "num_procs" if it is not specified when Start() is defined. +- `threads_compute`: The number of parallel execution cores to be created for data computing. It is used as multiApply::Apply parameter "ncores". Using more than 2 threads for the retrieval will usually be perjudicial, since two will already be able to make full use of the bandwidth between the workstation and the data repository. The optimal number of threads for the computation will depend on the number of processors in your machine, the number of cores they have, and the number of threads supported by each of them. diff --git a/man/Compute.Rd b/man/Compute.Rd index 9aa2a76..96d063a 100644 --- a/man/Compute.Rd +++ b/man/Compute.Rd @@ -35,10 +35,10 @@ one chunk.} 'ecFlow'.} \item{threads_load}{An integer indicating the number of parallel execution -processes to use for the data retrieval stage. The default value is 1.} +cores to use for the data retrieval stage. The default value is 1.} \item{threads_compute}{An integer indicating the number of parallel execution -processes to use for the computation. The default value is 1.} +cores to use for the computation. The default value is 1.} \item{cluster}{A list of components that define the configuration of the machine to be run on. The comoponents vary from the different machines. diff --git a/man/Start.Rd b/man/Start.Rd index 7cdc9f8..25eb8d7 100644 --- a/man/Start.Rd +++ b/man/Start.Rd @@ -684,7 +684,7 @@ value is FALSE.} \item{num_procs}{An integer of number of processes to be created for the parallel execution of the retrieval/transformation/arrangement of the multiple involved files in a call to Start(). If set to NULL, -takes the number of available cores (as detected by future::detectCores). +takes the number of available cores (as detected by future::availableCores). The default value is 1 (no parallel execution).} \item{ObjectBigmemory}{a character string to be included as part of the -- GitLab