No flags found
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
7dae136
... +1 ...
5935e19
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
431 | 431 | p <- p + ggplot2::facet_grid(. ~ variable, scales = "free_x") |
|
432 | 432 | p <- p + ggplot2::theme(axis.text.x = ggplot2::element_text(angle = 45, vjust = 1, hjust = 1)) |
|
433 | 433 | p <- p + ggplot2::labs(x = "", y = "") |
|
434 | - | ggplot2::ggsave(paste0(tempdir(), "/actel_report_auxiliary_files/dotplots.png"), width = 6, height = (1.3 + 0.115 * (nrow(t2) - 1))) |
|
434 | + | ggplot2::ggsave(paste0(tempdir(), "/actel_report_auxiliary_files/dotplots.png"), width = 6, height = (1.3 + 0.115 * (nrow(t2) - 1)), limitsize = FALSE) |
|
435 | 435 | appendTo("debug", "Terminating printDotplots.") |
|
436 | 436 | } |
|
437 | 437 |
483 | 483 | p <- p + ggplot2::scale_y_continuous(limits = c(0, 1), expand = c(0, 0, 0.05, 0)) |
|
484 | 484 | p <- p + ggplot2::labs(x = "", y = "Survival") |
|
485 | 485 | the.width <- max(2, sum(grepl("Disap.", colnames(section.overview))) * nrow(section.overview)) |
|
486 | - | ggplot2::ggsave(paste0(tempdir(), "/actel_report_auxiliary_files/survival.png"), width = the.width, height = 4) |
|
486 | + | ggplot2::ggsave(paste0(tempdir(), "/actel_report_auxiliary_files/survival.png"), width = the.width, height = 4, limitsize = FALSE) |
|
487 | 487 | appendTo("debug", "Terminating printSurvivalGraphic.") |
|
488 | 488 | } |
|
489 | 489 |
704 | 704 | } |
|
705 | 705 | } |
|
706 | 706 | # Save |
|
707 | - | ggplot2::ggsave(paste0(tempdir(), "/actel_report_auxiliary_files/", tag, ".", extension), width = the.width, height = the.height) # better to save in png to avoid point overlapping issues |
|
707 | + | ggplot2::ggsave(paste0(tempdir(), "/actel_report_auxiliary_files/", tag, ".", extension), width = the.width, height = the.height, limitsize = FALSE) # better to save in png to avoid point overlapping issues |
|
708 | 708 | ||
709 | 709 | if (counter %% 2 == 0) { |
|
710 | 710 | individual.plots <<- paste0(individual.plots, ", "/actel_report_auxiliary_files/", tag, ".", extension, "){ width=", the.width * 10, "% }\n") |
1271 | 1271 | p <- p + ggplot2::scale_fill_manual(values = as.vector(cbPalette)[1:length(unique(plotdata$Group))], drop = FALSE) |
|
1272 | 1272 | } |
|
1273 | 1273 | ||
1274 | - | ggplot2::ggsave(paste0(tempdir(), "/actel_report_auxiliary_files/", i,"_days.png"), width = 10, height = length(unique(plotdata$variable)) * 2) |
|
1274 | + | ggplot2::ggsave(paste0(tempdir(), "/actel_report_auxiliary_files/", i,"_days.png"), width = 10, height = length(unique(plotdata$variable)) * 2, limitsize = FALSE) |
|
1275 | 1275 | }) |
|
1276 | 1276 | } |
|
1277 | 1277 |
1377 | 1377 | p <- p + ggplot2::labs(x = "", y = "n") |
|
1378 | 1378 | p <- p + ggplot2::scale_y_continuous(expand = c(0, 0, 0.05, 0)) |
|
1379 | 1379 | the.width <- max(2, (ncol(input) - 1) * nrow(input) * 0.7) |
|
1380 | - | ggplot2::ggsave(paste0(tempdir(), "/actel_report_auxiliary_files/last_section.png"), width = the.width, height = 4) |
|
1380 | + | ggplot2::ggsave(paste0(tempdir(), "/actel_report_auxiliary_files/last_section.png"), width = the.width, height = 4, limitsize = FALSE) |
|
1381 | 1381 | } |
|
1382 | 1382 | ||
1383 | 1383 | #' Print a simple barplot with the number of tags last seen at each section |
1409 | 1409 | p <- p + ggplot2::coord_flip() |
|
1410 | 1410 | p <- p + ggplot2::guides(fill = ggplot2::guide_legend(reverse = TRUE)) |
|
1411 | 1411 | the.height <- max(2, ((length(levels(status.df$Very.last.array)) - 1) * 0.5)) |
|
1412 | - | ggplot2::ggsave(paste0(tempdir(), "/actel_report_auxiliary_files/last_arrays.png"), width = 6, height = the.height) |
|
1412 | + | ggplot2::ggsave(paste0(tempdir(), "/actel_report_auxiliary_files/last_arrays.png"), width = 6, height = the.height, limitsize = FALSE) |
|
1413 | 1413 | } |
|
1414 | 1414 | ||
1415 | 1415 | #' Print sensor data for each individual tag |
1488 | 1488 | } |
|
1489 | 1489 | ||
1490 | 1490 | # Save |
|
1491 | - | ggplot2::ggsave(paste0(tempdir(), "/actel_report_auxiliary_files/", tag, "_sensors.", extension), width = the.width, height = the.height) # better to save in png to avoid point overlapping issues |
|
1491 | + | ggplot2::ggsave(paste0(tempdir(), "/actel_report_auxiliary_files/", tag, "_sensors.", extension), width = the.width, height = the.height, limitsize = FALSE) # better to save in png to avoid point overlapping issues |
|
1492 | 1492 | ||
1493 | 1493 | n.plots <- n.plots + 1 |
|
1494 | 1494 | if (n.plots %% 2 == 0) { |
1026 | 1026 | ||
1027 | 1027 | # check sensor names |
|
1028 | 1028 | if (!expect_integer) { |
|
1029 | - | if(!any(grepl("^Sensor.unit$", colnames(bio)))) { |
|
1029 | + | if (!any(grepl("^Sensor.unit$", colnames(bio)))) { |
|
1030 | 1030 | appendTo(c("Screen", "Warning"), "Tags with multiple sensors are listed in the biometrics, but a 'Sensor.unit' column could not be found. Skipping sensor unit assignment.") |
|
1031 | 1031 | } |
|
1032 | 1032 | else { |
|
1033 | - | bio$Sensor.unit <- as.character(bio$Sensor.unit) #failsafe in case all values are numeric, or NA. |
|
1034 | - | ||
1035 | - | A <- sapply(strsplit(bio$Signal, "|", fixed = TRUE), length) |
|
1036 | - | pre_B <- strsplit(bio$Sensor.unit, "|", fixed = TRUE) |
|
1037 | - | B <- sapply(pre_B, length) |
|
1038 | - | B[sapply(pre_B, is.na)] <- 0 |
|
1039 | - | ||
1040 | - | if (any(A != B)) |
|
1041 | - | stopAndReport("The number of provided sensor units and signals do not match for ", |
|
1042 | - | ifelse(sum(A != B) <= 10, |
|
1043 | - | paste0("row(s) ", paste0(which(A != B), collapse = ", ")), |
|
1044 | - | paste0(sum(A != B), " row(s)")), |
|
1033 | + | bio$Sensor.unit <- as.character(bio$Sensor.unit) # failsafe in case all values are numeric, or NA. |
|
1034 | + | bio$Sensor.unit[bio$Sensor.unit == ''] <- NA_character_ |
|
1035 | + | ||
1036 | + | if (any(link <- na.as.false(startsWith(bio$Sensor.unit, '|')))) |
|
1037 | + | appendTo(c('screen', 'warning'), paste0("The Sensor.unit information in ", |
|
1038 | + | ifelse(sum(link) <= 10, |
|
1039 | + | paste0("row(s) ", paste0(which(link), collapse = ", ")), |
|
1040 | + | paste0(sum(link), " row(s)")), |
|
1041 | + | " of the biometrics starts with a '|' character. Could you have forgotten to include a sensor unit?")) |
|
1042 | + | ||
1043 | + | if (any(link <- na.as.false(endsWith(bio$Sensor.unit, '|')))) |
|
1044 | + | appendTo(c('screen', 'warning'), paste0("The Sensor.unit information in ", |
|
1045 | + | ifelse(sum(link) <= 10, |
|
1046 | + | paste0("row(s) ", paste0(which(link), collapse = ", ")), |
|
1047 | + | paste0(sum(link), " row(s)")), |
|
1048 | + | " of the biometrics ends with a '|' character. Could you have forgotten to include a sensor unit?")) |
|
1049 | + | ||
1050 | + | signals_per_tag <- sapply(strsplit(bio$Signal, "|", fixed = TRUE), length) # number of signals per tag |
|
1051 | + | aux <- strsplit(bio$Sensor.unit, "|", fixed = TRUE) |
|
1052 | + | sensors_per_tag <- sapply(aux, length) |
|
1053 | + | ||
1054 | + | if (any(link <- signals_per_tag != sensors_per_tag)) |
|
1055 | + | stopAndReport("The number of provided sensor units does not match the number of signals for ", |
|
1056 | + | ifelse(sum(link) <= 10, |
|
1057 | + | paste0("row(s) ", paste0(which(link), collapse = ", ")), |
|
1058 | + | paste0(sum(link), " row(s)")), |
|
1045 | 1059 | " of the biometrics.") |
|
1046 | 1060 | } |
|
1047 | 1061 | } |
1623 | 1637 | } else { # otherwise, prepare tag name and include sensor units if present |
|
1624 | 1638 | trimmed_list_names <<- c(trimmed_list_names, paste0(the_codespace, "-", min(bio_aux$Signal_expanded[[i]]))) |
|
1625 | 1639 | output <- my.list[list_matches] |
|
1640 | + | ||
1641 | + | # Find Sensor.unit column in the biometrics |
|
1626 | 1642 | if (any(grepl("^Sensor.unit$", colnames(bio)))) { |
|
1643 | + | # Replace sensor units... |
|
1627 | 1644 | for (j in 1:length(output)) { |
|
1628 | 1645 | sensor_index <- match(extractSignals(names(output)[j]), bio_aux$Signal_expanded[[i]]) |
|
1646 | + | # but only if the the sensor unit provided is not NA |
|
1629 | 1647 | if (!is.na(bio_aux$Sensor.unit_expanded[[i]][sensor_index])) { |
|
1630 | 1648 | output[[j]]$Sensor.Unit <- rep(bio_aux$Sensor.unit_expanded[[i]][sensor_index], nrow(output[[j]])) |
|
1631 | 1649 | } |
Files | Coverage |
---|---|
R | -0.13% 93.12% |
Project Totals (15 files) | 93.12% |
5935e19
dd98bc1
7dae136