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
5e0038c
... +9 ...
97ad71e
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
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 | 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 |
Files | Coverage |
---|---|
R | -1.52% 81.76% |
Project Totals (14 files) | 81.76% |
97ad71e
f4df690
75f9aa6
7669a27
2b691e7
4cd2398
8f82fae
681e6f0
a622250
4784848
5e0038c