vimc / orderly
Showing 1 of 8 files from the diff.
Other files ignored by Codecov

@@ -51,6 +51,19 @@
Loading
51 51
}
52 52
53 53
54 +
prepare_git_example_from_source <- function(source_path, path) {
55 +
  temp <- file.path(tempfile(), "demo")
56 +
  fs::dir_copy(source_path, temp)
57 +
  generate_source_db(temp)
58 +
  run_orderly_demo(temp)
59 +
  build_git_demo(temp)
60 +
  res <- prepare_orderly_git_example(path, run_report = FALSE)
61 +
  options(orderly.server.demo = NULL)
62 +
  unlink(temp, recursive = TRUE)
63 +
  res
64 +
}
65 +
66 +
54 67
run_orderly_demo <- function(path, quiet = FALSE) {
55 68
  if (quiet) {
56 69
    oo <- options(orderly.nolog = TRUE)
@@ -79,6 +92,7 @@
Loading
79 92
  path
80 93
}
81 94
95 +
82 96
## This is a really rubbish set of test data.  It requires an open
83 97
## "source" database and will write out two tables.  This is used by
84 98
## the examples.
@@ -115,6 +129,17 @@
Loading
115 129
  src_files <- dir(src, full.names = TRUE)
116 130
  file_copy(src_files, path, overwrite = TRUE, recursive = TRUE)
117 131
132 +
  generate_source_db(path)
133 +
134 +
  if (git) {
135 +
    prepare_basic_git(path, quiet = TRUE)
136 +
  }
137 +
138 +
  path
139 +
}
140 +
141 +
142 +
generate_source_db <- function(path) {
118 143
  if (file.exists(file.path(path, "source.R"))) {
119 144
    generator <- source(file.path(path, "source.R"), local = TRUE)$value
120 145
  } else {
@@ -125,12 +150,6 @@
Loading
125 150
  if (length(con) > 0L) {
126 151
    generator(con)
127 152
  }
128 -
129 -
  if (git) {
130 -
    prepare_basic_git(path, quiet = TRUE)
131 -
  }
132 -
133 -
  path
134 153
}
135 154
136 155
@@ -196,8 +215,10 @@
Loading
196 215
## extendable...
197 216
##
198 217
## After building this we have two branches 'master' with
199 -
build_git_demo <- function() {
200 -
  path <- prepare_orderly_example("demo", file.path(tempfile(), "demo"))
218 +
build_git_demo <- function(path = NULL) {
219 +
  if (is.null(path)) {
220 +
    path <- prepare_orderly_example("demo", file.path(tempfile(), "demo"))
221 +
  }
201 222
  dir.create(file.path(path, "extra"))
202 223
  move <- setdiff(dir(file.path(path, "src"), pattern = "^[^.]+$"),
203 224
                  c("minimal", "global"))
Files Coverage
R 99.96%
Project Totals (41 files) 99.96%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading