Skip to content

Commit

Permalink
Merge branch 'feat/GLOB-12083' into 'develop'
Browse files Browse the repository at this point in the history
Fix all requests from CRAN manual review

See merge request r-stack/sevenbridges2!86
  • Loading branch information
marijajovanovicgthb committed Feb 2, 2024
2 parents 4b06ffb + 55d05f3 commit ff95e28
Show file tree
Hide file tree
Showing 15 changed files with 65 additions and 245 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
^.*\.Rproj$
^.covrignore
^CRAN-SUBMISSION$
^LICENSE\.md$
^\.DS_Store$
^\.Rproj\.user$
^\.github$
Expand Down
4 changes: 2 additions & 2 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Version: 0.1.0
Date: 2024-01-16 17:25:52 UTC
SHA: 4f3005d57e8525dc00ee25f3da32b3932d05df8c
Date: 2024-02-02 14:55:17 UTC
SHA: 27fa8f5ee3169d24c65b3cf68722829c51341730
15 changes: 8 additions & 7 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
Package: sevenbridges2
Type: Package
Title: Seven Bridges Platform API Client in R
Title: The 'Seven Bridges Platform' API Client
Version: 0.1.0
Authors@R: c(
person("Marija", "Jovanovic", email = "[email protected]", role = c("aut", "cre")),
person("Marija", "Gacic", email = "[email protected]", role = c("aut", "cre")),
person("Marko", "Trifunovic", email = "[email protected]", role = c("aut")),
person("Vladimir", "Obucina", email = "[email protected]", role = c("aut")),
person("Seven Bridges Genomics Inc.", role = c("cph", "fnd"))
person("Velsera", role = c("cph", "fnd"))
)
Maintainer: Marija Jovanovic <[email protected]>
Description: R client and utilities for Seven Bridges platform API, from Cancer
Genomics Cloud to other Seven Bridges supported platforms.
License: Apache License 2.0 | file LICENSE
Maintainer: Marija Gacic <[email protected]>
Description: R client and utilities for 'Seven Bridges Platform' API, from 'Cancer Genomics Cloud'
to other 'Seven Bridges' supported platforms. API documentation is hosted publicly
at <https://docs.sevenbridges.com/docs/the-api>.
License: Apache License 2.0
Encoding: UTF-8
LazyData: true
VignetteBuilder: knitr
Expand Down
202 changes: 0 additions & 202 deletions LICENSE

This file was deleted.

2 changes: 0 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# sevenbridges2 0.1.0

# sevenbridges2 0.0.1

* Initial CRAN submission.
16 changes: 10 additions & 6 deletions R/class-file.R
Original file line number Diff line number Diff line change
Expand Up @@ -771,10 +771,10 @@ File <- R6::R6Class(
#' )
#'
#' # Download file object
#' file_object$download()
#' file_object$download(directory_path = ".")
#' }
#'
download = function(directory_path = getwd(),
download = function(directory_path,
filename = self$name,
method = "curl",
# nolint start
Expand All @@ -786,8 +786,12 @@ File <- R6::R6Class(
self$url <- self$get_download_url()
}

# check if directory exists
check_download_path(directory_path, filename)
if (is_missing(directory_path)) {
rlang::abort("Please, provide directory path where to download your file.") # nolint
} else {
# check if directory exists
check_download_path(directory_path, filename)
}

# check retry parameters
check_retry_params(retry_count, parameter_to_validate = "count")
Expand Down Expand Up @@ -833,12 +837,12 @@ File <- R6::R6Class(
}
# wait for 5 seconds before new attemt - print the countdown message
for (seconds_left in retry_timeout:1) {
cat(glue::glue_col("Retrying in {green {seconds_left}} seconds...", "\r")) # nolint
rlang::inform(glue::glue_col("Retrying in {green {seconds_left}} seconds...", "\r")) # nolint
Sys.sleep(1)
}

# print a blank line to clear the countdown message
cat("\r", " ", "\r")
rlang::inform(glue::glue("\r", " ", "\r")) # nolint
}
)
}
Expand Down
22 changes: 7 additions & 15 deletions R/class-files.R
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ Files <- R6::R6Class(
#'
#' @importFrom checkmate assert_list
#' @importFrom glue glue_col
#' @importFrom rlang inform
#'
#' @examples
#' \dontrun{
Expand Down Expand Up @@ -288,22 +289,13 @@ Files <- R6::R6Class(
)
element <- setNames(list(element), names(res[i]))
result <- append(result, element)
cat(
glue::glue_col("{blue Original file id: }
{names(res[i])}"),
"\n"
rlang::inform(
glue::glue_col(
"{blue Original file id:} {names(res[i])}", "\n",
"{blue Copied file id:} {res[[i]]$new_file_id}", "\n",
"{blue Copied file name:} {res[[i]]$new_file_name}", "\n"
)
)
cat(
glue::glue_col("{blue Copied file id: }
{res[[i]]$new_file_id}"),
"\n"
)
cat(
glue::glue_col("{blue Copied file name: }
{res[[i]]$new_file_name}"),
"\n"
)
cat("\n")
}
invisible(result)
}, # nocov end
Expand Down
9 changes: 6 additions & 3 deletions R/class-project.R
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,12 @@ Project <- R6::R6Class(
#' }
#'
print = function() {
cat(glue::glue_col("{blue Project name: } {self$name}"), "\n") # nocov
cat(glue::glue_col("{blue Project id: } {self$id}"), "\n") # nocov
},
# nocov start
rlang::inform(glue::glue_col(
"{blue Project name: } {self$name} ", "\n",
"{blue Project id: } {self$id} ", "\n"
))
}, # nocov end

# Print Project object in detail ------------------------------------------
#' @description Detailed print method for Project class.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,6 @@ Contributors should sign the [Seven Bridges Contributor Agreement](https://secur

## Copyright

© 2023 Seven Bridges Genomics, Inc. All rights reserved.
© 2024 Velsera, Inc. All rights reserved.

This project is licensed under the terms of the [Apache License 2.0](LICENSE).
This project is licensed under the terms of the Apache License 2.0.
9 changes: 9 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,12 @@ This is a resubmission. In this version I have:
* Updated classes documentation to meet styling and formatting policies.

* Updated DESCRIPTION file.

* Added API reference url in description of DESCRIPTION file.

* Removed License file and its reference in DESCRIPTION since we don't have
additional restrictions to the license.

* Replaced usage of cat() with rlang's inform function.

* Updated tests to not use getwd() function.
Loading

0 comments on commit ff95e28

Please sign in to comment.