Skip to content

Commit 24c4adc

Browse files
authored
Reference GitHub issues in TODO comments for better traceability (#10)
1 parent 63a74b8 commit 24c4adc

5 files changed

Lines changed: 8 additions & 9 deletions

R/class_random_block_size_randomizer.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,16 @@ RandomBlockSizeRandomizer <- setRefClass("RandomBlockSizeRandomizer",
107107
initRandomValues = function(numberOfBlockSizes, ..., numberOfValuesToCreate = 1000L) {
108108
.self$values <- sample.int(n = numberOfBlockSizes, size = numberOfValuesToCreate, replace = TRUE)
109109
},
110-
nextInt = function(numberOfBlockSizes) { # TODO implement numberOfBlockSizes
110+
nextInt = function(numberOfBlockSizes) {
111111
if (length(values) == 0) {
112112
stop("Block size randomizer not initialized. Call initRandomValues() first")
113113
}
114114
if (index > length(values)) {
115115
stop("No more random block sizes available")
116116
}
117117

118+
# TODO implement numberOfBlockSizes check (https://github.com/RCONIS/randomforge/issues/7)
119+
118120
value <- values[index]
119121
.self$index <- index + 1L
120122
return(value)

R/class_random_method_pbr.R

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,7 @@ RandomMethodPBR <- setRefClass("RandomMethodPBR",
189189

190190
blockSize <- blockSizes[[randomIndex]]
191191

192-
# TODO logging
193-
# Map<String, Object> rndLoggerValues = new HashMap<String, Object>()
194-
# rndLoggerValues.put("blockSize", "new random block size: " + blockSize + " (random index: " + randomIndex + ")")
195-
# logger.info("Random configuration set: " + rndLoggerValues)
192+
# TODO log this (https://github.com/RCONIS/randomforge/issues/6)
196193

197194
return(blockSize)
198195
}

R/class_random_method_range_set.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ RandomMethodRangeSet <- setRefClass("RandomMethodRangeSet",
178178
d <- 0
179179
sum <- 0
180180
randomMethodRanges <- list()
181-
# TODO sort randomMethodRanges
181+
# TODO sort randomMethodRanges (https://github.com/RCONIS/randomforge/issues/9)
182182

183183
for (range in randomMethodRanges) {
184184
sum <- sum + range$getUpperBound() - range$getLowerBound()

R/class_random_system_state.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ RandomSystemState <- setRefClass("RandomSystemState",
300300
fillingLevel <- fillingLevel + 1L
301301
.self$fillingLevelsOverall[[treatmentArmId]] <- fillingLevel
302302

303-
# TODO increment also factor and strata levels
303+
# TODO increment also factor and strata levels (https://github.com/RCONIS/randomforge/issues/8)
304304
},
305305
setFillingLevelsBlock = function(randomBlock) {
306306
factorLevels <- randomBlock$factorLevels

R/f_random_service.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ getNextRandomResult <- function(
7474
randomSystemState <- RandomSystemState()
7575
randomSystemState$init(randomConfiguration$treatmentArmIds,
7676
factorIds = randomConfiguration$factorIds,
77-
strataIds = NULL # TODO implement strataIds
77+
strataIds = NULL # TODO implement strataIds (https://github.com/RCONIS/randomforge/issues/4)
7878
)
7979
}
8080
if (is.null(randomSystemState)) {
8181
stop("Failed to get random system state")
8282
}
8383

84-
factorLevels <- list() # TODO implement factorLevels
84+
factorLevels <- list() # TODO implement factorLevels (https://github.com/RCONIS/randomforge/issues/4)
8585

8686
randomResult <- randomMethod$randomize(factorLevels, randomSystemState, randomAllocationValue)
8787
randomDataBase$persist(randomResult)

0 commit comments

Comments
 (0)