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
19a6753
... +0 ...
19ec15b
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
100 | 100 | "<logger ", |
|
101 | 101 | "id=\"tracelog\" " |
|
102 | 102 | ) |
|
103 | - | if (inference_model$mcmc$tracelog$filename != "") { |
|
103 | + | if (is.na(inference_model$mcmc$tracelog$filename)) { |
|
104 | 104 | # Alignment IDs |
|
105 | 105 | ids <- beautier::get_alignment_id( |
|
106 | 106 | input_filename, |
112 | 112 | top_line, |
|
113 | 113 | "fileName=\"", filename, ".log\" " |
|
114 | 114 | ) |
|
115 | + | } else { |
|
116 | + | testit::assert(!is.na(inference_model$mcmc$tracelog$filename)) |
|
117 | + | top_line <- paste0( |
|
118 | + | top_line, |
|
119 | + | "fileName=\"", inference_model$mcmc$tracelog$filename, "\" " |
|
120 | + | ) |
|
115 | 121 | } |
|
116 | 122 | top_line <- paste0( |
|
117 | 123 | top_line, |
1 | 1 | #' Create a \code{tracelog} object |
|
2 | - | #' @param filename name of the file to store the posterior traces |
|
2 | + | #' @param filename |
|
3 | + | #' name of the file to store the posterior traces. |
|
4 | + | #' Use \link{NA} to use the filename \code{[alignment_id].log}, |
|
5 | + | #' where \code{alignment_id} is obtained using \link{get_alignment_id} |
|
3 | 6 | #' @param log_every number of MCMC states between the logging of that state |
|
4 | 7 | #' phylogenies to. By default, this is \code{$(trace).traces} |
|
5 | 8 | #' @param mode mode how to log. |
10 | 13 | #' Valid values are the ones returned by \link{get_log_sorts} |
|
11 | 14 | #' @export |
|
12 | 15 | create_tracelog <- function( |
|
13 | - | filename = "test_output_0.log", |
|
16 | + | filename = NA, |
|
14 | 17 | log_every = 1000, |
|
15 | 18 | mode = "autodetect", |
|
16 | 19 | sanitise_headers = TRUE, |
44 | 44 | #' @noRd |
|
45 | 45 | check_tracelog_list_element_values <- function(tracelog) { |
|
46 | 46 | ||
47 | - | assertive::assert_is_character(tracelog$filename) |
|
48 | - | assertive::assert_is_a_string(tracelog$filename) |
|
47 | + | if (!beautier::is_one_na(tracelog$filename)) { |
|
48 | + | assertive::assert_is_character(tracelog$filename) |
|
49 | + | assertive::assert_is_a_string(tracelog$filename) |
|
50 | + | } |
|
49 | 51 | assertive::assert_is_numeric(tracelog$log_every) |
|
50 | 52 | assertive::assert_all_are_positive(tracelog$log_every) |
|
51 | 53 | beautier::check_log_mode(tracelog$mode) |
Files | Coverage |
---|---|
R | -0.09% 99.48% |
Project Totals (228 files) | 99.48% |
19ec15b
19a6753