cmu-lib / konigsbergr

Compare 6216388 ... +3 ... 5f37d71

Coverage Reach

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 6 files from the diff.

@@ -119,7 +119,7 @@
Loading
119 119
view_konigsberg_path <- function(graph, pathway) {
120 120
  path_sf <- pathway_to_sf(graph, pathway)
121 121
122 -
  cross_pal <- colorFactor(c("#2B83BA", "#ABDDA4", "#FDAE61", "red"),
122 +
  cross_pal <- colorFactor(c('#7fc97f','#beaed4','#fdc086','#ffff99','#386cb0','#f0027f','#bf5b17','#666666'),
123 123
                           path_sf$pathway$total_times_bridge_crossed)
124 124
125 125
  lf <- leaflet(path_sf$pathway, width = "100%", height = "600px") %>%

@@ -6,6 +6,8 @@
Loading
6 6
#' @param graph A [`konigsberg_graph`]
7 7
#' @param starting_node An integer specifying the OSM id of the starting node.
8 8
#'   Defaults to the first vertex in `graph`.
9 +
#' @param cheat Boolean. Allow pathway to re-cross bridges?
10 +
#' @param quiet Boolean. Suppress progress messages?
9 11
#' @param ... Additional variables passed to [`greedy_search()`][pathfinder::greedy_search]
10 12
#'
11 13
#' @return A `konigsberg_path` object, which inherits from the `pathfinder_path` object from [`greedy_search()`][pathfinder::greedy_search]
@@ -15,11 +17,11 @@
Loading
15 17
16 18
#' @describeIn traverse_graph Cross every bridge in the graph
17 19
#' @export
18 -
cross_all_bridges <- function(graph, starting_node = NULL, ...) {
20 +
cross_all_bridges <- function(graph, starting_node = NULL, cheat = TRUE, quiet = FALSE, ...) {
19 21
  stopifnot(inherits(graph, "konigsberg_graph"))
20 22
  bridge_bundles <- collect_edge_bundles(graph)
21 23
  starting_point <- calculate_starting_node(graph, starting_node)
22 -
  res <- pathfinder::greedy_search(graph, bridge_bundles, E(graph)$distance, starting_point = starting_point, cheat = TRUE, quiet = FALSE, ...)
24 +
  res <- pathfinder::greedy_search(graph, bridge_bundles, E(graph)$distance, starting_point = starting_point, cheat = cheat, quiet = quiet, ...)
23 25
  class(res) <- c(class(res), "konigsberg_path")
24 26
  res
25 27
}
@@ -29,7 +31,7 @@
Loading
29 31
#'   [Relation](https://wiki.openstreetmap.org/wiki/Relation) ids of bridges
30 32
#'   that must be crossed.
31 33
#' @export
32 -
cross_specific_bridges <- function(graph, starting_node = NULL, required_bridges = NULL, ...) {
34 +
cross_specific_bridges <- function(graph, starting_node = NULL, required_bridges = NULL, cheat = TRUE, quiet = FALSE, ...) {
33 35
  stopifnot(inherits(graph, "konigsberg_graph"))
34 36
  bridge_bundles <- lapply(required_bridges, function(x) which(x == edge_attr(graph, "bridge_id")))
35 37
  starting_point <- calculate_starting_node(graph, starting_node)
@@ -38,6 +40,8 @@
Loading
38 40
                                   edge_bundles = bridge_bundles,
39 41
                                   distances = E(graph)$distance,
40 42
                                   starting_point = starting_point,
43 +
                                   cheat = cheat,
44 +
                                   quiet = quiet,
41 45
                                   ...)
42 46
  class(res) <- c(class(res), "konigsberg_path")
43 47
  res

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.75% 92.88%
Project Totals (6 files) 92.88%
Loading