rich-iannone / DiagrammeR

Compare b6a7019 ... +1 ... 169da52

Coverage Reach
utils.R print.R generate_dot.R add_node.R x11_hex.R import_graph.R add_n_nodes_ws.R trav_both_edge.R add_full_graph.R render_graph.R get_paths.R create_graph.R add_grid_3d.R add_edge.R add_grid_2d.R add_pa_graph.R export_graph.R trav_in_until.R trav_out_until.R add_edges_from_table.R add_prism.R add_balanced_tree.R add_gnp_graph.R add_gnm_graph.R add_growing_graph.R add_cycle.R delete_edge.R add_star.R add_path.R trav_both.R add_smallworld_graph.R select_nodes_in_neighborhood.R trav_in.R add_islands_graph.R visnetwork.R trav_out.R get_node_info.R select_edges.R colorize_node_attrs.R colorize_edge_attrs.R trav_in_edge.R trav_out_edge.R trav_out_node.R trav_in_node.R add_node_clones_ws.R combine_graphs.R add_nodes_from_table.R is_edge_present.R get_similar_nbrs.R add_reverse_edges_ws.R select_nodes.R add_n_node_clones.R from_igraph.R select_edges_by_node_id.R layout_nodes_w_string.R select_nodes_by_degree.R set_node_attr_to_display.R add_edges_w_string.R select_edges_by_edge_id.R display_metagraph.R set_edge_attr_to_display.R attr_themes.R select_nodes_by_id.R add_nodes_from_df_cols.R recode_node_attrs.R recode_edge_attrs.R set_node_attr_w_fcn.R rescale_node_attrs.R rescale_edge_attrs.R filter_graph_series.R add_edge_clone.R set_edge_attrs.R set_node_position.R select_last_edges_created.R select_last_nodes_created.R add_n_nodes.R invert_selection.R fully_connect_nodes_ws.R create_node_df.R transform_to_subgraph_ws.R delete_node.R grViz.R set_node_attrs.R delete_global_graph_attrs.R add_graph_action.R spectools.R create_edge_df.R delete_edges_ws.R join_node_attrs.R rename_node_attrs.R rename_edge_attrs.R delete_nodes_ws.R nudge_node_positions_ws.R delete_graph_actions.R delete_loop_edges_ws.R get_jaccard_similarity.R trigger_graph_actions.R add_forward_edges_ws.R fully_disconnect_nodes_ws.R get_last_edges_created.R get_last_nodes_created.R copy_node_attrs.R copy_edge_attrs.R mutate_edge_attrs_ws.R get_dice_similarity.R transform_to_complement_graph.R trav_reverse_edge.R mutate_node_attrs_ws.R get_edges.R set_cache.R join_edge_attrs.R edge_aes.R rev_edge_dir_ws.R reorder_graph_actions.R drop_node_attrs.R set_edge_attrs_ws.R add_global_graph_attrs.R get_edge_attrs.R base64.R add_edge_df.R add_node_df.R from_adj_matrix.R is_edge_mutual.R is_edge_multiple.R node_aes.R set_node_attrs_ws.R do_dfs.R drop_edge_attrs.R do_bfs.R delete_cache.R get_radiality.R set_graph_time.R is_edge_loop.R get_agg_degree_out.R clear_selection.R get_agg_degree_total.R get_agg_degree_in.R get_graph_series_info.R rev_edge_dir.R get_selection.R get_degree_distribution.R mutate_edge_attrs.R mutate_node_attrs.R count_unconnected_nodes.R export_csv.R get_authority_centrality.R get_eigen_centrality.R get_node_attrs.R get_degree_histogram.R get_edge_attrs_ws.R get_closeness.R get_coreness.R get_node_attrs_ws.R get_degree_out.R get_constraint.R get_degree_in.R get_degree_total.R deselect_edges.R get_all_connected_nodes.R deselect_nodes.R get_s_connected_cmpts.R get_w_connected_cmpts.R get_graph_info.R get_leverage_centrality.R set_graph_name.R get_eccentricity.R DiagrammeR.R get_edge_count_w_multiedge.R mermaid.R set_graph_directed.R set_graph_undirected.R get_alpha_centrality.R get_predecessors.R get_successors.R get_closeness_vitality.R get_common_nbrs.R get_betweenness.R is_node_present.R get_multiedge_count.R get_pagerank.R get_non_nbrs.R get_nbrs.R create_graph_series.R combine_edfs.R render_graph_from_graph_series.R is_graph_weighted.R get_global_graph_attr_info.R count_automorphisms.R get_bridging.R combine_ndfs.R get_cmty_louvain.R get_min_eccentricity.R get_cmty_fast_greedy.R get_cmty_edge_btwns.R to_igraph.R get_cmty_l_eigenvec.R add_graph_to_graph_series.R get_edge_ids.R get_min_cut_between.R get_node_ids.R count_loop_edges.R open_graph.R save_graph.R get_cmty_walktrap.R is_property_graph.R get_articulation_points.R get_edge_df_ws.R get_node_df_ws.R get_periphery.R get_cache.R get_graph_from_graph_series.R is_graph_connected.R get_reciprocity.R count_mutual_node_pairs.R is_graph_dag.R get_max_eccentricity.R get_girth.R count_unconnected_node_pairs.R remove_graph_from_graph_series.R count_asymmetric_node_pairs.R get_mean_distance.R get_adhesion.R count_s_connected_cmpts.R count_w_connected_cmpts.R get_edge_info.R count_edges.R is_graph_empty.R count_nodes.R transform_to_min_spanning_tree.R node_data.R get_graph_actions.R edge_data.R get_graph_log.R is_graph_simple.R get_graph_time.R is_graph_directed.R get_graph_name.R get_edge_df.R get_node_df.R is_graph_undirected.R count_graphs_in_graph_series.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.

Showing 2 of 3 files from the diff.

@@ -106,30 +106,40 @@
Loading
106 106
    num_recodings <- length(cut_points) - 1
107 107
  }
108 108
109 -
  # If the number of recodings lower than any Color
110 -
  # Brewer palette, shift palette to `viridis`
111 -
  if ((num_recodings < 3 | num_recodings > 10) & palette %in%
112 -
      c(row.names(RColorBrewer::brewer.pal.info))) {
113 -
    palette <- "viridis"
109 +
  # Handle vector of hexadecimal or named colors
110 +
  if (length(palette) > 1) {
111 +
    # Verify colors are valid
112 +
    if (!all(tolower(palette) %in% x11_hex()$hex)) {
113 +
      emit_error(fcn_name = fcn_name,
114 +
                 reasons = "The color palette contains invalid hexadecimal values.")
115 +
    }
116 +
    if (length(palette) < num_recodings) {
117 +
      # Revert to viridis if provided color vector is too short
118 +
      palette <- "viridis"
119 +
    } else {
120 +
      color_palette <- toupper(palette)[1:num_recodings]
121 +
    }
114 122
  }
115 123
116 -
  # Stop function if color palette is not `viridis`
117 -
  # or any of the RColorBrewer palettes
124 +
  # Handle viridis and ColorBrewer palette name input
118 125
  if (length(palette) == 1) {
119 -
    if (!(palette %in%
120 -
          c(row.names(RColorBrewer::brewer.pal.info),
121 -
            "viridis"))) {
126 +
    # If the number of recodings lower than any Color
127 +
    # Brewer palette, shift palette to `viridis`
128 +
    if ((num_recodings < 3 | num_recodings > 10) & palette %in%
129 +
        c(row.names(RColorBrewer::brewer.pal.info))) {
130 +
      palette <- "viridis"
131 +
    }
122 132
133 +
    # or any of the RColorBrewer palettes
134 +
    if (!(palette %in% c(row.names(RColorBrewer::brewer.pal.info),
135 +
                         "viridis"))) {
123 136
      emit_error(
124 137
        fcn_name = fcn_name,
125 138
        reasons = "The color palette is not an `RColorBrewer` or `viridis` palette")
126 139
    }
127 -
  }
128 140
129 -
  # Obtain a color palette
130 -
  if (length(palette) == 1) {
131 -
    if (palette %in%
132 -
        row.names(RColorBrewer::brewer.pal.info)) {
141 +
    # Obtain a color palette
142 +
    if (palette %in% row.names(RColorBrewer::brewer.pal.info)) {
133 143
      color_palette <- RColorBrewer::brewer.pal(num_recodings, palette)
134 144
    } else if (palette == "viridis") {
135 145
      color_palette <- viridis::viridis(num_recodings)

@@ -153,29 +153,40 @@
Loading
153 153
    num_recodings <- length(cut_points) - 1
154 154
  }
155 155
156 -
  # If the number of recodings lower than any Color
157 -
  # Brewer palette, shift palette to `viridis`
158 -
  if ((num_recodings < 3 | num_recodings > 10) & palette %in%
159 -
      c(row.names(RColorBrewer::brewer.pal.info))) {
160 -
    palette <- "viridis"
156 +
  # Handle vector of hexadecimal or named colors
157 +
  if (length(palette) > 1) {
158 +
    # Verify colors are valid
159 +
    if (!all(tolower(palette) %in% x11_hex()$hex)) {
160 +
      emit_error(fcn_name = fcn_name,
161 +
                 reasons = "The color palette contains invalid hexadecimal values.")
162 +
    }
163 +
    if (length(palette) < num_recodings) {
164 +
      # Revert to viridis if provided color vector is too short
165 +
      palette <- "viridis"
166 +
    } else {
167 +
      color_palette <- toupper(palette)[1:num_recodings]
168 +
    }
161 169
  }
162 170
163 -
  # or any of the RColorBrewer palettes
171 +
  # Handle viridis and ColorBrewer palette name input
164 172
  if (length(palette) == 1) {
165 -
    if (!(palette %in%
166 -
          c(row.names(RColorBrewer::brewer.pal.info),
167 -
            "viridis"))) {
173 +
    # If the number of recodings lower than any Color
174 +
    # Brewer palette, shift palette to `viridis`
175 +
    if ((num_recodings < 3 | num_recodings > 10) & palette %in%
176 +
        c(row.names(RColorBrewer::brewer.pal.info))) {
177 +
      palette <- "viridis"
178 +
    }
168 179
180 +
    # or any of the RColorBrewer palettes
181 +
    if (!(palette %in% c(row.names(RColorBrewer::brewer.pal.info),
182 +
                         "viridis"))) {
169 183
      emit_error(
170 184
        fcn_name = fcn_name,
171 185
        reasons = "The color palette is not an `RColorBrewer` or `viridis` palette")
172 186
    }
173 -
  }
174 187
175 -
  # Obtain a color palette
176 -
  if (length(palette) == 1) {
177 -
    if (palette %in%
178 -
        row.names(RColorBrewer::brewer.pal.info)) {
188 +
    # Obtain a color palette
189 +
    if (palette %in% row.names(RColorBrewer::brewer.pal.info)) {
179 190
      color_palette <- RColorBrewer::brewer.pal(num_recodings, palette)
180 191
    } else if (palette == "viridis") {
181 192
      color_palette <- viridis::viridis(num_recodings)

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 -<.01% 81.03%
Project Totals (241 files) 81.03%
Loading