Skip to content

Commit

Permalink
Fix issues unearthed by tests
Browse files Browse the repository at this point in the history
  • Loading branch information
katieb1 committed Feb 1, 2024
1 parent b0cc2de commit 0ecb480
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion R/datasheet.R
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ setMethod("datasheet",
}

if (!returnInvisible) {
sheetInfo <- subset(sheetInfo, is.element(visible, c("Yes")))
sheetInfo <- sheetInfo[sheetInfo$visible == "Yes",]
}

sheetInfo <- sheetInfo[order(sheetInfo$id), ]
Expand Down
10 changes: 8 additions & 2 deletions R/package.R
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,16 @@ setMethod("package", signature(ssimObject = "Session"), function(ssimObject, ins
} else if (grepl("The remote name could not be resolved", tt[1])) {
out <- "Could not connect to the package server."
} else {
out <- .dataframeFromSSim(tt, colNames = c("name", "description", "version"), csv = FALSE)
out <- .dataframeFromSSim(tt, localNames = TRUE, csv=FALSE)
}
drops <- c("x")
out <- out[ , !(names(out) %in% drops)]
return(out)
} else {
tt <- command(c("list", arg, "csv"), ssimObject)
out <- .dataframeFromSSim(tt, localNames = TRUE, csv = FALSE)
drops <- c("x")
out <- out[ , !(names(out) %in% drops)]
return(out)
}
} else {
Expand All @@ -99,7 +103,7 @@ setMethod("package", signature(ssimObject = "Session"), function(ssimObject, ins
pkgList <- command(c("installed"), ssimObject,
program = "SyncroSim.PackageManager.exe")
pkgDf <- .dataframeFromSSim(pkgList,
colNames = c("name", "description", "version"),
localNames = TRUE,
csv = FALSE)
if (listTemplates %in% pkgDf$name == FALSE) {
stop("SyncroSim package not installed")
Expand All @@ -112,6 +116,8 @@ setMethod("package", signature(ssimObject = "Session"), function(ssimObject, ins
out <- .dataframeFromSSim(tt,
colNames =c("name", "displayName", "installed"),
csv = F)
drops <- c("x")
out <- out[ , !(names(out) %in% drops)]
return(out)
} else {
stop("listTemplates must be a character name of a SyncroSim Package")
Expand Down
4 changes: 2 additions & 2 deletions R/session.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ setMethod(f = "initialize", signature = "Session", definition = function(.Object

loadVersion <- FALSE
if (ssimCurrentVersionBits[1] >= ssimRequiredVersionBits[1]){
if (ssimCurrentVersionBits[1] > ssimRequiredVersion[1]) {
if (ssimCurrentVersionBits[1] > ssimRequiredVersionBits[1]) {
loadVersion <- TRUE
} else {
if (ssimCurrentVersionBits[2] >= ssimRequiredVersionBits[2]){
if (ssimCurrentVersionBits[2] > ssimRequiredVersionBits[2]) {
loadVersion <- TRUE
} else {
if (ssimCurrentVersionBits[3] >= ssimRequiredVersionBits[3]){
if (ssimCurrentVersionBits[3] > ssimRequiredVersionBits[3]){
if (ssimCurrentVersionBits[3] >= ssimRequiredVersionBits[3]){
loadVersion <- TRUE
}
}
Expand Down

0 comments on commit 0ecb480

Please sign in to comment.