vimc / orderly

Compare 4ccd6eb ... +4 ... e249e8d

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

Learn more about Codecov Flags here.

Showing 1 of 6 files from the diff.

@@ -93,8 +93,9 @@
Loading
93 93
  if (!is.null(depends)) {
94 94
    for (i in seq_len(nrow(depends))) {
95 95
      if (!isTRUE(depends$draft[[i]])) {
96 -
        orderly_pull_archive(depends$name[[i]], depends$id[[i]], config,
97 -
                             FALSE, remote, parameters, recursive)
96 +
        orderly_pull_archive_internal(depends$name[[i]], depends$id[[i]],
97 +
                                      config, FALSE, remote, parameters,
98 +
                                      recursive)
98 99
      }
99 100
    }
100 101
  }
@@ -104,11 +105,22 @@
Loading
104 105
##' @export
105 106
##' @rdname orderly_pull_dependencies
106 107
##'
107 -
##' @param id The identifier (for `orderly_pull_archive`).  The default is
108 -
##'   to use the latest report.
108 +
##' @param id The report identifier (for `orderly_pull_archive` and
109 +
##'   `orderly_push_archive`). Can be a specific report `id` or `latest` to get
110 +
##'   the most recent version or a full search query see
111 +
##'   [orderly::orderly_search()] for details. Defaults to using the
112 +
##'   latest report.
109 113
orderly_pull_archive <- function(name, id = "latest", root = NULL,
110 114
                                 locate = TRUE, remote = NULL,
111 -
                                 parameters = NULL, recursive = TRUE) {
115 +
                                 recursive = TRUE) {
116 +
  orderly_pull_archive_internal(name, id, root = root,
117 +
                                locate = locate, remote = remote,
118 +
                                parameters = NULL, recursive = recursive)
119 +
}
120 +
121 +
orderly_pull_archive_internal <- function(name, id = "latest", root = NULL,
122 +
                                          locate = TRUE, remote = NULL,
123 +
                                          parameters = NULL, recursive = TRUE) {
112 124
  info <- pull_info(name, id, root, locate, remote, parameters)
113 125
  name <- info$name
114 126
  id <- info$id
@@ -191,6 +203,15 @@
Loading
191 203
192 204
  if (id == "latest") {
193 205
    id <- orderly_latest(name, config, FALSE)
206 +
  } else if (id_is_query(id)) {
207 +
    query <- id
208 +
    id <- orderly_search(id, name, root = root)
209 +
    if (is.na(id)) {
210 +
      msg <- c(
211 +
        sprintf("Failed to find suitable version of '%s' with query:", name),
212 +
        sprintf("  '%s'", query))
213 +
      stop(paste(msg, collapse = "\n"), call. = FALSE)
214 +
    }
194 215
  }
195 216
196 217
  v <- remote_report_versions(name, config, FALSE, remote)
@@ -638,10 +659,14 @@
Loading
638 659
    if (is.na(id)) {
639 660
      msg <- c(
640 661
        sprintf("Failed to find suitable version of '%s' with query:", name),
641 -
        sprintf("  '%s'", query),
642 -
        "and parameters",
643 -
        sprintf("  - %s: %s", names(parameters),
644 -
                vcapply(parameters, as.character)))
662 +
        sprintf("  '%s'", query))
663 +
      if (!is.null(parameters)) {
664 +
        msg <- c(
665 +
          msg,
666 +
          "and parameters",
667 +
          sprintf("  - %s: %s", names(parameters),
668 +
                  vcapply(parameters, as.character)))
669 +
      }
645 670
      stop(paste(msg, collapse = "\n"), call. = FALSE)
646 671
    }
647 672
  } else {

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
R -0.09% 99.91%
Project Totals (41 files) 99.91%
Loading