ropensci / rfishbase

Compare 5e0038c ... +9 ... 97ad71e

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

@@ -16,12 +16,15 @@
Loading
16 16
  
17 17
  ## FIXME FISHBASE uses mixed-case names for cols that should be case-insensitive
18 18
  ## Consider lowercasing all column names (though makes many camelCase names hard to read...)
19 +
  suppressWarnings({
19 20
  arkdb::unark(local_tbl, 
20 21
               db, 
21 22
               arkdb::streamable_readr_tsv(), 
23 +
               lines = 1e6,
22 24
               overwrite = overwrite,
23 25
               guess_max = 1e6
24 26
  )
27 +
  })
25 28
}
26 29
27 30

@@ -41,39 +41,20 @@
Loading
41 41
#' options(FISHBASE_VERSION=NULL)
42 42
#' @importFrom stats na.omit
43 43
available_releases <- function(){
44 -
  
44 +
  avail_releases <- tryCatch({
45 +
    readLines(paste0(
46 +
    "https://raw.githubusercontent.com/ropensci/",
47 +
     "rfishbase/master/inst/extdata/rfishbase_available_releases.txt"))
48 +
    }, 
49 +
    error = function(e){
50 +
      readLines(system.file("extdata", 
51 +
                            "rfishbase_available_releases.txt",
52 +
                            package = "rfishbase", mustWork = TRUE))
53 +
    },
54 +
    finally = readLines(system.file("extdata", 
55 +
                                    "rfishbase_available_releases.txt",
56 +
                                    package = "rfishbase", mustWork = TRUE)))
45 57
46 -
  ## check for cached version first
47 -
  avail_releases <- mget("avail_releases", 
48 -
                         envir = db_cache, 
49 -
                         ifnotfound = NA)[[1]]
50 -
  if(!all(is.na(avail_releases)))
51 -
    return(avail_releases)
52 -
  
53 -
  
54 -
  ## Okay, check GH for a release
55 -
  token <- Sys.getenv("GITHUB_TOKEN", 
56 -
                      Sys.getenv("GITHUB_PAT", 
57 -
                                 paste0("b2b7441d", 
58 -
                                        "aeeb010b", 
59 -
                                        "1df26f1f6", 
60 -
                                        "0a7f1ed",
61 -
                                        "c485e443")))
62 -
  avail_releases <- gh::gh("/repos/:owner/:repo/releases", 
63 -
         owner = "ropensci",
64 -
         repo="rfishbase", 
65 -
         .token = token) %>%
66 -
    purrr::map_chr("tag_name") %>%
67 -
    stringr::str_extract("\\d\\d\\.\\d\\d") %>% 
68 -
    as.numeric() %>% 
69 -
    stats::na.omit() %>%
70 -
    unique() %>% 
71 -
    sort(decreasing = TRUE) %>% 
72 -
    as.character()
73 -
  
74 -
  ## Cache this so we don't hit GH every single time!
75 -
  assign("avail_releases", avail_releases, envir = db_cache)
76 -
  
77 58
  avail_releases
78 59
}
79 60

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/00-endpoint.R 95.35%
R/common_names.R 100.00%
R/distribution.R 37.78%
R/docs.R 100.00%
R/fb_tbl.R -22.46% 60.87%
R/list_fields.R 100.00%
R/load_taxa.R 98.53%
R/local_db.R 0.41% 95.65%
R/refs.R 80.00%
R/species.R 30.77%
R/species_list.R 76.92%
R/species_names.R 100.00%
R/synonyms.R 97.22%
R/trophic_ecology.R 100.00%
Project Totals (14 files) 81.76%
Loading