ropensci / beautier

Compare 19a6753 ... +0 ... 19ec15b

Coverage Reach
parameter_to_xml.R create_beast2_input_distr.R init_site_models.R distr_to_xml.R site_model_to_xml_subst_model.R create_distr.R create_beast2_input_loggers.R create_param.R init_clock_models.R init_tree_priors.R create_site_model.R tree_prior_to_xml_operators.R check_clock_model.R are_equivalent_xmls.R is_distr.R site_model_to_xml_prior.R create_beast2_input_file.R site_model_to_xml_operators.R site_model_to_xml_state.R create_beast2_input_run.R init_distr.R clock_model_to_xml_lh_distr.R clock_model_to_xml_operators.R is_param.R is_site_model.R create_beast2_input.R check_mcmc.R is_init_distr.R create_clock_model.R mrca_prior_to_xml_prior_distr.R check_inference_model.R create_tree_prior.R check_mrca_prior.R is_init_site_model.R mcmc_to_xml_run.R site_model_to_xml_lh_distr.R tree_prior_to_xml_state.R create_beast2_input_beast.R create_beast2_input_state.R clock_model_to_xml_prior_distr.R taxa_to_xml_tree.R is_tree_prior.R init_inference_model.R create_gamma_site_model.R mrca_prior_to_xml_lh_distr.R site_model_to_xml_tracelog.R get_site_model_n_params.R check_gamma_site_model.R check_beauti_options.R check_fasta_file_and_inference_model.R tree_prior_to_xml_tracelog.R extract_xml_section_from_lines.R get_distr_n_params.R is_init_tree_prior.R init_mrca_priors.R create_beast2_input_data.R create_beast2_input_operators.R are_equal_xml_lines.R clock_model_to_xml_state.R are_mrca_taxa_non_intersecting.R create_beast2_input_data_sequences.R create_beast2_input_from_model.R clock_models_to_xml_state.R get_param_names.R create_beast2_beast_xml.R gamma_site_model_to_xml_prior_distr.R create_beast2_input_map.R check_tracelog.R create_beast2_input_file_from_model.R get_tree_prior_n_params.R check_screenlog.R check_treelog.R clock_model_to_xml_treelogger.R mrca_prior_to_xml_tracelog.R check_clock_models.R create_mcmc_nested_sampling.R clock_model_to_xml_tracelog.R check_mcmc_nested_sampling.R is_init_clock_model.R mrca_priors_to_xml_distr.R phylo_to_xml_state.R tree_prior_to_xml_prior_distr.R rnd_phylo_xml_init.R rln_clock_model_to_xml_mean_rate_prior.R get_site_model_n_distrs.R tree_priors_to_xml_operators.R is_mcmc.R get_tree_prior_n_distrs.R are_mrca_taxa_names_in_fastas.R are_equal_xml_files.R get_operator_id_pre.R freq_equilibrium_to_xml.R clock_models_to_xml_operators.R mrca_prior_to_xml_taxonset.R interspace.R create_mcmc.R gamma_site_model_to_xml_state.R mrca_prior_to_xml_state.R is_clock_model.R check_file_exists.R remove_multiline.R clock_models_to_xml_tracelog.R fasta_to_sequences.R create_beast2_input_init.R init_gamma_site_model.R fastas_to_phylos.R clock_models_to_xml_prior_distr.R create_inference_model.R create_tree_prior_from_name.R mrca_priors_to_xml_tracelog.R are_clock_models.R mrca_priors_to_xml_state.R is_xml.R create_mrca_prior.R create_beauti_options.R fasta_to_phylo.R are_mrca_priors.R create_site_model_from_name.R create_treelog.R create_tracelog.R create_trait_set_string.R tree_models_to_xml_tracelog.R indent.R find_clock_model.R create_screenlog.R is_init_mrca_prior.R has_xml_short_closing_tag.R has_xml_opening_tag.R is_mrca_align_ids_in_fasta.R get_site_models_n_distrs.R get_site_models_n_params.R is_mrca_align_ids_in_fastas.R get_tree_priors_n_distrs.R get_n_taxa.R check_tree_prior.R check_site_model.R get_crown_age.R compare_lines.R create_data_xml.R are_tree_priors.R are_ids.R get_clock_models_ids.R create_tree_priors.R get_tree_prior_names.R are_fasta_filenames.R site_models_to_xml_state.R is_inference_model.R is_mrca_prior.R site_models_to_xml_prior_distr.R tree_priors_to_xml_state.R get_tree_priors_n_params.R init_mrca_prior.R check_site_models.R is_one_int.R check_tree_priors.R gamma_site_models_to_xml_prior_distr.R has_xml_closing_tag.R get_alignment_ids.R is_in_patterns.R find_first_regex_line.R check_log_mode.R get_xml_closing_tag.R extract_xml_operators_from_lines.R find_last_regex_line.R tree_priors_to_xml_distr.R check_phylogeny.R create_tree_priors_from_names.R create_site_models_from_names.R get_xml_opening_tag.R site_models_to_xml_operators.R is_one_double.R check_log_sort.R are_site_models.R create_site_models.R tree_priors_to_xml_tracelog.R are_mrca_alignment_ids_in_fastas.R get_has_non_strict_clock_model.R is_gamma_site_model.R create_clock_models_from_names.R get_log_modes.R get_gamma_site_model_n_distrs.R remove_empty_lines.R get_clock_model_name.R files_exist.R check_inference_models.R get_beautier_path.R are_init_tree_priors.R are_init_mrca_priors.R is_init_gamma_site_model.R are_init_clock_models.R is_beauti_options.R site_models_to_xml_tracelog.R get_log_sorts.R extract_xml_loggers_from_lines.R get_alignment_id.R are_equal_mcmcs.R count_trailing_spaces.R create_clock_model_from_name.R are_init_site_models.R init_param.R get_gamma_site_model_n_params.R get_distr_names.R is_mrca_prior_with_distr.R are_initial_phylogenies.R get_beautier_paths.R is_init_param.R create_clock_models.R is_one_na.R find_first_xml_opening_tag_line.R has_mrca_prior.R get_taxa_names.R find_last_xml_closing_tag_line.R is_default_mcmc.R create_beast2_input_xml.R is_site_model_name.R is_clock_model_name.R get_clock_model_names.R is_phylo.R is_distr_name.R is_param_name.R is_freq_equilibrium_name.R is_tree_prior_name.R get_site_model_names.R get_freq_equilibrium_names.R get_test_filenames.R is_id.R get_file_base_sans_ext.R is_one_bool.R

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.


@@ -100,7 +100,7 @@
Loading
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,6 +112,12 @@
Loading
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,5 +1,8 @@
Loading
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,7 +13,7 @@
Loading
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,8 +44,10 @@
Loading
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)

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.48%
Project Totals (228 files) 99.48%
Loading