Skip to content

Commit

Permalink
Housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
steffilazerte committed Feb 16, 2024
1 parent 12e6da6 commit f2923ca
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 14 deletions.
3 changes: 1 addition & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ Imports:
DT (>= 0.23),
ggplot2 (>= 3.3.5),
ggthemes (>= 4.2.4),
shinyhttr (>= 1.1.0),
shinyjs (>= 2.1.0),
shinyWidgets (>= 0.7.6)
htmltools (>= 0.5.7)
Depends:
R (>= 4.0)
Suggests:
Expand Down
3 changes: 1 addition & 2 deletions R/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ aq_app <- function() {

# Check for suggested packages
rlang::check_installed(
c("DT", "ggplot2", "ggthemes",
"shinyWidgets", "shinyjs", "shinyhttr"))
c("DT", "ggplot2", "ggthemes", "shinyjs"))

ui <- tagList(
page_navbar(
Expand Down
2 changes: 1 addition & 1 deletion R/fetching_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ cache_dir <- function() {
#'
#' Removes data cache
#'
#' @param bcmaps Logical. Whether or not to also remove CDED files cached with
#' @param bcmaps_cded Logical. Whether or not to also remove CDED files cached with
#' the bcmaps package. These are used by bcaquifertools for acquiring TRIM
#' data, but may also be cached for use by other workflows.
#'
Expand Down
4 changes: 2 additions & 2 deletions R/lithology.R
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,8 @@ lith_yield <- function(lith, flatten = FALSE) {
# least one of each
flag_yield = .data$n_yield != .data$n_depth &
.data$n_yield != 0 & .data$n_depth != 0,
yield = replace(yield, .data$flag_yield, NA),
depth = replace(depth, .data$flag_yield, NA)) %>%
yield = replace(.data$yield, .data$flag_yield, NA),
depth = replace(.data$depth, .data$flag_yield, NA)) %>%
dplyr::select(-"n_yield", -"n_depth") %>%
tidyr::unnest(cols = c("yield", "depth"), keep_empty = TRUE)

Expand Down
9 changes: 2 additions & 7 deletions R/mod_wells.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ ui_wells <- function(id) {
choices = c("Lidar" = "lidar", "TRIM" = "trim")),
h4("Messages"),
verbatimTextOutput(ns("messages"), placeholder = TRUE)
#shinyWidgets::progressBar(
# title = "Current Lidar tile:",
# id = ns("lidar_progress"), value = 0, display_pct = TRUE)
),
nav_panel("Maps",
plotOutput(ns("map_plot"), height = "650px")),
Expand Down Expand Up @@ -177,15 +174,13 @@ dem_region_shiny <- function(type, watershed, session) {
withCallingHandlers({
message(stringr::str_to_title(type), " - Start")

p <- shinyhttr::progress(session, id = "dem_progress")

# Catch errors if have issues and try again
l <- try(dem_region(watershed, progress = p, type = type), silent = TRUE)
l <- try(dem_region(watershed, type = type), silent = TRUE)
#l <- try(stop("testing"), silent = TRUE)
if(inherits(l, "try-error")) {
message(" Problem with ", type, " tiles, trying again...")
l <- tryCatch(
dem_region(watershed, progress = p, type = type),
dem_region(watershed, type = type),
#stop("testing2"),
error = function(cond) {
message(" Problem fetching ", type, " tiles\n",
Expand Down

0 comments on commit f2923ca

Please sign in to comment.