Skip to content

Commit

Permalink
fix CRAN CHECKS ERROR (#115 github issue)
Browse files Browse the repository at this point in the history
  • Loading branch information
BERTHET Clement (Externe) committed Dec 11, 2023
1 parent 176c6dd commit b2ce6a2
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 6 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

* `writeInputTS()` allows the user to set a link with the separator ' - ' (ex: 'area1 - area2')

BUGFIXES :

* Error CRAN CHECKS (fix issue #115)

# antaresEditObject 0.6.0

Expand Down
2 changes: 1 addition & 1 deletion R/backupStudy.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' @param opts
#' List of simulation parameters returned by the function
#' \code{antaresRead::setSimulationPath}
#' @param extension Defaut is {.zip}.
#' @param extension Defaut is \code{.zip}.
#'
#' @return The path of the backup
#' @export
Expand Down
2 changes: 1 addition & 1 deletion R/createCluster.R
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ createClusterRES <- function(area,
if (!NROW(prepro_modulation) %in% c(0, 8736, 8760)) {
stop("Number of rows for modulation data must be 0 or 8760")
}
if (!NCOL(prepro_modulation) %in% c(1, 4)) {
if (!NCOL(prepro_modulation) %in% c(0, 1, 4)) { # issue 115 NCOL NULL return
stop("Number of cols for modulation data must be 0 or 4")
}

Expand Down
2 changes: 1 addition & 1 deletion R/createClusterBulk.R
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ createClusterBulk <- function(cluster_object,
if (!NROW(list_params$prepro_modulation) %in% c(0, 8736, 8760)) {
stop("Number of rows for modulation data must be 0 or 8760")
}
if (!NCOL(list_params$prepro_modulation) %in% c(1, 4)) {
if (!NCOL(list_params$prepro_modulation) %in% c(0, 1, 4)) { # issue 115 NCOL NULL return
stop("Number of cols for modulation data must be 0 or 4")
}

Expand Down
2 changes: 1 addition & 1 deletion R/editCluster.R
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ editClusterRES <- function(area,
if (!NROW(prepro_modulation) %in% c(0, 8736, 8760)) {
stop("Number of rows for modulation data must be 0 or 8760")
}
if (!NCOL(prepro_modulation) %in% c(1, 4)) {
if (!NCOL(prepro_modulation) %in% c(0, 1, 4)) {# issue 115 NCOL NULL return
stop("Number of cols for modulation data must be 0 or 4")
}

Expand Down
5 changes: 4 additions & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ Thanks!


## Fix CRAN NOTE for release 0.6.0
"Running R code in ‘testthat.R’ had CPU time 8.1 times elapsed time"
"Running R code in ‘testthat.R’ had CPU time 8.1 times elapsed time"

## Fix CRAN CHECKS on version 0.6.0
* Fix ERROR on `r-devel-linux-x86_64-debian-gcc` cause function `base::NCOL()` is updated
2 changes: 1 addition & 1 deletion man/backupStudy.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions tests/testthat/test-createArea.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ sapply(studies, function(study) {


test_that("Backup study/input", {
skip_on_cran() # issue 115
backupStudy(what = "study", extension = ".zip")
backupStudy(what = "input", extension = ".tar.gz")
expect_true(file.exists(paste0(opts$studyPath, ".zip")))
Expand Down

0 comments on commit b2ce6a2

Please sign in to comment.