Skip to content

Commit

Permalink
Fix doc and import issues
Browse files Browse the repository at this point in the history
  • Loading branch information
btmonier committed Oct 11, 2024
1 parent cf58d1d commit efe615b
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 26 deletions.
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ exportMethods(readRefRanges)
exportMethods(readSamples)
exportMethods(seqnames)
exportMethods(serverInfo)
exportMethods(show)
importFrom(GenomeInfoDb,"seqnames<-")
importFrom(GenomeInfoDb,seqnames)
importFrom(curl,has_internet)
Expand Down
8 changes: 6 additions & 2 deletions R/class_jvm_stats.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#' @slot phgVersion
#' A character string representing the version of PHG (Practical Haplotype
#' Graph).
#' @slot classPath
#' A character vector representing the JAR files found in the class path.
#' @slot maxMem
#' A numeric value representing the maximum amount of memory (in bytes) that
#' the JVM can use.
Expand Down Expand Up @@ -133,7 +135,7 @@ jvmStats <- function() {
freeMem <- round(rJava::.jcall(runtime, "J", "freeMemory") / gbConv, 3)
allocMem <- round(totMem - freeMem, 3)

new(
methods::new(
Class = "JvmStats",
nJars = nJars,
javaVersion = javaVersion,
Expand Down Expand Up @@ -165,7 +167,9 @@ jvmStats <- function() {
#' (maximum memory, total memory, free memory, and allocated memory) in a human-readable format.
#' Memory values are shown in the respective units (e.g., bytes, MB, GB) defined in the object.
#'
#' @export
#' @docType methods
#' @rdname JvmStats-class
#' @aliases show,JvmStats-method
setMethod(
f = "show",
signature = "JvmStats",
Expand Down
2 changes: 1 addition & 1 deletion R/utils_general.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ isValidColor <- function(color) {
pattern = "^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$",
x = color
)
isNamedColor <- color %in% colors()
isNamedColor <- color %in% grDevices::colors()

return(isHex || isNamedColor)
}
Expand Down
3 changes: 1 addition & 2 deletions R/utils_jvm.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ getLatestPhgVersion <- function() {
if (httr::http_status(response)$category != "Success") {
rlang::abort(
sprintf(
"Failed to fetch the latest release info for '%s'. HTTP status code: %s",
repo,
"Failed to fetch the latest release info for PHGv2. HTTP status code: %s",
httr::http_status(response)$reason
)
)
Expand Down
17 changes: 17 additions & 0 deletions man/JvmStats-class.Rd

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

20 changes: 0 additions & 20 deletions man/show-JvmStats-method.Rd

This file was deleted.

0 comments on commit efe615b

Please sign in to comment.